From 012682b99bb09fcd56e5460ed6171abc1ffc9b62 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 24 Feb 2026 18:13:03 +0000 Subject: [PATCH 1/5] Update dependencies --- packages/autorest.python/package.json | 2 +- packages/typespec-python/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index d2f7591687..19ae16228d 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "^4.21.0" diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 235525ee1b..ca993cb0a1 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "^4.21.0", - "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { @@ -87,7 +87,7 @@ "@azure-tools/typespec-autorest": "~0.65.0", "@azure-tools/typespec-client-generator-core": "~0.65.1", "@azure-tools/azure-http-specs": "0.1.0-alpha.38-dev.2", - "@typespec/http-specs": "0.1.0-alpha.33-dev.2", + "@typespec/http-specs": "0.1.0-alpha.32", "@typespec/spector": "0.1.0-alpha.23", "@typespec/spec-api": "0.1.0-alpha.12", "@types/js-yaml": "~4.0.5", From 3aee329a62d87c3feb7841b48d9cdb7c0f365062 Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 24 Feb 2026 18:13:07 +0000 Subject: [PATCH 2/5] Sync shared files from typespec repo (2026-02-24 18:13:07) --- .../scripts/eng/regenerate-common.ts | 811 +++++++++--------- packages/typespec-python/src/lib.ts | 6 +- .../asynctests/test_payload_xml_async.py | 21 - .../test_payload_xml.py | 19 - 4 files changed, 421 insertions(+), 436 deletions(-) diff --git a/packages/typespec-python/scripts/eng/regenerate-common.ts b/packages/typespec-python/scripts/eng/regenerate-common.ts index 9880418935..9f9a91266d 100644 --- a/packages/typespec-python/scripts/eng/regenerate-common.ts +++ b/packages/typespec-python/scripts/eng/regenerate-common.ts @@ -6,444 +6,467 @@ import { dirname, join, relative, resolve } from "path"; export const SKIP_SPECS: string[] = ["type/file"]; export const SpecialFlags: Record> = { - azure: { - "generate-test": true, - "generate-sample": true, - }, + azure: { + "generate-test": true, + "generate-sample": true, + }, }; // ---- Base emitter options (shared across repos) ---- -export const BASE_AZURE_EMITTER_OPTIONS: Record | Record[]> = { - "azure/client-generator-core/access": { - namespace: "specs.azure.clientgenerator.core.access", - }, - "azure/client-generator-core/alternate-type": { - namespace: "specs.azure.clientgenerator.core.alternatetype", - }, - "azure/client-generator-core/api-version": { - namespace: "specs.azure.clientgenerator.core.apiversion", - }, - "azure/client-generator-core/client-initialization/default": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.default", - }, - "azure/client-generator-core/client-initialization/individually": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.individually", - }, - "azure/client-generator-core/client-initialization/individuallyParent": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.individuallyparent", - }, - "azure/client-generator-core/client-location": { - namespace: "specs.azure.clientgenerator.core.clientlocation", - }, - "azure/client-generator-core/deserialize-empty-string-as-null": { - namespace: "specs.azure.clientgenerator.core.emptystring", - }, - "azure/client-generator-core/flatten-property": { - namespace: "specs.azure.clientgenerator.core.flattenproperty", - }, - "azure/client-generator-core/usage": { - namespace: "specs.azure.clientgenerator.core.usage", - }, - "azure/client-generator-core/override": { - namespace: "specs.azure.clientgenerator.core.override", - }, - "azure/client-generator-core/hierarchy-building": { - namespace: "specs.azure.clientgenerator.core.hierarchybuilding", - }, - "azure/core/basic": { - namespace: "specs.azure.core.basic", - }, - "azure/core/lro/rpc": { - namespace: "specs.azure.core.lro.rpc", - }, - "azure/core/lro/standard": { - namespace: "specs.azure.core.lro.standard", - }, - "azure/core/model": { - namespace: "specs.azure.core.model", - }, - "azure/core/page": { - namespace: "specs.azure.core.page", - }, - "azure/core/scalar": { - namespace: "specs.azure.core.scalar", - }, - "azure/core/traits": { - namespace: "specs.azure.core.traits", - }, - "azure/encode/duration": { - namespace: "specs.azure.encode.duration", - }, - "azure/example/basic": { - namespace: "specs.azure.example.basic", - }, - "azure/payload/pageable": { - namespace: "specs.azure.payload.pageable", - }, - "azure/versioning/previewVersion": { - namespace: "specs.azure.versioning.previewversion", - }, - "client/structure/default": { - namespace: "client.structure.service", - }, - "client/structure/multi-client": { - "package-name": "client-structure-multiclient", - "namespace": "client.structure.multiclient", - }, - "client/structure/renamed-operation": { - "package-name": "client-structure-renamedoperation", - "namespace": "client.structure.renamedoperation", - }, - "client/structure/two-operation-group": { - "package-name": "client-structure-twooperationgroup", - "namespace": "client.structure.twooperationgroup", - }, - "client/naming": { - namespace: "client.naming.main", - }, - "client/overload": { - namespace: "client.overload", - }, - "encode/duration": { - namespace: "encode.duration", - }, - "encode/numeric": { - namespace: "encode.numeric", - }, - "parameters/basic": { - namespace: "parameters.basic", - }, - "parameters/spread": { - namespace: "parameters.spread", - }, - "payload/content-negotiation": { - namespace: "payload.contentnegotiation", - }, - "payload/multipart": { - namespace: "payload.multipart", - }, - "serialization/encoded-name/json": { - namespace: "serialization.encodedname.json", - }, - "special-words": { - namespace: "specialwords", - }, - "service/multi-service": { - namespace: "service.multiservice", - }, +export const BASE_AZURE_EMITTER_OPTIONS: Record< + string, + Record | Record[] +> = { + "azure/client-generator-core/access": { + namespace: "specs.azure.clientgenerator.core.access", + }, + "azure/client-generator-core/alternate-type": { + namespace: "specs.azure.clientgenerator.core.alternatetype", + }, + "azure/client-generator-core/api-version": { + namespace: "specs.azure.clientgenerator.core.apiversion", + }, + "azure/client-generator-core/client-initialization/default": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.default", + }, + "azure/client-generator-core/client-initialization/individually": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.individually", + }, + "azure/client-generator-core/client-initialization/individuallyParent": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.individuallyparent", + }, + "azure/client-generator-core/client-location": { + namespace: "specs.azure.clientgenerator.core.clientlocation", + }, + "azure/client-generator-core/deserialize-empty-string-as-null": { + namespace: "specs.azure.clientgenerator.core.emptystring", + }, + "azure/client-generator-core/flatten-property": { + namespace: "specs.azure.clientgenerator.core.flattenproperty", + }, + "azure/client-generator-core/usage": { + namespace: "specs.azure.clientgenerator.core.usage", + }, + "azure/client-generator-core/override": { + namespace: "specs.azure.clientgenerator.core.override", + }, + "azure/client-generator-core/hierarchy-building": { + namespace: "specs.azure.clientgenerator.core.hierarchybuilding", + }, + "azure/core/basic": { + namespace: "specs.azure.core.basic", + }, + "azure/core/lro/rpc": { + namespace: "specs.azure.core.lro.rpc", + }, + "azure/core/lro/standard": { + namespace: "specs.azure.core.lro.standard", + }, + "azure/core/model": { + namespace: "specs.azure.core.model", + }, + "azure/core/page": { + namespace: "specs.azure.core.page", + }, + "azure/core/scalar": { + namespace: "specs.azure.core.scalar", + }, + "azure/core/traits": { + namespace: "specs.azure.core.traits", + }, + "azure/encode/duration": { + namespace: "specs.azure.encode.duration", + }, + "azure/example/basic": { + namespace: "specs.azure.example.basic", + }, + "azure/payload/pageable": { + namespace: "specs.azure.payload.pageable", + }, + "azure/versioning/previewVersion": { + namespace: "specs.azure.versioning.previewversion", + }, + "client/structure/default": { + namespace: "client.structure.service", + }, + "client/structure/multi-client": { + "package-name": "client-structure-multiclient", + namespace: "client.structure.multiclient", + }, + "client/structure/renamed-operation": { + "package-name": "client-structure-renamedoperation", + namespace: "client.structure.renamedoperation", + }, + "client/structure/two-operation-group": { + "package-name": "client-structure-twooperationgroup", + namespace: "client.structure.twooperationgroup", + }, + "client/naming": { + namespace: "client.naming.main", + }, + "client/overload": { + namespace: "client.overload", + }, + "encode/duration": { + namespace: "encode.duration", + }, + "encode/numeric": { + namespace: "encode.numeric", + }, + "parameters/basic": { + namespace: "parameters.basic", + }, + "parameters/spread": { + namespace: "parameters.spread", + }, + "payload/content-negotiation": { + namespace: "payload.contentnegotiation", + }, + "payload/multipart": { + namespace: "payload.multipart", + }, + "serialization/encoded-name/json": { + namespace: "serialization.encodedname.json", + }, + "special-words": { + namespace: "specialwords", + }, + "service/multi-service": { + namespace: "service.multiservice", + }, }; -export const BASE_EMITTER_OPTIONS: Record | Record[]> = { - "resiliency/srv-driven/old.tsp": { - "package-name": "resiliency-srv-driven1", - "namespace": "resiliency.srv.driven1", - "package-mode": "azure-dataplane", - "package-pprint-name": "ResiliencySrvDriven1", - }, - "resiliency/srv-driven": { - "package-name": "resiliency-srv-driven2", - "namespace": "resiliency.srv.driven2", - "package-mode": "azure-dataplane", - "package-pprint-name": "ResiliencySrvDriven2", - }, - "authentication/api-key": { - "clear-output-folder": "true", - }, - "authentication/http/custom": { - "package-name": "authentication-http-custom", - "namespace": "authentication.http.custom", - "package-pprint-name": "Authentication Http Custom", - }, - "authentication/union": [ - { - "package-name": "authentication-union", - "namespace": "authentication.union", - }, - { - "package-name": "setuppy-authentication-union", - "namespace": "setuppy.authentication.union", - "keep-setup-py": "true", - }, - ], - "type/array": { - "package-name": "typetest-array", - "namespace": "typetest.array", - }, - "type/dictionary": { - "package-name": "typetest-dictionary", - "namespace": "typetest.dictionary", - }, - "type/enum/extensible": { - "package-name": "typetest-enum-extensible", - "namespace": "typetest.enum.extensible", - }, - "type/enum/fixed": { - "package-name": "typetest-enum-fixed", - "namespace": "typetest.enum.fixed", - }, - "type/model/empty": { - "package-name": "typetest-model-empty", - "namespace": "typetest.model.empty", - }, - "type/model/inheritance/enum-discriminator": { - "package-name": "typetest-model-enumdiscriminator", - "namespace": "typetest.model.enumdiscriminator", - }, - "type/model/inheritance/nested-discriminator": { - "package-name": "typetest-model-nesteddiscriminator", - "namespace": "typetest.model.nesteddiscriminator", - }, - "type/model/inheritance/not-discriminated": { - "package-name": "typetest-model-notdiscriminated", - "namespace": "typetest.model.notdiscriminated", - }, - "type/model/inheritance/single-discriminator": { - "package-name": "typetest-model-singlediscriminator", - "namespace": "typetest.model.singlediscriminator", - }, - "type/model/inheritance/recursive": { - "package-name": "typetest-model-recursive", - "namespace": "typetest.model.recursive", - }, - "type/model/usage": { - "package-name": "typetest-model-usage", - "namespace": "typetest.model.usage", - }, - "type/model/visibility": [ - { - "package-name": "typetest-model-visibility", - "namespace": "typetest.model.visibility", - }, - { - "package-name": "headasbooleantrue", - "namespace": "headasbooleantrue", - "head-as-boolean": "true", - }, - { - "package-name": "headasbooleanfalse", - "namespace": "headasbooleanfalse", - "head-as-boolean": "false", - }, - ], - "type/property/nullable": { - "package-name": "typetest-property-nullable", - "namespace": "typetest.property.nullable", - }, - "type/property/optionality": { - "package-name": "typetest-property-optional", - "namespace": "typetest.property.optional", - }, - "type/property/additional-properties": { - "package-name": "typetest-property-additionalproperties", - "namespace": "typetest.property.additionalproperties", - }, - "type/scalar": { - "package-name": "typetest-scalar", - "namespace": "typetest.scalar", - }, - "type/property/value-types": { - "package-name": "typetest-property-valuetypes", - "namespace": "typetest.property.valuetypes", - }, - "type/union": { - "package-name": "typetest-union", - "namespace": "typetest.union", - }, - "type/union/discriminated": { - "package-name": "typetest-discriminatedunion", - "namespace": "typetest.discriminatedunion", - }, - "type/file": { - "package-name": "typetest-file", - "namespace": "typetest.file", - }, - "documentation": { - "package-name": "specs-documentation", - "namespace": "specs.documentation", - }, +export const BASE_EMITTER_OPTIONS: Record< + string, + Record | Record[] +> = { + "resiliency/srv-driven/old.tsp": { + "package-name": "resiliency-srv-driven1", + namespace: "resiliency.srv.driven1", + "package-mode": "azure-dataplane", + "package-pprint-name": "ResiliencySrvDriven1", + }, + "resiliency/srv-driven": { + "package-name": "resiliency-srv-driven2", + namespace: "resiliency.srv.driven2", + "package-mode": "azure-dataplane", + "package-pprint-name": "ResiliencySrvDriven2", + }, + "authentication/api-key": { + "clear-output-folder": "true", + }, + "authentication/http/custom": { + "package-name": "authentication-http-custom", + namespace: "authentication.http.custom", + "package-pprint-name": "Authentication Http Custom", + }, + "authentication/union": [ + { + "package-name": "authentication-union", + namespace: "authentication.union", + }, + { + "package-name": "setuppy-authentication-union", + namespace: "setuppy.authentication.union", + "keep-setup-py": "true", + }, + ], + "type/array": { + "package-name": "typetest-array", + namespace: "typetest.array", + }, + "type/dictionary": { + "package-name": "typetest-dictionary", + namespace: "typetest.dictionary", + }, + "type/enum/extensible": { + "package-name": "typetest-enum-extensible", + namespace: "typetest.enum.extensible", + }, + "type/enum/fixed": { + "package-name": "typetest-enum-fixed", + namespace: "typetest.enum.fixed", + }, + "type/model/empty": { + "package-name": "typetest-model-empty", + namespace: "typetest.model.empty", + }, + "type/model/inheritance/enum-discriminator": { + "package-name": "typetest-model-enumdiscriminator", + namespace: "typetest.model.enumdiscriminator", + }, + "type/model/inheritance/nested-discriminator": { + "package-name": "typetest-model-nesteddiscriminator", + namespace: "typetest.model.nesteddiscriminator", + }, + "type/model/inheritance/not-discriminated": { + "package-name": "typetest-model-notdiscriminated", + namespace: "typetest.model.notdiscriminated", + }, + "type/model/inheritance/single-discriminator": { + "package-name": "typetest-model-singlediscriminator", + namespace: "typetest.model.singlediscriminator", + }, + "type/model/inheritance/recursive": { + "package-name": "typetest-model-recursive", + namespace: "typetest.model.recursive", + }, + "type/model/usage": { + "package-name": "typetest-model-usage", + namespace: "typetest.model.usage", + }, + "type/model/visibility": [ + { + "package-name": "typetest-model-visibility", + namespace: "typetest.model.visibility", + }, + { + "package-name": "headasbooleantrue", + namespace: "headasbooleantrue", + "head-as-boolean": "true", + }, + { + "package-name": "headasbooleanfalse", + namespace: "headasbooleanfalse", + "head-as-boolean": "false", + }, + ], + "type/property/nullable": { + "package-name": "typetest-property-nullable", + namespace: "typetest.property.nullable", + }, + "type/property/optionality": { + "package-name": "typetest-property-optional", + namespace: "typetest.property.optional", + }, + "type/property/additional-properties": { + "package-name": "typetest-property-additionalproperties", + namespace: "typetest.property.additionalproperties", + }, + "type/scalar": { + "package-name": "typetest-scalar", + namespace: "typetest.scalar", + }, + "type/property/value-types": { + "package-name": "typetest-property-valuetypes", + namespace: "typetest.property.valuetypes", + }, + "type/union": { + "package-name": "typetest-union", + namespace: "typetest.union", + }, + "type/union/discriminated": { + "package-name": "typetest-discriminatedunion", + namespace: "typetest.discriminatedunion", + }, + "type/file": { + "package-name": "typetest-file", + namespace: "typetest.file", + }, + documentation: { + "package-name": "specs-documentation", + namespace: "specs.documentation", + }, }; // ---- Shared interfaces ---- export interface TspCommand { - outputDir: string; - command: string | string[]; + outputDir: string; + command: string | string[]; } export interface RegenerateFlagsInput { - flavor?: string; - debug?: boolean; - name?: string; - pyodide?: boolean; + flavor?: string; + debug?: boolean; + name?: string; + pyodide?: boolean; } export interface RegenerateFlags { - flavor: string; - debug: boolean; - name?: string; - pyodide?: boolean; + flavor: string; + debug: boolean; + name?: string; + pyodide?: boolean; } export interface ProcessedEmitterOption { - options: Record; - outputDir: string; + options: Record; + outputDir: string; } export interface RegenerateConfig { - azureHttpSpecs: string; - httpSpecs: string; - emitterOptions: Record | Record[]>; - azureEmitterOptions: Record | Record[]>; - preprocess: (flags: RegenerateFlagsInput) => Promise; - getCmdList: (spec: string, flags: RegenerateFlags) => TspCommand[]; - executeCommand: (cmd: TspCommand) => Promise; + azureHttpSpecs: string; + httpSpecs: string; + emitterOptions: Record | Record[]>; + azureEmitterOptions: Record | Record[]>; + preprocess: (flags: RegenerateFlagsInput) => Promise; + getCmdList: (spec: string, flags: RegenerateFlags) => TspCommand[]; + executeCommand: (cmd: TspCommand) => Promise; } // ---- Shared utility functions ---- export function toPosix(dir: string): string { - return dir.replace(/\\/g, "/"); + return dir.replace(/\\/g, "/"); } -export function getEmitterOption(spec: string, flavor: string, config: RegenerateConfig): Record[] { - const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; - const relativeSpec = toPosix(relative(specDir, spec)); - const key = relativeSpec.includes("resiliency/srv-driven/old.tsp") ? relativeSpec : dirname(relativeSpec); - const emitter_options = config.emitterOptions[key] || - (flavor === "azure" ? config.azureEmitterOptions[key] : [{}]) || [{}]; - return Array.isArray(emitter_options) ? emitter_options : [emitter_options]; +export function getEmitterOption( + spec: string, + flavor: string, + config: RegenerateConfig, +): Record[] { + const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; + const relativeSpec = toPosix(relative(specDir, spec)); + const key = relativeSpec.includes("resiliency/srv-driven/old.tsp") + ? relativeSpec + : dirname(relativeSpec); + const emitter_options = config.emitterOptions[key] || + (flavor === "azure" ? config.azureEmitterOptions[key] : [{}]) || [{}]; + return Array.isArray(emitter_options) ? emitter_options : [emitter_options]; } -export async function getSubdirectories(baseDir: string, flags: RegenerateFlags): Promise { - const subdirectories: string[] = []; - - async function searchDir(currentDir: string) { - const items = await promises.readdir(currentDir, { withFileTypes: true }); - - const promisesArray = items.map(async (item) => { - const subDirPath = join(currentDir, item.name); - if (item.isDirectory()) { - const mainTspPath = join(subDirPath, "main.tsp"); - const clientTspPath = join(subDirPath, "client.tsp"); - - const mainTspRelativePath = toPosix(relative(baseDir, mainTspPath)); - - if (SKIP_SPECS.some((skipSpec) => mainTspRelativePath.includes(skipSpec))) return; - - const hasMainTsp = await promises - .access(mainTspPath) - .then(() => true) - .catch(() => false); - const hasClientTsp = await promises - .access(clientTspPath) - .then(() => true) - .catch(() => false); - - if (mainTspRelativePath.toLowerCase().includes(flags.name || "")) { - if (mainTspRelativePath.includes("resiliency/srv-driven")) { - subdirectories.push(resolve(subDirPath, "old.tsp")); - } - if (hasClientTsp) { - subdirectories.push(resolve(subDirPath, "client.tsp")); - } else if (hasMainTsp) { - subdirectories.push(resolve(subDirPath, "main.tsp")); - } - } - - // Recursively search in the subdirectory - await searchDir(subDirPath); - } - }); - - await Promise.all(promisesArray); - } +export async function getSubdirectories( + baseDir: string, + flags: RegenerateFlags, +): Promise { + const subdirectories: string[] = []; + + async function searchDir(currentDir: string) { + const items = await promises.readdir(currentDir, { withFileTypes: true }); + + const promisesArray = items.map(async (item) => { + const subDirPath = join(currentDir, item.name); + if (item.isDirectory()) { + const mainTspPath = join(subDirPath, "main.tsp"); + const clientTspPath = join(subDirPath, "client.tsp"); + + const mainTspRelativePath = toPosix(relative(baseDir, mainTspPath)); + + if (SKIP_SPECS.some((skipSpec) => mainTspRelativePath.includes(skipSpec))) return; + + const hasMainTsp = await promises + .access(mainTspPath) + .then(() => true) + .catch(() => false); + const hasClientTsp = await promises + .access(clientTspPath) + .then(() => true) + .catch(() => false); + + if (mainTspRelativePath.toLowerCase().includes(flags.name || "")) { + if (mainTspRelativePath.includes("resiliency/srv-driven")) { + subdirectories.push(resolve(subDirPath, "old.tsp")); + } + if (hasClientTsp) { + subdirectories.push(resolve(subDirPath, "client.tsp")); + } else if (hasMainTsp) { + subdirectories.push(resolve(subDirPath, "main.tsp")); + } + } + + // Recursively search in the subdirectory + await searchDir(subDirPath); + } + }); + + await Promise.all(promisesArray); + } - await searchDir(baseDir); - return subdirectories; + await searchDir(baseDir); + return subdirectories; } export function defaultPackageName(spec: string, config: RegenerateConfig): string { - const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; - return toPosix(relative(specDir, dirname(spec))) - .replace(/\//g, "-") - .toLowerCase(); + const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; + return toPosix(relative(specDir, dirname(spec))) + .replace(/\//g, "-") + .toLowerCase(); } export function buildOptions( - spec: string, - generatedFolder: string, - flags: RegenerateFlags, - config: RegenerateConfig, + spec: string, + generatedFolder: string, + flags: RegenerateFlags, + config: RegenerateConfig, ): ProcessedEmitterOption[] { - const results: ProcessedEmitterOption[] = []; - for (const emitterConfig of getEmitterOption(spec, flags.flavor, config)) { - const options: Record = { ...emitterConfig }; - if (flags.pyodide) { - options["use-pyodide"] = "true"; - } - options["flavor"] = flags.flavor; - for (const [k, v] of Object.entries(SpecialFlags[flags.flavor] ?? {})) { - options[k] = v; - } - if (options["emitter-output-dir"] === undefined) { - const packageName = options["package-name"] || defaultPackageName(spec, config); - options["emitter-output-dir"] = toPosix(`${generatedFolder}/test/${flags.flavor}/generated/${packageName}`); - } - if (flags.debug) { - options["debug"] = "true"; - } - options["examples-dir"] = toPosix(join(dirname(spec), "examples")); - results.push({ - options, - outputDir: options["emitter-output-dir"], - }); + const results: ProcessedEmitterOption[] = []; + for (const emitterConfig of getEmitterOption(spec, flags.flavor, config)) { + const options: Record = { ...emitterConfig }; + if (flags.pyodide) { + options["use-pyodide"] = "true"; } - return results; -} - -export async function runTaskPool(tasks: Array<() => Promise>, poolLimit: number): Promise { - async function worker(start: number, end: number) { - while (start < end) { - await tasks[start](); - start++; - } + options["flavor"] = flags.flavor; + for (const [k, v] of Object.entries(SpecialFlags[flags.flavor] ?? {})) { + options[k] = v; } - - const workers = []; - let start = 0; - while (start < tasks.length) { - const end = Math.min(start + poolLimit, tasks.length); - workers.push((async () => await worker(start, end))()); - start = end; + if (options["emitter-output-dir"] === undefined) { + const packageName = options["package-name"] || defaultPackageName(spec, config); + options["emitter-output-dir"] = toPosix( + `${generatedFolder}/test/${flags.flavor}/generated/${packageName}`, + ); + } + if (flags.debug) { + options["debug"] = "true"; } - await Promise.all(workers); + options["examples-dir"] = toPosix(join(dirname(spec), "examples")); + results.push({ + options, + outputDir: options["emitter-output-dir"], + }); + } + return results; } -export async function regenerate(flags: RegenerateFlagsInput, config: RegenerateConfig): Promise { - if (flags.flavor === undefined) { - await regenerate({ flavor: "azure", ...flags }, config); - await regenerate({ flavor: "unbranded", ...flags }, config); - } else { - await config.preprocess(flags); - - const flagsResolved: RegenerateFlags = { debug: false, flavor: flags.flavor, ...flags }; - const subdirectoriesForAzure = await getSubdirectories(config.azureHttpSpecs, flagsResolved); - const subdirectoriesForNonAzure = await getSubdirectories(config.httpSpecs, flagsResolved); - const subdirectories = - flags.flavor === "azure" - ? [...subdirectoriesForAzure, ...subdirectoriesForNonAzure] - : subdirectoriesForNonAzure; - const cmdList: TspCommand[] = subdirectories.flatMap((subdirectory) => - config.getCmdList(subdirectory, flagsResolved), - ); - - // Create tasks as functions for the pool - const tasks: Array<() => Promise> = cmdList.map((tspCommand) => { - return () => config.executeCommand(tspCommand); - }); - - // Run tasks with a concurrency limit - await runTaskPool(tasks, 30); +export async function runTaskPool( + tasks: Array<() => Promise>, + poolLimit: number, +): Promise { + async function worker(start: number, end: number) { + while (start < end) { + await tasks[start](); + start++; } + } + + const workers = []; + let start = 0; + while (start < tasks.length) { + const end = Math.min(start + poolLimit, tasks.length); + workers.push((async () => await worker(start, end))()); + start = end; + } + await Promise.all(workers); +} + +export async function regenerate( + flags: RegenerateFlagsInput, + config: RegenerateConfig, +): Promise { + if (flags.flavor === undefined) { + await regenerate({ flavor: "azure", ...flags }, config); + await regenerate({ flavor: "unbranded", ...flags }, config); + } else { + await config.preprocess(flags); + + const flagsResolved: RegenerateFlags = { debug: false, flavor: flags.flavor, ...flags }; + const subdirectoriesForAzure = await getSubdirectories(config.azureHttpSpecs, flagsResolved); + const subdirectoriesForNonAzure = await getSubdirectories(config.httpSpecs, flagsResolved); + const subdirectories = + flags.flavor === "azure" + ? [...subdirectoriesForAzure, ...subdirectoriesForNonAzure] + : subdirectoriesForNonAzure; + const cmdList: TspCommand[] = subdirectories.flatMap((subdirectory) => + config.getCmdList(subdirectory, flagsResolved), + ); + + // Create tasks as functions for the pool + const tasks: Array<() => Promise> = cmdList.map((tspCommand) => { + return () => config.executeCommand(tspCommand); + }); + + // Run tasks with a concurrency limit + await runTaskPool(tasks, 30); + } } diff --git a/packages/typespec-python/src/lib.ts b/packages/typespec-python/src/lib.ts index 6e85d60424..8062bf9cc4 100644 --- a/packages/typespec-python/src/lib.ts +++ b/packages/typespec-python/src/lib.ts @@ -12,8 +12,10 @@ export interface PythonAzureEmitterOptions extends PythonEmitterOptions { "generate-test"?: boolean; } -export interface PythonSdkContext - extends SdkContext { +export interface PythonSdkContext extends SdkContext< + PythonAzureEmitterOptions, + TServiceOperation +> { __endpointPathParameters: Record[]; } diff --git a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py index 7d88ecbbb5..28693b8c28 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py +++ b/packages/typespec-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import datetime import pytest from payload.xml.aio import XmlClient from payload.xml.models import ( @@ -19,8 +18,6 @@ ModelWithText, ModelWithDictionary, ModelWithEncodedNames, - ModelWithEnum, - ModelWithDatetime, ) @@ -122,24 +119,6 @@ async def test_model_with_encoded_names(client: XmlClient): await client.model_with_encoded_names_value.put(model) -@pytest.mark.asyncio -async def test_model_with_enum(client: XmlClient): - model = ModelWithEnum(status="success") - assert await client.model_with_enum_value.get() == model - await client.model_with_enum_value.put(model) - - -@pytest.mark.asyncio -async def test_model_with_datetime(client: XmlClient): - model = ModelWithDatetime( - rfc3339=datetime.datetime(2022, 8, 26, 18, 38, 0, tzinfo=datetime.timezone.utc), - rfc7231=datetime.datetime(2022, 8, 26, 14, 38, 0, tzinfo=datetime.timezone.utc), - ) - result = await client.model_with_datetime_value.get() - assert result.rfc3339 == model.rfc3339 - assert result.rfc7231 == model.rfc7231 - - @pytest.mark.asyncio async def test_xml_error_value(client: XmlClient, core_library): with pytest.raises(core_library.exceptions.HttpResponseError) as ex: diff --git a/packages/typespec-python/test/generic_mock_api_tests/test_payload_xml.py b/packages/typespec-python/test/generic_mock_api_tests/test_payload_xml.py index a191828516..f5e7a2da67 100644 --- a/packages/typespec-python/test/generic_mock_api_tests/test_payload_xml.py +++ b/packages/typespec-python/test/generic_mock_api_tests/test_payload_xml.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import datetime import pytest from payload.xml import XmlClient from payload.xml.models import ( @@ -19,8 +18,6 @@ ModelWithText, ModelWithDictionary, ModelWithEncodedNames, - ModelWithEnum, - ModelWithDatetime, ) @@ -110,22 +107,6 @@ def test_model_with_encoded_names(client: XmlClient): client.model_with_encoded_names_value.put(model) -def test_model_with_enum(client: XmlClient): - model = ModelWithEnum(status="success") - assert client.model_with_enum_value.get() == model - client.model_with_enum_value.put(model) - - -def test_model_with_datetime(client: XmlClient): - model = ModelWithDatetime( - rfc3339=datetime.datetime(2022, 8, 26, 18, 38, 0, tzinfo=datetime.timezone.utc), - rfc7231=datetime.datetime(2022, 8, 26, 14, 38, 0, tzinfo=datetime.timezone.utc), - ) - result = client.model_with_datetime_value.get() - assert result.rfc3339 == model.rfc3339 - assert result.rfc7231 == model.rfc7231 - - def test_xml_error_value(client: XmlClient, core_library): with pytest.raises(core_library.exceptions.HttpResponseError) as ex: client.xml_error_value.get() From 5e976b0ac78c007e4421f6ace4c8ebcd86a19e4b Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 24 Feb 2026 18:13:08 +0000 Subject: [PATCH 3/5] Add changelog --- .../python-clientOptionInterface-2026-1-23-17-13-8.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .chronus/changes/python-clientOptionInterface-2026-1-23-17-13-8.md diff --git a/.chronus/changes/python-clientOptionInterface-2026-1-23-17-13-8.md b/.chronus/changes/python-clientOptionInterface-2026-1-23-17-13-8.md new file mode 100644 index 0000000000..73b10475d5 --- /dev/null +++ b/.chronus/changes/python-clientOptionInterface-2026-1-23-17-13-8.md @@ -0,0 +1,8 @@ +--- +changeKind: fix +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Allow client options on child clients to override parent clients \ No newline at end of file From 8a42ac8eeaa14cf51c1b3025699bc5b490c5319e Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 24 Feb 2026 18:14:10 +0000 Subject: [PATCH 4/5] Update dependencies (2026-02-24 18:14:10) --- .../scripts/eng/regenerate-common.ts | 811 +++++++++--------- packages/typespec-python/src/lib.ts | 6 +- pnpm-lock.yaml | 30 +- 3 files changed, 411 insertions(+), 436 deletions(-) diff --git a/packages/typespec-python/scripts/eng/regenerate-common.ts b/packages/typespec-python/scripts/eng/regenerate-common.ts index 9f9a91266d..9880418935 100644 --- a/packages/typespec-python/scripts/eng/regenerate-common.ts +++ b/packages/typespec-python/scripts/eng/regenerate-common.ts @@ -6,467 +6,444 @@ import { dirname, join, relative, resolve } from "path"; export const SKIP_SPECS: string[] = ["type/file"]; export const SpecialFlags: Record> = { - azure: { - "generate-test": true, - "generate-sample": true, - }, + azure: { + "generate-test": true, + "generate-sample": true, + }, }; // ---- Base emitter options (shared across repos) ---- -export const BASE_AZURE_EMITTER_OPTIONS: Record< - string, - Record | Record[] -> = { - "azure/client-generator-core/access": { - namespace: "specs.azure.clientgenerator.core.access", - }, - "azure/client-generator-core/alternate-type": { - namespace: "specs.azure.clientgenerator.core.alternatetype", - }, - "azure/client-generator-core/api-version": { - namespace: "specs.azure.clientgenerator.core.apiversion", - }, - "azure/client-generator-core/client-initialization/default": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.default", - }, - "azure/client-generator-core/client-initialization/individually": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.individually", - }, - "azure/client-generator-core/client-initialization/individuallyParent": { - namespace: "specs.azure.clientgenerator.core.clientinitialization.individuallyparent", - }, - "azure/client-generator-core/client-location": { - namespace: "specs.azure.clientgenerator.core.clientlocation", - }, - "azure/client-generator-core/deserialize-empty-string-as-null": { - namespace: "specs.azure.clientgenerator.core.emptystring", - }, - "azure/client-generator-core/flatten-property": { - namespace: "specs.azure.clientgenerator.core.flattenproperty", - }, - "azure/client-generator-core/usage": { - namespace: "specs.azure.clientgenerator.core.usage", - }, - "azure/client-generator-core/override": { - namespace: "specs.azure.clientgenerator.core.override", - }, - "azure/client-generator-core/hierarchy-building": { - namespace: "specs.azure.clientgenerator.core.hierarchybuilding", - }, - "azure/core/basic": { - namespace: "specs.azure.core.basic", - }, - "azure/core/lro/rpc": { - namespace: "specs.azure.core.lro.rpc", - }, - "azure/core/lro/standard": { - namespace: "specs.azure.core.lro.standard", - }, - "azure/core/model": { - namespace: "specs.azure.core.model", - }, - "azure/core/page": { - namespace: "specs.azure.core.page", - }, - "azure/core/scalar": { - namespace: "specs.azure.core.scalar", - }, - "azure/core/traits": { - namespace: "specs.azure.core.traits", - }, - "azure/encode/duration": { - namespace: "specs.azure.encode.duration", - }, - "azure/example/basic": { - namespace: "specs.azure.example.basic", - }, - "azure/payload/pageable": { - namespace: "specs.azure.payload.pageable", - }, - "azure/versioning/previewVersion": { - namespace: "specs.azure.versioning.previewversion", - }, - "client/structure/default": { - namespace: "client.structure.service", - }, - "client/structure/multi-client": { - "package-name": "client-structure-multiclient", - namespace: "client.structure.multiclient", - }, - "client/structure/renamed-operation": { - "package-name": "client-structure-renamedoperation", - namespace: "client.structure.renamedoperation", - }, - "client/structure/two-operation-group": { - "package-name": "client-structure-twooperationgroup", - namespace: "client.structure.twooperationgroup", - }, - "client/naming": { - namespace: "client.naming.main", - }, - "client/overload": { - namespace: "client.overload", - }, - "encode/duration": { - namespace: "encode.duration", - }, - "encode/numeric": { - namespace: "encode.numeric", - }, - "parameters/basic": { - namespace: "parameters.basic", - }, - "parameters/spread": { - namespace: "parameters.spread", - }, - "payload/content-negotiation": { - namespace: "payload.contentnegotiation", - }, - "payload/multipart": { - namespace: "payload.multipart", - }, - "serialization/encoded-name/json": { - namespace: "serialization.encodedname.json", - }, - "special-words": { - namespace: "specialwords", - }, - "service/multi-service": { - namespace: "service.multiservice", - }, +export const BASE_AZURE_EMITTER_OPTIONS: Record | Record[]> = { + "azure/client-generator-core/access": { + namespace: "specs.azure.clientgenerator.core.access", + }, + "azure/client-generator-core/alternate-type": { + namespace: "specs.azure.clientgenerator.core.alternatetype", + }, + "azure/client-generator-core/api-version": { + namespace: "specs.azure.clientgenerator.core.apiversion", + }, + "azure/client-generator-core/client-initialization/default": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.default", + }, + "azure/client-generator-core/client-initialization/individually": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.individually", + }, + "azure/client-generator-core/client-initialization/individuallyParent": { + namespace: "specs.azure.clientgenerator.core.clientinitialization.individuallyparent", + }, + "azure/client-generator-core/client-location": { + namespace: "specs.azure.clientgenerator.core.clientlocation", + }, + "azure/client-generator-core/deserialize-empty-string-as-null": { + namespace: "specs.azure.clientgenerator.core.emptystring", + }, + "azure/client-generator-core/flatten-property": { + namespace: "specs.azure.clientgenerator.core.flattenproperty", + }, + "azure/client-generator-core/usage": { + namespace: "specs.azure.clientgenerator.core.usage", + }, + "azure/client-generator-core/override": { + namespace: "specs.azure.clientgenerator.core.override", + }, + "azure/client-generator-core/hierarchy-building": { + namespace: "specs.azure.clientgenerator.core.hierarchybuilding", + }, + "azure/core/basic": { + namespace: "specs.azure.core.basic", + }, + "azure/core/lro/rpc": { + namespace: "specs.azure.core.lro.rpc", + }, + "azure/core/lro/standard": { + namespace: "specs.azure.core.lro.standard", + }, + "azure/core/model": { + namespace: "specs.azure.core.model", + }, + "azure/core/page": { + namespace: "specs.azure.core.page", + }, + "azure/core/scalar": { + namespace: "specs.azure.core.scalar", + }, + "azure/core/traits": { + namespace: "specs.azure.core.traits", + }, + "azure/encode/duration": { + namespace: "specs.azure.encode.duration", + }, + "azure/example/basic": { + namespace: "specs.azure.example.basic", + }, + "azure/payload/pageable": { + namespace: "specs.azure.payload.pageable", + }, + "azure/versioning/previewVersion": { + namespace: "specs.azure.versioning.previewversion", + }, + "client/structure/default": { + namespace: "client.structure.service", + }, + "client/structure/multi-client": { + "package-name": "client-structure-multiclient", + "namespace": "client.structure.multiclient", + }, + "client/structure/renamed-operation": { + "package-name": "client-structure-renamedoperation", + "namespace": "client.structure.renamedoperation", + }, + "client/structure/two-operation-group": { + "package-name": "client-structure-twooperationgroup", + "namespace": "client.structure.twooperationgroup", + }, + "client/naming": { + namespace: "client.naming.main", + }, + "client/overload": { + namespace: "client.overload", + }, + "encode/duration": { + namespace: "encode.duration", + }, + "encode/numeric": { + namespace: "encode.numeric", + }, + "parameters/basic": { + namespace: "parameters.basic", + }, + "parameters/spread": { + namespace: "parameters.spread", + }, + "payload/content-negotiation": { + namespace: "payload.contentnegotiation", + }, + "payload/multipart": { + namespace: "payload.multipart", + }, + "serialization/encoded-name/json": { + namespace: "serialization.encodedname.json", + }, + "special-words": { + namespace: "specialwords", + }, + "service/multi-service": { + namespace: "service.multiservice", + }, }; -export const BASE_EMITTER_OPTIONS: Record< - string, - Record | Record[] -> = { - "resiliency/srv-driven/old.tsp": { - "package-name": "resiliency-srv-driven1", - namespace: "resiliency.srv.driven1", - "package-mode": "azure-dataplane", - "package-pprint-name": "ResiliencySrvDriven1", - }, - "resiliency/srv-driven": { - "package-name": "resiliency-srv-driven2", - namespace: "resiliency.srv.driven2", - "package-mode": "azure-dataplane", - "package-pprint-name": "ResiliencySrvDriven2", - }, - "authentication/api-key": { - "clear-output-folder": "true", - }, - "authentication/http/custom": { - "package-name": "authentication-http-custom", - namespace: "authentication.http.custom", - "package-pprint-name": "Authentication Http Custom", - }, - "authentication/union": [ - { - "package-name": "authentication-union", - namespace: "authentication.union", - }, - { - "package-name": "setuppy-authentication-union", - namespace: "setuppy.authentication.union", - "keep-setup-py": "true", - }, - ], - "type/array": { - "package-name": "typetest-array", - namespace: "typetest.array", - }, - "type/dictionary": { - "package-name": "typetest-dictionary", - namespace: "typetest.dictionary", - }, - "type/enum/extensible": { - "package-name": "typetest-enum-extensible", - namespace: "typetest.enum.extensible", - }, - "type/enum/fixed": { - "package-name": "typetest-enum-fixed", - namespace: "typetest.enum.fixed", - }, - "type/model/empty": { - "package-name": "typetest-model-empty", - namespace: "typetest.model.empty", - }, - "type/model/inheritance/enum-discriminator": { - "package-name": "typetest-model-enumdiscriminator", - namespace: "typetest.model.enumdiscriminator", - }, - "type/model/inheritance/nested-discriminator": { - "package-name": "typetest-model-nesteddiscriminator", - namespace: "typetest.model.nesteddiscriminator", - }, - "type/model/inheritance/not-discriminated": { - "package-name": "typetest-model-notdiscriminated", - namespace: "typetest.model.notdiscriminated", - }, - "type/model/inheritance/single-discriminator": { - "package-name": "typetest-model-singlediscriminator", - namespace: "typetest.model.singlediscriminator", - }, - "type/model/inheritance/recursive": { - "package-name": "typetest-model-recursive", - namespace: "typetest.model.recursive", - }, - "type/model/usage": { - "package-name": "typetest-model-usage", - namespace: "typetest.model.usage", - }, - "type/model/visibility": [ - { - "package-name": "typetest-model-visibility", - namespace: "typetest.model.visibility", - }, - { - "package-name": "headasbooleantrue", - namespace: "headasbooleantrue", - "head-as-boolean": "true", - }, - { - "package-name": "headasbooleanfalse", - namespace: "headasbooleanfalse", - "head-as-boolean": "false", - }, - ], - "type/property/nullable": { - "package-name": "typetest-property-nullable", - namespace: "typetest.property.nullable", - }, - "type/property/optionality": { - "package-name": "typetest-property-optional", - namespace: "typetest.property.optional", - }, - "type/property/additional-properties": { - "package-name": "typetest-property-additionalproperties", - namespace: "typetest.property.additionalproperties", - }, - "type/scalar": { - "package-name": "typetest-scalar", - namespace: "typetest.scalar", - }, - "type/property/value-types": { - "package-name": "typetest-property-valuetypes", - namespace: "typetest.property.valuetypes", - }, - "type/union": { - "package-name": "typetest-union", - namespace: "typetest.union", - }, - "type/union/discriminated": { - "package-name": "typetest-discriminatedunion", - namespace: "typetest.discriminatedunion", - }, - "type/file": { - "package-name": "typetest-file", - namespace: "typetest.file", - }, - documentation: { - "package-name": "specs-documentation", - namespace: "specs.documentation", - }, +export const BASE_EMITTER_OPTIONS: Record | Record[]> = { + "resiliency/srv-driven/old.tsp": { + "package-name": "resiliency-srv-driven1", + "namespace": "resiliency.srv.driven1", + "package-mode": "azure-dataplane", + "package-pprint-name": "ResiliencySrvDriven1", + }, + "resiliency/srv-driven": { + "package-name": "resiliency-srv-driven2", + "namespace": "resiliency.srv.driven2", + "package-mode": "azure-dataplane", + "package-pprint-name": "ResiliencySrvDriven2", + }, + "authentication/api-key": { + "clear-output-folder": "true", + }, + "authentication/http/custom": { + "package-name": "authentication-http-custom", + "namespace": "authentication.http.custom", + "package-pprint-name": "Authentication Http Custom", + }, + "authentication/union": [ + { + "package-name": "authentication-union", + "namespace": "authentication.union", + }, + { + "package-name": "setuppy-authentication-union", + "namespace": "setuppy.authentication.union", + "keep-setup-py": "true", + }, + ], + "type/array": { + "package-name": "typetest-array", + "namespace": "typetest.array", + }, + "type/dictionary": { + "package-name": "typetest-dictionary", + "namespace": "typetest.dictionary", + }, + "type/enum/extensible": { + "package-name": "typetest-enum-extensible", + "namespace": "typetest.enum.extensible", + }, + "type/enum/fixed": { + "package-name": "typetest-enum-fixed", + "namespace": "typetest.enum.fixed", + }, + "type/model/empty": { + "package-name": "typetest-model-empty", + "namespace": "typetest.model.empty", + }, + "type/model/inheritance/enum-discriminator": { + "package-name": "typetest-model-enumdiscriminator", + "namespace": "typetest.model.enumdiscriminator", + }, + "type/model/inheritance/nested-discriminator": { + "package-name": "typetest-model-nesteddiscriminator", + "namespace": "typetest.model.nesteddiscriminator", + }, + "type/model/inheritance/not-discriminated": { + "package-name": "typetest-model-notdiscriminated", + "namespace": "typetest.model.notdiscriminated", + }, + "type/model/inheritance/single-discriminator": { + "package-name": "typetest-model-singlediscriminator", + "namespace": "typetest.model.singlediscriminator", + }, + "type/model/inheritance/recursive": { + "package-name": "typetest-model-recursive", + "namespace": "typetest.model.recursive", + }, + "type/model/usage": { + "package-name": "typetest-model-usage", + "namespace": "typetest.model.usage", + }, + "type/model/visibility": [ + { + "package-name": "typetest-model-visibility", + "namespace": "typetest.model.visibility", + }, + { + "package-name": "headasbooleantrue", + "namespace": "headasbooleantrue", + "head-as-boolean": "true", + }, + { + "package-name": "headasbooleanfalse", + "namespace": "headasbooleanfalse", + "head-as-boolean": "false", + }, + ], + "type/property/nullable": { + "package-name": "typetest-property-nullable", + "namespace": "typetest.property.nullable", + }, + "type/property/optionality": { + "package-name": "typetest-property-optional", + "namespace": "typetest.property.optional", + }, + "type/property/additional-properties": { + "package-name": "typetest-property-additionalproperties", + "namespace": "typetest.property.additionalproperties", + }, + "type/scalar": { + "package-name": "typetest-scalar", + "namespace": "typetest.scalar", + }, + "type/property/value-types": { + "package-name": "typetest-property-valuetypes", + "namespace": "typetest.property.valuetypes", + }, + "type/union": { + "package-name": "typetest-union", + "namespace": "typetest.union", + }, + "type/union/discriminated": { + "package-name": "typetest-discriminatedunion", + "namespace": "typetest.discriminatedunion", + }, + "type/file": { + "package-name": "typetest-file", + "namespace": "typetest.file", + }, + "documentation": { + "package-name": "specs-documentation", + "namespace": "specs.documentation", + }, }; // ---- Shared interfaces ---- export interface TspCommand { - outputDir: string; - command: string | string[]; + outputDir: string; + command: string | string[]; } export interface RegenerateFlagsInput { - flavor?: string; - debug?: boolean; - name?: string; - pyodide?: boolean; + flavor?: string; + debug?: boolean; + name?: string; + pyodide?: boolean; } export interface RegenerateFlags { - flavor: string; - debug: boolean; - name?: string; - pyodide?: boolean; + flavor: string; + debug: boolean; + name?: string; + pyodide?: boolean; } export interface ProcessedEmitterOption { - options: Record; - outputDir: string; + options: Record; + outputDir: string; } export interface RegenerateConfig { - azureHttpSpecs: string; - httpSpecs: string; - emitterOptions: Record | Record[]>; - azureEmitterOptions: Record | Record[]>; - preprocess: (flags: RegenerateFlagsInput) => Promise; - getCmdList: (spec: string, flags: RegenerateFlags) => TspCommand[]; - executeCommand: (cmd: TspCommand) => Promise; + azureHttpSpecs: string; + httpSpecs: string; + emitterOptions: Record | Record[]>; + azureEmitterOptions: Record | Record[]>; + preprocess: (flags: RegenerateFlagsInput) => Promise; + getCmdList: (spec: string, flags: RegenerateFlags) => TspCommand[]; + executeCommand: (cmd: TspCommand) => Promise; } // ---- Shared utility functions ---- export function toPosix(dir: string): string { - return dir.replace(/\\/g, "/"); + return dir.replace(/\\/g, "/"); } -export function getEmitterOption( - spec: string, - flavor: string, - config: RegenerateConfig, -): Record[] { - const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; - const relativeSpec = toPosix(relative(specDir, spec)); - const key = relativeSpec.includes("resiliency/srv-driven/old.tsp") - ? relativeSpec - : dirname(relativeSpec); - const emitter_options = config.emitterOptions[key] || - (flavor === "azure" ? config.azureEmitterOptions[key] : [{}]) || [{}]; - return Array.isArray(emitter_options) ? emitter_options : [emitter_options]; +export function getEmitterOption(spec: string, flavor: string, config: RegenerateConfig): Record[] { + const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; + const relativeSpec = toPosix(relative(specDir, spec)); + const key = relativeSpec.includes("resiliency/srv-driven/old.tsp") ? relativeSpec : dirname(relativeSpec); + const emitter_options = config.emitterOptions[key] || + (flavor === "azure" ? config.azureEmitterOptions[key] : [{}]) || [{}]; + return Array.isArray(emitter_options) ? emitter_options : [emitter_options]; } -export async function getSubdirectories( - baseDir: string, - flags: RegenerateFlags, -): Promise { - const subdirectories: string[] = []; - - async function searchDir(currentDir: string) { - const items = await promises.readdir(currentDir, { withFileTypes: true }); - - const promisesArray = items.map(async (item) => { - const subDirPath = join(currentDir, item.name); - if (item.isDirectory()) { - const mainTspPath = join(subDirPath, "main.tsp"); - const clientTspPath = join(subDirPath, "client.tsp"); - - const mainTspRelativePath = toPosix(relative(baseDir, mainTspPath)); - - if (SKIP_SPECS.some((skipSpec) => mainTspRelativePath.includes(skipSpec))) return; - - const hasMainTsp = await promises - .access(mainTspPath) - .then(() => true) - .catch(() => false); - const hasClientTsp = await promises - .access(clientTspPath) - .then(() => true) - .catch(() => false); - - if (mainTspRelativePath.toLowerCase().includes(flags.name || "")) { - if (mainTspRelativePath.includes("resiliency/srv-driven")) { - subdirectories.push(resolve(subDirPath, "old.tsp")); - } - if (hasClientTsp) { - subdirectories.push(resolve(subDirPath, "client.tsp")); - } else if (hasMainTsp) { - subdirectories.push(resolve(subDirPath, "main.tsp")); - } - } - - // Recursively search in the subdirectory - await searchDir(subDirPath); - } - }); - - await Promise.all(promisesArray); - } +export async function getSubdirectories(baseDir: string, flags: RegenerateFlags): Promise { + const subdirectories: string[] = []; + + async function searchDir(currentDir: string) { + const items = await promises.readdir(currentDir, { withFileTypes: true }); + + const promisesArray = items.map(async (item) => { + const subDirPath = join(currentDir, item.name); + if (item.isDirectory()) { + const mainTspPath = join(subDirPath, "main.tsp"); + const clientTspPath = join(subDirPath, "client.tsp"); + + const mainTspRelativePath = toPosix(relative(baseDir, mainTspPath)); + + if (SKIP_SPECS.some((skipSpec) => mainTspRelativePath.includes(skipSpec))) return; + + const hasMainTsp = await promises + .access(mainTspPath) + .then(() => true) + .catch(() => false); + const hasClientTsp = await promises + .access(clientTspPath) + .then(() => true) + .catch(() => false); + + if (mainTspRelativePath.toLowerCase().includes(flags.name || "")) { + if (mainTspRelativePath.includes("resiliency/srv-driven")) { + subdirectories.push(resolve(subDirPath, "old.tsp")); + } + if (hasClientTsp) { + subdirectories.push(resolve(subDirPath, "client.tsp")); + } else if (hasMainTsp) { + subdirectories.push(resolve(subDirPath, "main.tsp")); + } + } + + // Recursively search in the subdirectory + await searchDir(subDirPath); + } + }); + + await Promise.all(promisesArray); + } - await searchDir(baseDir); - return subdirectories; + await searchDir(baseDir); + return subdirectories; } export function defaultPackageName(spec: string, config: RegenerateConfig): string { - const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; - return toPosix(relative(specDir, dirname(spec))) - .replace(/\//g, "-") - .toLowerCase(); + const specDir = spec.includes("azure") ? config.azureHttpSpecs : config.httpSpecs; + return toPosix(relative(specDir, dirname(spec))) + .replace(/\//g, "-") + .toLowerCase(); } export function buildOptions( - spec: string, - generatedFolder: string, - flags: RegenerateFlags, - config: RegenerateConfig, + spec: string, + generatedFolder: string, + flags: RegenerateFlags, + config: RegenerateConfig, ): ProcessedEmitterOption[] { - const results: ProcessedEmitterOption[] = []; - for (const emitterConfig of getEmitterOption(spec, flags.flavor, config)) { - const options: Record = { ...emitterConfig }; - if (flags.pyodide) { - options["use-pyodide"] = "true"; - } - options["flavor"] = flags.flavor; - for (const [k, v] of Object.entries(SpecialFlags[flags.flavor] ?? {})) { - options[k] = v; - } - if (options["emitter-output-dir"] === undefined) { - const packageName = options["package-name"] || defaultPackageName(spec, config); - options["emitter-output-dir"] = toPosix( - `${generatedFolder}/test/${flags.flavor}/generated/${packageName}`, - ); - } - if (flags.debug) { - options["debug"] = "true"; + const results: ProcessedEmitterOption[] = []; + for (const emitterConfig of getEmitterOption(spec, flags.flavor, config)) { + const options: Record = { ...emitterConfig }; + if (flags.pyodide) { + options["use-pyodide"] = "true"; + } + options["flavor"] = flags.flavor; + for (const [k, v] of Object.entries(SpecialFlags[flags.flavor] ?? {})) { + options[k] = v; + } + if (options["emitter-output-dir"] === undefined) { + const packageName = options["package-name"] || defaultPackageName(spec, config); + options["emitter-output-dir"] = toPosix(`${generatedFolder}/test/${flags.flavor}/generated/${packageName}`); + } + if (flags.debug) { + options["debug"] = "true"; + } + options["examples-dir"] = toPosix(join(dirname(spec), "examples")); + results.push({ + options, + outputDir: options["emitter-output-dir"], + }); } - options["examples-dir"] = toPosix(join(dirname(spec), "examples")); - results.push({ - options, - outputDir: options["emitter-output-dir"], - }); - } - return results; + return results; } -export async function runTaskPool( - tasks: Array<() => Promise>, - poolLimit: number, -): Promise { - async function worker(start: number, end: number) { - while (start < end) { - await tasks[start](); - start++; +export async function runTaskPool(tasks: Array<() => Promise>, poolLimit: number): Promise { + async function worker(start: number, end: number) { + while (start < end) { + await tasks[start](); + start++; + } + } + + const workers = []; + let start = 0; + while (start < tasks.length) { + const end = Math.min(start + poolLimit, tasks.length); + workers.push((async () => await worker(start, end))()); + start = end; } - } - - const workers = []; - let start = 0; - while (start < tasks.length) { - const end = Math.min(start + poolLimit, tasks.length); - workers.push((async () => await worker(start, end))()); - start = end; - } - await Promise.all(workers); + await Promise.all(workers); } -export async function regenerate( - flags: RegenerateFlagsInput, - config: RegenerateConfig, -): Promise { - if (flags.flavor === undefined) { - await regenerate({ flavor: "azure", ...flags }, config); - await regenerate({ flavor: "unbranded", ...flags }, config); - } else { - await config.preprocess(flags); - - const flagsResolved: RegenerateFlags = { debug: false, flavor: flags.flavor, ...flags }; - const subdirectoriesForAzure = await getSubdirectories(config.azureHttpSpecs, flagsResolved); - const subdirectoriesForNonAzure = await getSubdirectories(config.httpSpecs, flagsResolved); - const subdirectories = - flags.flavor === "azure" - ? [...subdirectoriesForAzure, ...subdirectoriesForNonAzure] - : subdirectoriesForNonAzure; - const cmdList: TspCommand[] = subdirectories.flatMap((subdirectory) => - config.getCmdList(subdirectory, flagsResolved), - ); - - // Create tasks as functions for the pool - const tasks: Array<() => Promise> = cmdList.map((tspCommand) => { - return () => config.executeCommand(tspCommand); - }); - - // Run tasks with a concurrency limit - await runTaskPool(tasks, 30); - } +export async function regenerate(flags: RegenerateFlagsInput, config: RegenerateConfig): Promise { + if (flags.flavor === undefined) { + await regenerate({ flavor: "azure", ...flags }, config); + await regenerate({ flavor: "unbranded", ...flags }, config); + } else { + await config.preprocess(flags); + + const flagsResolved: RegenerateFlags = { debug: false, flavor: flags.flavor, ...flags }; + const subdirectoriesForAzure = await getSubdirectories(config.azureHttpSpecs, flagsResolved); + const subdirectoriesForNonAzure = await getSubdirectories(config.httpSpecs, flagsResolved); + const subdirectories = + flags.flavor === "azure" + ? [...subdirectoriesForAzure, ...subdirectoriesForNonAzure] + : subdirectoriesForNonAzure; + const cmdList: TspCommand[] = subdirectories.flatMap((subdirectory) => + config.getCmdList(subdirectory, flagsResolved), + ); + + // Create tasks as functions for the pool + const tasks: Array<() => Promise> = cmdList.map((tspCommand) => { + return () => config.executeCommand(tspCommand); + }); + + // Run tasks with a concurrency limit + await runTaskPool(tasks, 30); + } } diff --git a/packages/typespec-python/src/lib.ts b/packages/typespec-python/src/lib.ts index 8062bf9cc4..6e85d60424 100644 --- a/packages/typespec-python/src/lib.ts +++ b/packages/typespec-python/src/lib.ts @@ -12,10 +12,8 @@ export interface PythonAzureEmitterOptions extends PythonEmitterOptions { "generate-test"?: boolean; } -export interface PythonSdkContext extends SdkContext< - PythonAzureEmitterOptions, - TServiceOperation -> { +export interface PythonSdkContext + extends SdkContext { __endpointPathParameters: Record[]; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d6cdf2567..7ebc4d9ac8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz - version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -140,8 +140,8 @@ importers: specifier: ^1.9.0 version: 1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))) '@typespec/http-specs': - specifier: 0.1.0-alpha.33-dev.2 - version: 0.1.0-alpha.33-dev.2(@types/node@25.0.10)(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/versioning@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/xml@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))) + specifier: 0.1.0-alpha.32 + version: 0.1.0-alpha.32(@types/node@25.0.10)(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/versioning@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/xml@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))) '@typespec/openapi': specifier: ^1.9.0 version: 1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))) @@ -1676,8 +1676,8 @@ packages: peerDependencies: '@typespec/compiler': ^1.9.0 - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz': - resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz} version: 0.27.1 engines: {node: '>=20.0.0'} peerDependencies: @@ -1696,15 +1696,15 @@ packages: '@typespec/versioning': '>=0.79.0 <1.0.0' '@typespec/xml': '>=0.79.0 <1.0.0' - '@typespec/http-specs@0.1.0-alpha.33-dev.2': - resolution: {integrity: sha512-Ex7PVBJgJAmNLKMbp9jA6+fXalcau3Rf+J7N8XMwCICvz6yFcRJKF07/NsM3Doc87e43VovnrJb2I2tb7LSuDw==} + '@typespec/http-specs@0.1.0-alpha.32': + resolution: {integrity: sha512-a5kOR6M6H23+w4cmYyprh/2Oa5bmPmz6wOQKc9cKfXH8f2sFJ4ViIHBMovyAl5HsSaDAY4VvVz1vmEWA+OWj8g==} engines: {node: '>=16.0.0'} peerDependencies: '@typespec/compiler': ^1.9.0 '@typespec/http': ^1.9.0 - '@typespec/rest': ^0.79.0 || >=0.80.0-dev <0.80.0 - '@typespec/versioning': ^0.79.0 || >=0.80.0-dev <0.80.0 - '@typespec/xml': ^0.79.0 || >=0.80.0-dev <0.80.0 + '@typespec/rest': ^0.79.0 + '@typespec/versioning': ^0.79.0 + '@typespec/xml': ^0.79.0 '@typespec/http@1.9.0': resolution: {integrity: sha512-JzlZZsgCo71f2KhWbf4BLOz5e+dVLj7gJJ4kvXvrmuG9QHoT41VaGPpCQamYgpZLMz2LQbsOtw34AmpovhuJSw==} @@ -6536,7 +6536,7 @@ snapshots: dependencies: '@typespec/compiler': 1.9.0(@types/node@25.0.10) - '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTg4OTg4NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTkxOTQwOS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.27.1.tgz(d47jdurrixtlkbx6evpzkrossu)': dependencies: '@azure-tools/typespec-autorest': 0.65.0(nygkhqfhqfgqby2jrpoptrncse) '@azure-tools/typespec-azure-core': 0.65.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))) @@ -6561,7 +6561,7 @@ snapshots: - bufferutil - utf-8-validate - '@typespec/http-specs@0.1.0-alpha.33-dev.2(@types/node@25.0.10)(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/versioning@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/xml@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))': + '@typespec/http-specs@0.1.0-alpha.32(@types/node@25.0.10)(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))))(@typespec/rest@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/http@1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/versioning@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))(@typespec/xml@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10)))': dependencies: '@typespec/compiler': 1.9.0(@types/node@25.0.10) '@typespec/http': 1.9.0(@typespec/compiler@1.9.0(@types/node@25.0.10))(@typespec/streams@0.79.0(@typespec/compiler@1.9.0(@types/node@25.0.10))) From acc1199ca5883195a0be875a86df86355085a72b Mon Sep 17 00:00:00 2001 From: AutoPrFromHttpClientPython Date: Tue, 24 Feb 2026 18:19:38 +0000 Subject: [PATCH 5/5] Regenerate for typespec-python (2026-02-24 18:19:38) --- .../apiview-properties.json | 12 +- ...cess_client_public_operation_operations.py | 35 ++ ...lient_public_operation_operations_async.py | 36 ++ ...nt_shared_model_in_operation_operations.py | 24 + ...red_model_in_operation_operations_async.py | 25 + .../clientgenerator/core/access/_client.py | 42 +- .../core/access/aio/_client.py | 42 +- .../core/access/aio/operations/__init__.py | 16 +- .../core/access/aio/operations/_operations.py | 52 +- .../core/access/operations/__init__.py | 16 +- .../core/access/operations/_operations.py | 52 +- .../apiview-properties.json | 16 +- ...te_type_client_external_type_operations.py | 54 ++ ...e_client_external_type_operations_async.py | 55 ++ .../core/alternatetype/_client.py | 12 +- .../core/alternatetype/aio/_client.py | 12 +- .../alternatetype/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 20 +- .../core/alternatetype/operations/__init__.py | 4 +- .../alternatetype/operations/_operations.py | 28 +- .../apiview-properties.json | 68 +- ...nt_nested_with_header_client_operations.py | 48 ++ ...ted_with_header_client_operations_async.py | 53 ++ ...ent_nested_with_mixed_client_operations.py | 54 ++ ...sted_with_mixed_client_operations_async.py | 57 ++ ..._nested_with_multiple_client_operations.py | 48 ++ ...d_with_multiple_client_operations_async.py | 53 ++ ...sted_with_param_alias_client_operations.py | 41 ++ ...ith_param_alias_client_operations_async.py | 43 ++ ...rent_nested_with_path_client_operations.py | 48 ++ ...ested_with_path_client_operations_async.py | 51 ++ ...ent_nested_with_query_client_operations.py | 48 ++ ...sted_with_query_client_operations_async.py | 51 ++ .../individuallyparent/_client.py | 94 +-- .../individuallyparent/aio/_client.py | 94 +-- .../aio/operations/__init__.py | 24 +- .../aio/operations/_operations.py | 154 ++--- .../individuallyparent/operations/__init__.py | 24 +- .../operations/_operations.py | 154 ++--- .../apiview-properties.json | 4 +- ...er_to_client_blob_operations_operations.py | 25 + ...client_blob_operations_operations_async.py | 28 + .../core/clientlocation/parameter/_client.py | 14 +- .../clientlocation/parameter/aio/_client.py | 14 +- .../parameter/aio/operations/__init__.py | 4 +- .../parameter/aio/operations/_operations.py | 8 +- .../parameter/operations/__init__.py | 4 +- .../parameter/operations/_operations.py | 8 +- .../apiview-properties.json | 12 +- ..._sub_client_admin_operations_operations.py | 31 + ...lient_admin_operations_operations_async.py | 32 + ...g_sub_client_user_operations_operations.py | 22 + ...client_user_operations_operations_async.py | 23 + .../core/clientlocation/subclient/_client.py | 26 +- .../clientlocation/subclient/aio/_client.py | 26 +- .../subclient/aio/operations/__init__.py | 8 +- .../subclient/aio/operations/_operations.py | 20 +- .../subclient/operations/__init__.py | 8 +- .../subclient/operations/_operations.py | 26 +- .../apiview-properties.json | 8 +- ...ub_client_archive_operations_operations.py | 22 + ...ent_archive_operations_operations_async.py | 23 + ...ub_client_product_operations_operations.py | 22 + ...ent_product_operations_operations_async.py | 23 + .../clientlocation/newsubclient/_client.py | 21 +- .../newsubclient/aio/_client.py | 21 +- .../newsubclient/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 16 +- .../newsubclient/operations/__init__.py | 8 +- .../newsubclient/operations/_operations.py | 20 +- .../apiview-properties.json | 4 +- ...t_client_resource_operations_operations.py | 22 + ...nt_resource_operations_operations_async.py | 23 + .../core/clientlocation/rootclient/_client.py | 11 +- .../clientlocation/rootclient/aio/_client.py | 12 +- .../rootclient/aio/operations/__init__.py | 4 +- .../rootclient/aio/operations/_operations.py | 8 +- .../rootclient/operations/__init__.py | 4 +- .../rootclient/operations/_operations.py | 10 +- .../apiview-properties.json | 20 +- ...ing_client_animal_operations_operations.py | 35 ++ ...ient_animal_operations_operations_async.py | 36 ++ ...ilding_client_dog_operations_operations.py | 24 + ..._client_dog_operations_operations_async.py | 25 + ...ilding_client_pet_operations_operations.py | 35 ++ ..._client_pet_operations_operations_async.py | 36 ++ .../core/hierarchybuilding/_client.py | 37 +- .../core/hierarchybuilding/aio/_client.py | 37 +- .../aio/operations/__init__.py | 12 +- .../aio/operations/_operations.py | 32 +- .../hierarchybuilding/operations/__init__.py | 12 +- .../operations/_operations.py | 42 +- .../apiview-properties.json | 16 +- ...ride_client_group_parameters_operations.py | 25 + ...lient_group_parameters_operations_async.py | 26 + ...nt_remove_optional_parameter_operations.py | 24 + ...ove_optional_parameter_operations_async.py | 25 + ...de_client_reorder_parameters_operations.py | 25 + ...ent_reorder_parameters_operations_async.py | 26 + ...t_require_optional_parameter_operations.py | 25 + ...ire_optional_parameter_operations_async.py | 26 + .../clientgenerator/core/override/_client.py | 42 +- .../core/override/aio/_client.py | 42 +- .../core/override/aio/operations/__init__.py | 16 +- .../override/aio/operations/_operations.py | 32 +- .../core/override/operations/__init__.py | 16 +- .../core/override/operations/_operations.py | 36 +- .../apiview-properties.json | 16 +- ...ge_client_model_in_operation_operations.py | 56 ++ ...ent_model_in_operation_operations_async.py | 57 ++ .../clientgenerator/core/usage/_client.py | 10 +- .../clientgenerator/core/usage/aio/_client.py | 10 +- .../core/usage/aio/operations/__init__.py | 4 +- .../core/usage/aio/operations/_operations.py | 20 +- .../core/usage/operations/__init__.py | 4 +- .../core/usage/operations/_operations.py | 20 +- .../azure-core-model/apiview-properties.json | 12 +- ..._azure_core_embedding_vector_operations.py | 44 ++ ..._core_embedding_vector_operations_async.py | 45 ++ .../specs/azure/core/model/_client.py | 11 +- .../specs/azure/core/model/aio/_client.py | 11 +- .../core/model/aio/operations/__init__.py | 4 +- .../core/model/aio/operations/_operations.py | 16 +- .../azure/core/model/operations/__init__.py | 4 +- .../core/model/operations/_operations.py | 22 +- .../azure-core-page/apiview-properties.json | 8 +- ...ient_two_models_as_page_item_operations.py | 31 + ...wo_models_as_page_item_operations_async.py | 32 + .../specs/azure/core/page/_client.py | 10 +- .../specs/azure/core/page/aio/_client.py | 10 +- .../core/page/aio/operations/__init__.py | 4 +- .../core/page/aio/operations/_operations.py | 12 +- .../azure/core/page/operations/__init__.py | 4 +- .../azure/core/page/operations/_operations.py | 12 +- .../azure-core-scalar/apiview-properties.json | 20 +- ...client_azure_location_scalar_operations.py | 67 ++ ..._azure_location_scalar_operations_async.py | 68 ++ .../specs/azure/core/scalar/_client.py | 10 +- .../specs/azure/core/scalar/aio/_client.py | 10 +- .../core/scalar/aio/operations/__init__.py | 4 +- .../core/scalar/aio/operations/_operations.py | 24 +- .../azure/core/scalar/operations/__init__.py | 4 +- .../core/scalar/operations/_operations.py | 30 +- .../apiview-properties.json | 20 +- .../commonproperties/_client.py | 20 +- .../commonproperties/aio/_client.py | 20 +- .../aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 46 +- .../commonproperties/operations/__init__.py | 8 +- .../operations/_operations.py | 46 +- ...mmon_properties_client_error_operations.py | 57 ++ ...roperties_client_error_operations_async.py | 58 ++ ...ties_client_managed_identity_operations.py | 98 +++ ...lient_managed_identity_operations_async.py | 101 +++ .../apiview-properties.json | 4 +- .../resourcemanager/largeheader/_client.py | 11 +- .../largeheader/aio/_client.py | 11 +- .../largeheader/aio/operations/__init__.py | 4 +- .../largeheader/aio/operations/_operations.py | 8 +- .../largeheader/operations/__init__.py | 4 +- .../largeheader/operations/_operations.py | 8 +- ..._header_client_large_headers_operations.py | 30 + ...r_client_large_headers_operations_async.py | 33 + .../apiview-properties.json | 4 +- .../methodsubscriptionid/_client.py | 40 +- .../methodsubscriptionid/aio/_client.py | 40 +- .../aio/operations/__init__.py | 12 +- .../aio/operations/_operations.py | 102 +-- .../operations/__init__.py | 12 +- .../operations/_operations.py | 134 ++-- ...mixed_subscription_placement_operations.py | 128 ++++ ...subscription_placement_operations_async.py | 131 ++++ ...ription_id_client_operations_operations.py | 27 + ...n_id_client_operations_operations_async.py | 28 + ...ption_resources_method_level_operations.py | 128 ++++ ...resources_method_level_operations_async.py | 129 ++++ .../apiview-properties.json | 16 +- .../combined/_client.py | 18 +- .../combined/aio/_client.py | 18 +- .../combined/aio/operations/__init__.py | 8 +- .../combined/aio/operations/_operations.py | 24 +- .../combined/operations/__init__.py | 8 +- .../combined/operations/_operations.py | 24 +- ...test_combined_combined_disks_operations.py | 59 ++ ...ombined_combined_disks_operations_async.py | 62 ++ ...ed_combined_virtual_machines_operations.py | 59 ++ ...bined_virtual_machines_operations_async.py | 62 ++ .../apiview-properties.json | 16 +- .../combined/_client.py | 18 +- .../combined/aio/_client.py | 18 +- .../combined/aio/operations/__init__.py | 8 +- .../combined/aio/operations/_operations.py | 24 +- .../combined/operations/__init__.py | 8 +- .../combined/operations/_operations.py | 24 +- ...ed_combined_storage_accounts_operations.py | 62 ++ ...bined_storage_accounts_operations_async.py | 65 ++ ...ed_combined_virtual_machines_operations.py | 62 ++ ...bined_virtual_machines_operations_async.py | 65 ++ .../apiview-properties.json | 16 +- .../multiservice/combined/_client.py | 17 +- .../multiservice/combined/aio/_client.py | 17 +- .../combined/aio/operations/__init__.py | 8 +- .../combined/aio/operations/_operations.py | 24 +- .../combined/operations/__init__.py | 8 +- .../combined/operations/_operations.py | 24 +- ...test_combined_combined_disks_operations.py | 59 ++ ...ombined_combined_disks_operations_async.py | 62 ++ ...ed_combined_virtual_machines_operations.py | 59 ++ ...bined_virtual_machines_operations_async.py | 62 ++ .../apiview-properties.json | 8 +- .../resourcemanager/nonresource/_client.py | 11 +- .../nonresource/aio/_client.py | 11 +- .../nonresource/aio/operations/__init__.py | 4 +- .../nonresource/aio/operations/_operations.py | 12 +- .../nonresource/operations/__init__.py | 4 +- .../nonresource/operations/_operations.py | 12 +- ...ient_non_resource_operations_operations.py | 42 ++ ...on_resource_operations_operations_async.py | 43 ++ .../apiview-properties.json | 48 +- .../operationtemplates/_client.py | 61 +- .../operationtemplates/aio/_client.py | 62 +- .../aio/operations/__init__.py | 20 +- .../aio/operations/_operations.py | 70 +-- .../operationtemplates/operations/__init__.py | 20 +- .../operations/_operations.py | 118 ++-- ...ient_check_name_availability_operations.py | 40 ++ ...heck_name_availability_operations_async.py | 41 ++ ...eration_templates_client_lro_operations.py | 79 +++ ...n_templates_client_lro_operations_async.py | 88 +++ ..._templates_client_lro_paging_operations.py | 30 + ...ates_client_lro_paging_operations_async.py | 33 + ..._templates_client_operations_operations.py | 27 + ...ates_client_operations_operations_async.py | 28 + ...mplates_client_optional_body_operations.py | 60 ++ ...s_client_optional_body_operations_async.py | 61 ++ .../apiview-properties.json | 104 ++-- .../resourcemanager/resources/_client.py | 55 +- .../resourcemanager/resources/aio/_client.py | 55 +- .../resources/aio/operations/__init__.py | 20 +- .../resources/aio/operations/_operations.py | 124 ++-- .../resources/operations/__init__.py | 20 +- .../resources/operations/_operations.py | 126 ++-- ..._client_extensions_resources_operations.py | 101 +++ ...t_extensions_resources_operations_async.py | 104 ++++ ...es_client_location_resources_operations.py | 101 +++ ...ent_location_resources_operations_async.py | 102 +++ ...rces_resources_client_nested_operations.py | 106 ++++ ...esources_client_nested_operations_async.py | 113 ++++ ...s_resources_client_singleton_operations.py | 91 +++ ...urces_client_singleton_operations_async.py | 94 +++ ...s_resources_client_top_level_operations.py | 125 ++++ ...urces_client_top_level_operations_async.py | 132 ++++ .../apiview-properties.json | 8 +- .../client/naming/enumconflict/_client.py | 18 +- .../client/naming/enumconflict/aio/_client.py | 19 +- .../enumconflict/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 17 +- .../enumconflict/operations/__init__.py | 8 +- .../enumconflict/operations/_operations.py | 20 +- ...lict_client_first_operations_operations.py | 24 + ...lient_first_operations_operations_async.py | 25 + ...ict_client_second_operations_operations.py | 24 + ...ient_second_operations_operations_async.py | 25 + .../client-naming/apiview-properties.json | 16 +- .../client/naming/main/_client.py | 20 +- .../client/naming/main/aio/_client.py | 20 +- .../naming/main/aio/operations/__init__.py | 8 +- .../naming/main/aio/operations/_operations.py | 24 +- .../client/naming/main/operations/__init__.py | 8 +- .../naming/main/operations/_operations.py | 28 +- ...g_naming_client_model_client_operations.py | 35 ++ ...ng_client_model_client_operations_async.py | 36 ++ ...ing_naming_client_union_enum_operations.py | 37 ++ ...ming_client_union_enum_operations_async.py | 38 ++ .../apiview-properties.json | 16 +- .../structure/clientoperationgroup/_client.py | 33 +- .../clientoperationgroup/aio/_client.py | 33 +- .../aio/operations/__init__.py | 12 +- .../aio/operations/_operations.py | 28 +- .../operations/__init__.py | 12 +- .../operations/_operations.py | 28 +- ...st_first_first_client_group3_operations.py | 31 + ...st_first_client_group3_operations_async.py | 32 + ...st_first_first_client_group4_operations.py | 22 + ...st_first_client_group4_operations_async.py | 23 + ..._second_second_client_group5_operations.py | 22 + ...d_second_client_group5_operations_async.py | 23 + .../apiview-properties.json | 20 +- .../client/structure/service/_client.py | 40 +- .../client/structure/service/aio/_client.py | 40 +- .../service/aio/operations/__init__.py | 16 +- .../service/aio/operations/_operations.py | 60 +- .../structure/service/operations/__init__.py | 16 +- .../service/operations/_operations.py | 60 +- ...t_service_service_client_bar_operations.py | 31 + ...ice_service_client_bar_operations_async.py | 32 + ...t_service_service_client_baz_operations.py | 22 + ...ice_service_client_baz_operations_async.py | 23 + ...t_service_service_client_foo_operations.py | 31 + ...ice_service_client_foo_operations_async.py | 32 + ...t_service_service_client_qux_operations.py | 31 + ...ice_service_client_qux_operations_async.py | 32 + .../apiview-properties.json | 12 +- .../structure/renamedoperation/_client.py | 11 +- .../structure/renamedoperation/aio/_client.py | 11 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 16 +- .../renamedoperation/operations/__init__.py | 4 +- .../operations/_operations.py | 22 +- ...named_operation_client_group_operations.py | 40 ++ ...operation_client_group_operations_async.py | 41 ++ .../apiview-properties.json | 24 +- .../structure/twooperationgroup/_client.py | 20 +- .../twooperationgroup/aio/_client.py | 20 +- .../aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 32 +- .../twooperationgroup/operations/__init__.py | 8 +- .../operations/_operations.py | 34 +- ...peration_group_client_group1_operations.py | 40 ++ ...on_group_client_group1_operations_async.py | 41 ++ ...peration_group_client_group2_operations.py | 40 ++ ...on_group_client_group2_operations_async.py | 41 ++ .../encode-array/apiview-properties.json | 48 +- .../encode-array/encode/array/_client.py | 10 +- .../encode-array/encode/array/aio/_client.py | 10 +- .../array/property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 52 +- .../array/property/operations/__init__.py | 4 +- .../array/property/operations/_operations.py | 62 +- ..._array_array_client_property_operations.py | 145 +++++ ..._array_client_property_operations_async.py | 146 +++++ .../encode-bytes/apiview-properties.json | 88 +-- .../encode-bytes/encode/bytes/_client.py | 50 +- .../encode-bytes/encode/bytes/aio/_client.py | 52 +- .../bytes/header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 20 +- .../bytes/header/operations/__init__.py | 4 +- .../bytes/header/operations/_operations.py | 26 +- .../bytes/property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 20 +- .../bytes/property/operations/__init__.py | 4 +- .../bytes/property/operations/_operations.py | 20 +- .../bytes/query/aio/operations/__init__.py | 4 +- .../bytes/query/aio/operations/_operations.py | 20 +- .../encode/bytes/query/operations/__init__.py | 4 +- .../bytes/query/operations/_operations.py | 24 +- .../requestbody/aio/operations/__init__.py | 4 +- .../requestbody/aio/operations/_operations.py | 24 +- .../bytes/requestbody/operations/__init__.py | 4 +- .../requestbody/operations/_operations.py | 26 +- .../responsebody/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 24 +- .../bytes/responsebody/operations/__init__.py | 4 +- .../responsebody/operations/_operations.py | 28 +- ...st_bytes_bytes_client_header_operations.py | 57 ++ ...es_bytes_client_header_operations_async.py | 58 ++ ..._bytes_bytes_client_property_operations.py | 57 ++ ..._bytes_client_property_operations_async.py | 58 ++ ...est_bytes_bytes_client_query_operations.py | 57 ++ ...tes_bytes_client_query_operations_async.py | 58 ++ ...es_bytes_client_request_body_operations.py | 73 +++ ...es_client_request_body_operations_async.py | 74 +++ ...s_bytes_client_response_body_operations.py | 58 ++ ...s_client_response_body_operations_async.py | 59 ++ .../encode-datetime/apiview-properties.json | 76 +-- .../encode/datetime/_client.py | 41 +- .../encode/datetime/aio/_client.py | 42 +- .../header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 24 +- .../datetime/header/operations/__init__.py | 4 +- .../datetime/header/operations/_operations.py | 32 +- .../property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 24 +- .../datetime/property/operations/__init__.py | 4 +- .../property/operations/_operations.py | 30 +- .../datetime/query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 24 +- .../datetime/query/operations/__init__.py | 4 +- .../datetime/query/operations/_operations.py | 34 +- .../responseheader/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 20 +- .../responseheader/operations/__init__.py | 4 +- .../responseheader/operations/_operations.py | 28 +- ...etime_datetime_client_header_operations.py | 68 ++ ...datetime_client_header_operations_async.py | 69 +++ ...ime_datetime_client_property_operations.py | 68 ++ ...tetime_client_property_operations_async.py | 69 +++ ...tetime_datetime_client_query_operations.py | 68 ++ ..._datetime_client_query_operations_async.py | 69 +++ ...etime_client_response_header_operations.py | 49 ++ ...client_response_header_operations_async.py | 50 ++ .../encode-duration/apiview-properties.json | 168 ++--- .../encode/duration/_client.py | 26 +- .../encode/duration/aio/_client.py | 27 +- .../duration/aio/operations/__init__.py | 12 +- .../duration/aio/operations/_operations.py | 180 +++--- .../encode/duration/operations/__init__.py | 12 +- .../encode/duration/operations/_operations.py | 230 ++++--- ...ation_duration_client_header_operations.py | 167 +++++ ...duration_client_header_operations_async.py | 168 +++++ ...ion_duration_client_property_operations.py | 167 +++++ ...ration_client_property_operations_async.py | 168 +++++ ...ration_duration_client_query_operations.py | 167 +++++ ..._duration_client_query_operations_async.py | 168 +++++ .../encode-numeric/apiview-properties.json | 12 +- .../encode-numeric/encode/numeric/_client.py | 10 +- .../encode/numeric/aio/_client.py | 10 +- .../encode/numeric/aio/operations/__init__.py | 4 +- .../numeric/aio/operations/_operations.py | 16 +- .../encode/numeric/operations/__init__.py | 4 +- .../encode/numeric/operations/_operations.py | 22 +- ...eric_numeric_client_property_operations.py | 46 ++ ...umeric_client_property_operations_async.py | 47 ++ .../parameters-basic/apiview-properties.json | 8 +- ...c_basic_client_explicit_body_operations.py | 24 + ...c_client_explicit_body_operations_async.py | 25 + ...c_basic_client_implicit_body_operations.py | 25 + ...c_client_implicit_body_operations_async.py | 26 + .../parameters/basic/_client.py | 20 +- .../parameters/basic/aio/_client.py | 20 +- .../basic/aio/operations/__init__.py | 8 +- .../basic/aio/operations/_operations.py | 17 +- .../parameters/basic/operations/__init__.py | 8 +- .../basic/operations/_operations.py | 16 +- .../apiview-properties.json | 8 +- ...ity_client_optional_explicit_operations.py | 31 + ...ient_optional_explicit_operations_async.py | 32 + .../parameters/bodyoptionality/_client.py | 10 +- .../parameters/bodyoptionality/aio/_client.py | 11 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 13 +- .../optionalexplicit/operations/__init__.py | 4 +- .../operations/_operations.py | 16 +- .../apiview-properties.json | 20 +- ...lection_format_client_header_operations.py | 24 + ...n_format_client_header_operations_async.py | 25 + ...llection_format_client_query_operations.py | 57 ++ ...on_format_client_query_operations_async.py | 58 ++ .../parameters/collectionformat/_client.py | 22 +- .../collectionformat/aio/_client.py | 22 +- .../header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 8 +- .../header/operations/__init__.py | 4 +- .../header/operations/_operations.py | 10 +- .../query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 20 +- .../query/operations/__init__.py | 4 +- .../query/operations/_operations.py | 28 +- .../parameters-query/apiview-properties.json | 4 +- ..._query_query_client_constant_operations.py | 24 + ..._query_client_constant_operations_async.py | 25 + .../parameters/query/_client.py | 10 +- .../parameters/query/aio/_client.py | 10 +- .../query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 8 +- .../parameters/query/operations/__init__.py | 4 +- .../query/operations/_operations.py | 8 +- .../parameters-spread/apiview-properties.json | 40 +- ...t_spread_spread_client_alias_operations.py | 83 +++ ...ad_spread_client_alias_operations_async.py | 84 +++ ...t_spread_spread_client_model_operations.py | 75 +++ ...ad_spread_client_model_operations_async.py | 76 +++ .../parameters/spread/_client.py | 18 +- .../parameters/spread/aio/_client.py | 18 +- .../spread/aio/operations/__init__.py | 8 +- .../spread/aio/operations/_operations.py | 48 +- .../parameters/spread/operations/__init__.py | 8 +- .../spread/operations/_operations.py | 52 +- .../apiview-properties.json | 16 +- ...iation_client_different_body_operations.py | 35 ++ ..._client_different_body_operations_async.py | 36 ++ ...negotiation_client_same_body_operations.py | 35 ++ ...ation_client_same_body_operations_async.py | 36 ++ .../payload/contentnegotiation/_client.py | 22 +- .../payload/contentnegotiation/aio/_client.py | 22 +- .../aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 24 +- .../contentnegotiation/operations/__init__.py | 8 +- .../operations/_operations.py | 32 +- .../apiview-properties.json | 16 +- ...edia_type_client_string_body_operations.py | 55 ++ ...ype_client_string_body_operations_async.py | 56 ++ .../payload/mediatype/_client.py | 11 +- .../payload/mediatype/aio/_client.py | 11 +- .../stringbody/aio/operations/__init__.py | 4 +- .../stringbody/aio/operations/_operations.py | 20 +- .../stringbody/operations/__init__.py | 4 +- .../stringbody/operations/_operations.py | 28 +- .../payload-multipart/apiview-properties.json | 36 +- ..._multi_part_client_form_data_operations.py | 223 +++++++ ..._part_client_form_data_operations_async.py | 230 +++++++ .../payload/multipart/_client.py | 11 +- .../payload/multipart/aio/_client.py | 11 +- .../multipart/aio/operations/__init__.py | 4 +- .../multipart/aio/operations/_operations.py | 104 ++-- .../payload/multipart/operations/__init__.py | 4 +- .../multipart/operations/_operations.py | 122 ++-- .../payload-pageable/apiview-properties.json | 28 +- ...le_pageable_client_page_size_operations.py | 31 + ...eable_client_page_size_operations_async.py | 32 + ...ent_server_driven_pagination_operations.py | 119 ++++ ...rver_driven_pagination_operations_async.py | 120 ++++ ...geable_client_xml_pagination_operations.py | 31 + ..._client_xml_pagination_operations_async.py | 32 + .../payload/pageable/_client.py | 32 +- .../payload/pageable/aio/_client.py | 33 +- .../pagesize/aio/operations/__init__.py | 4 +- .../pagesize/aio/operations/_operations.py | 12 +- .../pageable/pagesize/operations/__init__.py | 4 +- .../pagesize/operations/_operations.py | 14 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 26 +- .../aio/operations/_operations.py | 65 +- .../operations/_operations.py | 64 +- .../operations/__init__.py | 4 +- .../operations/_operations.py | 30 +- .../xmlpagination/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 12 +- .../xmlpagination/operations/__init__.py | 4 +- .../xmlpagination/operations/_operations.py | 14 +- .../payload-xml/apiview-properties.json | 111 ++-- ...el_with_array_of_model_value_operations.py | 34 + ...h_array_of_model_value_operations_async.py | 35 ++ ..._model_with_attributes_value_operations.py | 34 + ..._with_attributes_value_operations_async.py | 35 ++ ..._model_with_dictionary_value_operations.py | 34 + ..._with_dictionary_value_operations_async.py | 35 ++ ...model_with_empty_array_value_operations.py | 34 + ...with_empty_array_value_operations_async.py | 35 ++ ...del_with_encoded_names_value_operations.py | 34 + ...th_encoded_names_value_operations_async.py | 35 ++ ...el_with_optional_field_value_operations.py | 34 + ...h_optional_field_value_operations_async.py | 35 ++ ...el_with_renamed_arrays_value_operations.py | 34 + ...h_renamed_arrays_value_operations_async.py | 35 ++ ...el_with_renamed_fields_value_operations.py | 34 + ...h_renamed_fields_value_operations_async.py | 35 ++ ...del_with_simple_arrays_value_operations.py | 34 + ...th_simple_arrays_value_operations_async.py | 35 ++ ...client_model_with_text_value_operations.py | 34 + ..._model_with_text_value_operations_async.py | 35 ++ ...l_with_unwrapped_array_value_operations.py | 34 + ..._unwrapped_array_value_operations_async.py | 35 ++ ...ml_client_simple_model_value_operations.py | 34 + ...ent_simple_model_value_operations_async.py | 35 ++ ...l_xml_client_xml_error_value_operations.py | 22 + ...client_xml_error_value_operations_async.py | 23 + .../payload-xml/payload/xml/_client.py | 144 ++--- .../payload-xml/payload/xml/aio/_client.py | 147 ++--- .../payload/xml/aio/operations/__init__.py | 56 +- .../payload/xml/aio/operations/_operations.py | 412 +++---------- .../payload/xml/models/__init__.py | 9 - .../payload-xml/payload/xml/models/_models.py | 79 +-- .../payload/xml/operations/__init__.py | 56 +- .../payload/xml/operations/_operations.py | 506 ++++----------- .../generated/routes/apiview-properties.json | 28 +- ...s_routes_client_in_interface_operations.py | 22 + ...es_client_in_interface_operations_async.py | 23 + ...outes_client_path_parameters_operations.py | 385 ++++++++++++ ...client_path_parameters_operations_async.py | 388 ++++++++++++ ...utes_client_query_parameters_operations.py | 203 ++++++ ...lient_query_parameters_operations_async.py | 204 ++++++ .../azure/generated/routes/routes/_client.py | 29 +- .../generated/routes/routes/aio/_client.py | 30 +- .../routes/routes/aio/operations/__init__.py | 4 +- .../routes/aio/operations/_operations.py | 8 +- .../routes/routes/operations/__init__.py | 4 +- .../routes/routes/operations/_operations.py | 8 +- .../pathparameters/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 36 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../labelexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../matrixexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../pathparameters/operations/__init__.py | 4 +- .../pathparameters/operations/_operations.py | 38 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../pathexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 12 +- .../operations/_operations.py | 12 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../simpleexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 24 +- .../queryparameters/operations/__init__.py | 4 +- .../queryparameters/operations/_operations.py | 26 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../queryexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../apiview-properties.json | 8 +- ...st_json_json_client_property_operations.py | 33 + ...n_json_client_property_operations_async.py | 34 + .../serialization/encodedname/json/_client.py | 11 +- .../encodedname/json/aio/_client.py | 11 +- .../json/aio/operations/__init__.py | 4 +- .../json/aio/operations/_operations.py | 10 +- .../encodedname/json/operations/__init__.py | 4 +- .../json/operations/_operations.py | 12 +- .../apiview-properties.json | 8 +- .../test_combined_combined_bar_operations.py | 24 + ..._combined_combined_bar_operations_async.py | 25 + .../test_combined_combined_foo_operations.py | 24 + ..._combined_combined_foo_operations_async.py | 25 + .../service/multiservice/_client.py | 14 +- .../service/multiservice/aio/_client.py | 14 +- .../multiservice/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 14 +- .../multiservice/operations/__init__.py | 8 +- .../multiservice/operations/_operations.py | 16 +- .../special-words/apiview-properties.json | 412 ++++++------- ...ords_client_model_properties_operations.py | 57 ++ ...lient_model_properties_operations_async.py | 58 ++ ..._special_words_client_models_operations.py | 376 +++++++++++ ...al_words_client_models_operations_async.py | 377 ++++++++++++ ...cial_words_client_operations_operations.py | 310 ++++++++++ ...ords_client_operations_operations_async.py | 311 ++++++++++ ...cial_words_client_parameters_operations.py | 387 ++++++++++++ ...ords_client_parameters_operations_async.py | 388 ++++++++++++ .../special-words/specialwords/_client.py | 42 +- .../special-words/specialwords/aio/_client.py | 42 +- .../specialwords/aio/operations/__init__.py | 16 +- .../aio/operations/_operations.py | 428 ++++++------- .../specialwords/operations/__init__.py | 16 +- .../specialwords/operations/_operations.py | 582 +++++++++++------- .../apiview-properties.json | 24 +- ...n_documentation_client_lists_operations.py | 43 ++ ...mentation_client_lists_operations_async.py | 44 ++ ...ation_client_text_formatting_operations.py | 40 ++ ...client_text_formatting_operations_async.py | 41 ++ .../specs/documentation/_client.py | 21 +- .../specs/documentation/aio/_client.py | 21 +- .../documentation/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 32 +- .../documentation/operations/__init__.py | 8 +- .../documentation/operations/_operations.py | 42 +- .../streaming-jsonl/apiview-properties.json | 8 +- ...est_jsonl_jsonl_client_basic_operations.py | 34 + ...onl_jsonl_client_basic_operations_async.py | 35 ++ .../streaming/jsonl/_client.py | 10 +- .../streaming/jsonl/aio/_client.py | 10 +- .../jsonl/basic/aio/operations/__init__.py | 4 +- .../jsonl/basic/aio/operations/_operations.py | 10 +- .../jsonl/basic/operations/__init__.py | 4 +- .../jsonl/basic/operations/_operations.py | 12 +- .../typetest-array/apiview-properties.json | 112 ++-- ...y_array_client_boolean_value_operations.py | 33 + ...y_client_boolean_value_operations_async.py | 34 + ..._array_client_datetime_value_operations.py | 33 + ..._client_datetime_value_operations_async.py | 34 + ..._array_client_duration_value_operations.py | 33 + ..._client_duration_value_operations_async.py | 34 + ...y_array_client_float32_value_operations.py | 33 + ...y_client_float32_value_operations_async.py | 34 + ...ray_array_client_int32_value_operations.py | 33 + ...ray_client_int32_value_operations_async.py | 34 + ...ray_array_client_int64_value_operations.py | 33 + ...ray_client_int64_value_operations_async.py | 34 + ...ray_array_client_model_value_operations.py | 33 + ...ray_client_model_value_operations_async.py | 34 + ...lient_nullable_boolean_value_operations.py | 33 + ...nullable_boolean_value_operations_async.py | 34 + ..._client_nullable_float_value_operations.py | 33 + ...t_nullable_float_value_operations_async.py | 34 + ..._client_nullable_int32_value_operations.py | 33 + ...t_nullable_int32_value_operations_async.py | 34 + ..._client_nullable_model_value_operations.py | 33 + ...t_nullable_model_value_operations_async.py | 34 + ...client_nullable_string_value_operations.py | 33 + ..._nullable_string_value_operations_async.py | 34 + ...ay_array_client_string_value_operations.py | 33 + ...ay_client_string_value_operations_async.py | 34 + ...y_array_client_unknown_value_operations.py | 33 + ...y_client_unknown_value_operations_async.py | 34 + .../typetest-array/typetest/array/_client.py | 140 +++-- .../typetest/array/aio/_client.py | 144 +++-- .../typetest/array/aio/operations/__init__.py | 56 +- .../array/aio/operations/_operations.py | 168 ++--- .../typetest/array/operations/__init__.py | 56 +- .../typetest/array/operations/_operations.py | 172 +++--- .../apiview-properties.json | 88 +-- ...tionary_client_boolean_value_operations.py | 33 + ...y_client_boolean_value_operations_async.py | 34 + ...ionary_client_datetime_value_operations.py | 33 + ..._client_datetime_value_operations_async.py | 34 + ...ionary_client_duration_value_operations.py | 33 + ..._client_duration_value_operations_async.py | 34 + ...tionary_client_float32_value_operations.py | 33 + ...y_client_float32_value_operations_async.py | 34 + ...ictionary_client_int32_value_operations.py | 33 + ...ary_client_int32_value_operations_async.py | 34 + ...ictionary_client_int64_value_operations.py | 33 + ...ary_client_int64_value_operations_async.py | 34 + ...ictionary_client_model_value_operations.py | 33 + ...ary_client_model_value_operations_async.py | 34 + ..._client_nullable_float_value_operations.py | 33 + ...t_nullable_float_value_operations_async.py | 34 + ...client_recursive_model_value_operations.py | 33 + ..._recursive_model_value_operations_async.py | 34 + ...ctionary_client_string_value_operations.py | 33 + ...ry_client_string_value_operations_async.py | 34 + ...tionary_client_unknown_value_operations.py | 33 + ...y_client_unknown_value_operations_async.py | 34 + .../typetest/dictionary/_client.py | 119 ++-- .../typetest/dictionary/aio/_client.py | 120 ++-- .../dictionary/aio/operations/__init__.py | 44 +- .../dictionary/aio/operations/_operations.py | 132 ++-- .../dictionary/operations/__init__.py | 44 +- .../dictionary/operations/_operations.py | 140 +++-- ...iscriminated_client_envelope_operations.py | 66 ++ ...inated_client_envelope_operations_async.py | 67 ++ ...riminated_client_no_envelope_operations.py | 61 ++ ...ted_client_no_envelope_operations_async.py | 66 ++ .../typetest/discriminatedunion/_client.py | 20 +- .../discriminatedunion/aio/_client.py | 20 +- .../aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 80 +-- .../discriminatedunion/operations/__init__.py | 8 +- .../operations/_operations.py | 90 +-- .../apiview-properties.json | 16 +- ...ble_extensible_client_string_operations.py | 55 ++ ...tensible_client_string_operations_async.py | 56 ++ .../typetest/enum/extensible/_client.py | 11 +- .../typetest/enum/extensible/aio/_client.py | 11 +- .../extensible/aio/operations/__init__.py | 4 +- .../extensible/aio/operations/_operations.py | 20 +- .../enum/extensible/operations/__init__.py | 4 +- .../enum/extensible/operations/_operations.py | 28 +- .../apiview-properties.json | 12 +- ...st_fixed_fixed_client_string_operations.py | 46 ++ ...ed_fixed_client_string_operations_async.py | 47 ++ .../typetest/enum/fixed/_client.py | 10 +- .../typetest/enum/fixed/aio/_client.py | 10 +- .../enum/fixed/aio/operations/__init__.py | 4 +- .../enum/fixed/aio/operations/_operations.py | 16 +- .../enum/fixed/operations/__init__.py | 4 +- .../enum/fixed/operations/_operations.py | 16 +- .../apiview-properties.json | 248 ++++---- ...tends_different_spread_float_operations.py | 35 ++ ...different_spread_float_operations_async.py | 36 ++ ...different_spread_model_array_operations.py | 35 ++ ...ent_spread_model_array_operations_async.py | 40 ++ ...tends_different_spread_model_operations.py | 35 ++ ...different_spread_model_operations_async.py | 36 ++ ...ends_different_spread_string_operations.py | 35 ++ ...ifferent_spread_string_operations_async.py | 40 ++ ...perties_client_extends_float_operations.py | 33 + ...s_client_extends_float_operations_async.py | 36 ++ ...s_client_extends_model_array_operations.py | 33 + ...nt_extends_model_array_operations_async.py | 36 ++ ...perties_client_extends_model_operations.py | 33 + ...s_client_extends_model_operations_async.py | 36 ++ ...erties_client_extends_string_operations.py | 33 + ..._client_extends_string_operations_async.py | 36 ++ ...ient_extends_unknown_derived_operations.py | 35 ++ ...xtends_unknown_derived_operations_async.py | 36 ++ ...xtends_unknown_discriminated_operations.py | 35 ++ ..._unknown_discriminated_operations_async.py | 36 ++ ...rties_client_extends_unknown_operations.py | 33 + ...client_extends_unknown_operations_async.py | 36 ++ ...l_properties_client_is_float_operations.py | 33 + ...erties_client_is_float_operations_async.py | 34 + ...erties_client_is_model_array_operations.py | 33 + ..._client_is_model_array_operations_async.py | 36 ++ ...l_properties_client_is_model_operations.py | 33 + ...erties_client_is_model_operations_async.py | 34 + ..._properties_client_is_string_operations.py | 33 + ...rties_client_is_string_operations_async.py | 36 ++ ...es_client_is_unknown_derived_operations.py | 33 + ...ent_is_unknown_derived_operations_async.py | 36 ++ ...ent_is_unknown_discriminated_operations.py | 35 ++ ..._unknown_discriminated_operations_async.py | 36 ++ ...properties_client_is_unknown_operations.py | 33 + ...ties_client_is_unknown_operations_async.py | 36 ++ ...rties_client_multiple_spread_operations.py | 33 + ...client_multiple_spread_operations_async.py | 36 ++ ...lient_spread_different_float_operations.py | 35 ++ ...spread_different_float_operations_async.py | 36 ++ ...spread_different_model_array_operations.py | 35 ++ ..._different_model_array_operations_async.py | 36 ++ ...lient_spread_different_model_operations.py | 35 ++ ...spread_different_model_operations_async.py | 36 ++ ...ient_spread_different_string_operations.py | 35 ++ ...pread_different_string_operations_async.py | 36 ++ ...operties_client_spread_float_operations.py | 33 + ...es_client_spread_float_operations_async.py | 36 ++ ...es_client_spread_model_array_operations.py | 33 + ...ent_spread_model_array_operations_async.py | 36 ++ ...operties_client_spread_model_operations.py | 33 + ...es_client_spread_model_operations_async.py | 36 ++ ...ord_non_discriminated_union2_operations.py | 39 ++ ...n_discriminated_union2_operations_async.py | 40 ++ ...ord_non_discriminated_union3_operations.py | 39 ++ ...n_discriminated_union3_operations_async.py | 40 ++ ...cord_non_discriminated_union_operations.py | 39 ++ ...on_discriminated_union_operations_async.py | 40 ++ ...s_client_spread_record_union_operations.py | 33 + ...nt_spread_record_union_operations_async.py | 36 ++ ...perties_client_spread_string_operations.py | 33 + ...s_client_spread_string_operations_async.py | 36 ++ .../property/additionalproperties/_client.py | 388 +++++++----- .../additionalproperties/aio/_client.py | 390 +++++++----- .../aio/operations/__init__.py | 124 ++-- .../aio/operations/_operations.py | 372 +++++------ .../operations/__init__.py | 124 ++-- .../operations/_operations.py | 482 +++++++++------ .../apiview-properties.json | 112 ++-- ...llable_nullable_client_bytes_operations.py | 53 ++ ..._nullable_client_bytes_operations_async.py | 54 ++ ...able_client_collections_byte_operations.py | 53 ++ ...lient_collections_byte_operations_async.py | 54 ++ ...ble_client_collections_model_operations.py | 53 ++ ...ient_collections_model_operations_async.py | 54 ++ ...le_client_collections_string_operations.py | 53 ++ ...ent_collections_string_operations_async.py | 54 ++ ...ble_nullable_client_datetime_operations.py | 53 ++ ...llable_client_datetime_operations_async.py | 54 ++ ...ble_nullable_client_duration_operations.py | 53 ++ ...llable_client_duration_operations_async.py | 54 ++ ...lable_nullable_client_string_operations.py | 53 ++ ...nullable_client_string_operations_async.py | 54 ++ .../typetest/property/nullable/_client.py | 71 ++- .../typetest/property/nullable/aio/_client.py | 73 ++- .../nullable/aio/operations/__init__.py | 28 +- .../nullable/aio/operations/_operations.py | 140 ++--- .../property/nullable/operations/__init__.py | 28 +- .../nullable/operations/_operations.py | 180 +++--- .../apiview-properties.json | 256 ++++---- ...ional_client_boolean_literal_operations.py | 53 ++ ...client_boolean_literal_operations_async.py | 54 ++ ...tional_optional_client_bytes_operations.py | 53 ++ ..._optional_client_bytes_operations_async.py | 54 ++ ...onal_client_collections_byte_operations.py | 53 ++ ...lient_collections_byte_operations_async.py | 54 ++ ...nal_client_collections_model_operations.py | 53 ++ ...ient_collections_model_operations_async.py | 54 ++ ...nal_optional_client_datetime_operations.py | 53 ++ ...tional_client_datetime_operations_async.py | 54 ++ ...nal_optional_client_duration_operations.py | 53 ++ ...tional_client_duration_operations_async.py | 54 ++ ...ptional_client_float_literal_operations.py | 53 ++ ...l_client_float_literal_operations_async.py | 54 ++ ..._optional_client_int_literal_operations.py | 53 ++ ...nal_client_int_literal_operations_async.py | 54 ++ ...l_optional_client_plain_date_operations.py | 53 ++ ...onal_client_plain_date_operations_async.py | 54 ++ ...l_optional_client_plain_time_operations.py | 53 ++ ...onal_client_plain_time_operations_async.py | 54 ++ ...client_required_and_optional_operations.py | 53 ++ ..._required_and_optional_operations_async.py | 54 ++ ...tional_client_string_literal_operations.py | 53 ++ ..._client_string_literal_operations_async.py | 54 ++ ...ional_optional_client_string_operations.py | 53 ++ ...optional_client_string_operations_async.py | 54 ++ ...l_client_union_float_literal_operations.py | 53 ++ ...nt_union_float_literal_operations_async.py | 54 ++ ...nal_client_union_int_literal_operations.py | 53 ++ ...ient_union_int_literal_operations_async.py | 54 ++ ..._client_union_string_literal_operations.py | 53 ++ ...t_union_string_literal_operations_async.py | 54 ++ .../typetest/property/optional/_client.py | 168 +++-- .../typetest/property/optional/aio/_client.py | 170 +++-- .../optional/aio/operations/__init__.py | 64 +- .../optional/aio/operations/_operations.py | 320 +++++----- .../property/optional/operations/__init__.py | 64 +- .../optional/operations/_operations.py | 384 +++++++----- .../apiview-properties.json | 232 +++---- ...types_client_boolean_literal_operations.py | 33 + ...client_boolean_literal_operations_async.py | 34 + ...s_value_types_client_boolean_operations.py | 33 + ...e_types_client_boolean_operations_async.py | 34 + ...pes_value_types_client_bytes_operations.py | 33 + ...lue_types_client_bytes_operations_async.py | 34 + ...types_client_collections_int_operations.py | 33 + ...client_collections_int_operations_async.py | 34 + ...pes_client_collections_model_operations.py | 33 + ...ient_collections_model_operations_async.py | 34 + ...es_client_collections_string_operations.py | 33 + ...ent_collections_string_operations_async.py | 34 + ..._value_types_client_datetime_operations.py | 33 + ..._types_client_datetime_operations_async.py | 34 + ...alue_types_client_decimal128_operations.py | 33 + ...ypes_client_decimal128_operations_async.py | 34 + ...s_value_types_client_decimal_operations.py | 33 + ...e_types_client_decimal_operations_async.py | 34 + ...pes_client_dictionary_string_operations.py | 33 + ...ient_dictionary_string_operations_async.py | 34 + ..._value_types_client_duration_operations.py | 33 + ..._types_client_duration_operations_async.py | 34 + ...ypes_value_types_client_enum_operations.py | 33 + ...alue_types_client_enum_operations_async.py | 34 + ...types_client_extensible_enum_operations.py | 33 + ...client_extensible_enum_operations_async.py | 34 + ...e_types_client_float_literal_operations.py | 33 + ...s_client_float_literal_operations_async.py | 34 + ...pes_value_types_client_float_operations.py | 33 + ...lue_types_client_float_operations_async.py | 34 + ...lue_types_client_int_literal_operations.py | 33 + ...pes_client_int_literal_operations_async.py | 34 + ...types_value_types_client_int_operations.py | 33 + ...value_types_client_int_operations_async.py | 34 + ...pes_value_types_client_model_operations.py | 33 + ...lue_types_client_model_operations_async.py | 34 + ...pes_value_types_client_never_operations.py | 33 + ...lue_types_client_never_operations_async.py | 34 + ..._types_client_string_literal_operations.py | 33 + ..._client_string_literal_operations_async.py | 34 + ...es_value_types_client_string_operations.py | 33 + ...ue_types_client_string_operations_async.py | 34 + ...ypes_client_union_enum_value_operations.py | 33 + ...lient_union_enum_value_operations_async.py | 34 + ...s_client_union_float_literal_operations.py | 33 + ...nt_union_float_literal_operations_async.py | 34 + ...pes_client_union_int_literal_operations.py | 33 + ...ient_union_int_literal_operations_async.py | 34 + ..._client_union_string_literal_operations.py | 33 + ...t_union_string_literal_operations_async.py | 34 + ...e_types_client_unknown_array_operations.py | 33 + ...s_client_unknown_array_operations_async.py | 34 + ...ue_types_client_unknown_dict_operations.py | 33 + ...es_client_unknown_dict_operations_async.py | 34 + ...lue_types_client_unknown_int_operations.py | 33 + ...pes_client_unknown_int_operations_async.py | 34 + ..._types_client_unknown_string_operations.py | 33 + ..._client_unknown_string_operations_async.py | 34 + .../typetest/property/valuetypes/_client.py | 316 ++++++---- .../property/valuetypes/aio/_client.py | 319 ++++++---- .../valuetypes/aio/operations/__init__.py | 116 ++-- .../valuetypes/aio/operations/_operations.py | 348 +++++------ .../valuetypes/operations/__init__.py | 116 ++-- .../valuetypes/operations/_operations.py | 376 +++++------ .../typetest-scalar/apiview-properties.json | 64 +- ...scalar_scalar_client_boolean_operations.py | 34 + ..._scalar_client_boolean_operations_async.py | 35 ++ ...calar_client_decimal128_type_operations.py | 45 ++ ...client_decimal128_type_operations_async.py | 46 ++ ...lar_client_decimal128_verify_operations.py | 34 + ...ient_decimal128_verify_operations_async.py | 35 ++ ...r_scalar_client_decimal_type_operations.py | 45 ++ ...ar_client_decimal_type_operations_async.py | 46 ++ ...scalar_client_decimal_verify_operations.py | 34 + ..._client_decimal_verify_operations_async.py | 35 ++ ..._scalar_scalar_client_string_operations.py | 34 + ...r_scalar_client_string_operations_async.py | 35 ++ ...scalar_scalar_client_unknown_operations.py | 34 + ..._scalar_client_unknown_operations_async.py | 35 ++ .../typetest/scalar/_client.py | 72 ++- .../typetest/scalar/aio/_client.py | 72 ++- .../scalar/aio/operations/__init__.py | 28 +- .../scalar/aio/operations/_operations.py | 92 +-- .../typetest/scalar/operations/__init__.py | 28 +- .../typetest/scalar/operations/_operations.py | 104 ++-- .../typetest-union/apiview-properties.json | 80 +-- ...nion_union_client_enums_only_operations.py | 34 + ...nion_client_enums_only_operations_async.py | 35 ++ ...ion_union_client_floats_only_operations.py | 34 + ...ion_client_floats_only_operations_async.py | 35 ++ ...union_union_client_ints_only_operations.py | 34 + ...union_client_ints_only_operations_async.py | 35 ++ ..._union_client_mixed_literals_operations.py | 34 + ..._client_mixed_literals_operations_async.py | 35 ++ ...ion_union_client_mixed_types_operations.py | 48 ++ ...ion_client_mixed_types_operations_async.py | 49 ++ ...ion_union_client_models_only_operations.py | 34 + ...ion_client_models_only_operations_async.py | 35 ++ ...nion_client_string_and_array_operations.py | 34 + ...lient_string_and_array_operations_async.py | 35 ++ ...ient_string_extensible_named_operations.py | 34 + ...tring_extensible_named_operations_async.py | 35 ++ ...ion_client_string_extensible_operations.py | 34 + ...ient_string_extensible_operations_async.py | 35 ++ ...on_union_client_strings_only_operations.py | 34 + ...on_client_strings_only_operations_async.py | 35 ++ .../typetest-union/typetest/union/_client.py | 101 +-- .../typetest/union/aio/_client.py | 105 ++-- .../typetest/union/aio/operations/__init__.py | 40 +- .../union/aio/operations/_operations.py | 120 ++-- .../typetest/union/operations/__init__.py | 40 +- .../typetest/union/operations/_operations.py | 130 ++-- .../versioning-added/apiview-properties.json | 4 +- ...ed_added_client_interface_v2_operations.py | 24 + ...ed_client_interface_v2_operations_async.py | 25 + .../versioning/added/_client.py | 11 +- .../versioning/added/aio/_client.py | 11 +- .../added/aio/operations/__init__.py | 4 +- .../added/aio/operations/_operations.py | 8 +- .../versioning/added/operations/__init__.py | 4 +- .../added/operations/_operations.py | 10 +- .../apiview-properties.json | 4 +- ...ed_from_client_new_interface_operations.py | 24 + ...m_client_new_interface_operations_async.py | 25 + .../versioning/renamedfrom/_client.py | 11 +- .../versioning/renamedfrom/aio/_client.py | 11 +- .../renamedfrom/aio/operations/__init__.py | 4 +- .../renamedfrom/aio/operations/_operations.py | 8 +- .../renamedfrom/operations/__init__.py | 4 +- .../renamedfrom/operations/_operations.py | 10 +- .../encode-array/encode/array/_client.py | 10 +- .../encode-array/encode/array/aio/_client.py | 10 +- .../array/property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 52 +- .../array/property/operations/__init__.py | 4 +- .../array/property/operations/_operations.py | 62 +- .../encode-bytes/encode/bytes/_client.py | 50 +- .../encode-bytes/encode/bytes/aio/_client.py | 52 +- .../bytes/header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 20 +- .../bytes/header/operations/__init__.py | 4 +- .../bytes/header/operations/_operations.py | 26 +- .../bytes/property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 20 +- .../bytes/property/operations/__init__.py | 4 +- .../bytes/property/operations/_operations.py | 20 +- .../bytes/query/aio/operations/__init__.py | 4 +- .../bytes/query/aio/operations/_operations.py | 20 +- .../encode/bytes/query/operations/__init__.py | 4 +- .../bytes/query/operations/_operations.py | 24 +- .../requestbody/aio/operations/__init__.py | 4 +- .../requestbody/aio/operations/_operations.py | 24 +- .../bytes/requestbody/operations/__init__.py | 4 +- .../requestbody/operations/_operations.py | 26 +- .../responsebody/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 24 +- .../bytes/responsebody/operations/__init__.py | 4 +- .../responsebody/operations/_operations.py | 28 +- .../encode/datetime/_client.py | 41 +- .../encode/datetime/aio/_client.py | 42 +- .../header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 24 +- .../datetime/header/operations/__init__.py | 4 +- .../datetime/header/operations/_operations.py | 32 +- .../property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 24 +- .../datetime/property/operations/__init__.py | 4 +- .../property/operations/_operations.py | 30 +- .../datetime/query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 24 +- .../datetime/query/operations/__init__.py | 4 +- .../datetime/query/operations/_operations.py | 34 +- .../responseheader/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 20 +- .../responseheader/operations/__init__.py | 4 +- .../responseheader/operations/_operations.py | 28 +- .../encode/duration/_client.py | 30 +- .../encode/duration/aio/_client.py | 31 +- .../header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 60 +- .../duration/header/operations/__init__.py | 4 +- .../duration/header/operations/_operations.py | 76 ++- .../property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 60 +- .../duration/property/operations/__init__.py | 4 +- .../property/operations/_operations.py | 76 ++- .../duration/query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 60 +- .../duration/query/operations/__init__.py | 4 +- .../duration/query/operations/_operations.py | 78 ++- .../encode-numeric/encode/numeric/_client.py | 10 +- .../encode/numeric/aio/_client.py | 10 +- .../property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 16 +- .../numeric/property/operations/__init__.py | 4 +- .../property/operations/_operations.py | 22 +- .../parameters/basic/_client.py | 22 +- .../parameters/basic/aio/_client.py | 22 +- .../explicitbody/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 8 +- .../basic/explicitbody/operations/__init__.py | 4 +- .../explicitbody/operations/_operations.py | 8 +- .../implicitbody/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 8 +- .../basic/implicitbody/operations/__init__.py | 4 +- .../implicitbody/operations/_operations.py | 8 +- .../parameters/bodyoptionality/_client.py | 10 +- .../parameters/bodyoptionality/aio/_client.py | 11 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 13 +- .../optionalexplicit/operations/__init__.py | 4 +- .../operations/_operations.py | 16 +- .../parameters/collectionformat/_client.py | 22 +- .../collectionformat/aio/_client.py | 22 +- .../header/aio/operations/__init__.py | 4 +- .../header/aio/operations/_operations.py | 8 +- .../header/operations/__init__.py | 4 +- .../header/operations/_operations.py | 10 +- .../query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 20 +- .../query/operations/__init__.py | 4 +- .../query/operations/_operations.py | 28 +- .../parameters/query/_client.py | 10 +- .../parameters/query/aio/_client.py | 10 +- .../query/aio/operations/__init__.py | 4 +- .../query/aio/operations/_operations.py | 8 +- .../parameters/query/operations/__init__.py | 4 +- .../query/operations/_operations.py | 8 +- .../parameters/spread/_client.py | 20 +- .../parameters/spread/aio/_client.py | 20 +- .../spread/alias/aio/operations/__init__.py | 4 +- .../alias/aio/operations/_operations.py | 24 +- .../spread/alias/operations/__init__.py | 4 +- .../spread/alias/operations/_operations.py | 38 +- .../spread/model/aio/operations/__init__.py | 4 +- .../model/aio/operations/_operations.py | 24 +- .../spread/model/operations/__init__.py | 4 +- .../spread/model/operations/_operations.py | 26 +- .../payload/contentnegotiation/_client.py | 24 +- .../payload/contentnegotiation/aio/_client.py | 24 +- .../differentbody/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 12 +- .../differentbody/operations/__init__.py | 4 +- .../differentbody/operations/_operations.py | 16 +- .../samebody/aio/operations/__init__.py | 4 +- .../samebody/aio/operations/_operations.py | 12 +- .../samebody/operations/__init__.py | 4 +- .../samebody/operations/_operations.py | 16 +- .../payload/mediatype/_client.py | 11 +- .../payload/mediatype/aio/_client.py | 11 +- .../stringbody/aio/operations/__init__.py | 4 +- .../stringbody/aio/operations/_operations.py | 20 +- .../stringbody/operations/__init__.py | 4 +- .../stringbody/operations/_operations.py | 28 +- .../payload/multipart/_client.py | 11 +- .../payload/multipart/aio/_client.py | 11 +- .../formdata/aio/operations/__init__.py | 4 +- .../formdata/aio/operations/_operations.py | 52 +- .../file/aio/operations/_operations.py | 16 +- .../formdata/file/operations/_operations.py | 18 +- .../httpparts/aio/operations/_operations.py | 20 +- .../contenttype/aio/operations/_operations.py | 16 +- .../contenttype/operations/_operations.py | 17 +- .../nonstring/aio/operations/_operations.py | 8 +- .../nonstring/operations/_operations.py | 10 +- .../httpparts/operations/_operations.py | 20 +- .../multipart/formdata/operations/__init__.py | 4 +- .../formdata/operations/_operations.py | 64 +- .../payload/pageable/_client.py | 32 +- .../payload/pageable/aio/_client.py | 33 +- .../pagesize/aio/operations/__init__.py | 4 +- .../pagesize/aio/operations/_operations.py | 12 +- .../pageable/pagesize/operations/__init__.py | 4 +- .../pagesize/operations/_operations.py | 14 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 26 +- .../aio/operations/_operations.py | 65 +- .../operations/_operations.py | 64 +- .../operations/__init__.py | 4 +- .../operations/_operations.py | 30 +- .../xmlpagination/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 12 +- .../xmlpagination/operations/__init__.py | 4 +- .../xmlpagination/operations/_operations.py | 14 +- .../payload-xml/payload/xml/_client.py | 144 ++--- .../payload-xml/payload/xml/aio/_client.py | 147 ++--- .../payload/xml/aio/operations/__init__.py | 56 +- .../payload/xml/aio/operations/_operations.py | 400 +++--------- .../payload/xml/models/__init__.py | 9 - .../payload-xml/payload/xml/models/_models.py | 79 +-- .../payload/xml/operations/__init__.py | 56 +- .../payload/xml/operations/_operations.py | 494 ++++----------- .../generated/routes/routes/_client.py | 29 +- .../generated/routes/routes/aio/_client.py | 30 +- .../routes/routes/aio/operations/__init__.py | 4 +- .../routes/aio/operations/_operations.py | 8 +- .../routes/routes/operations/__init__.py | 4 +- .../routes/routes/operations/_operations.py | 8 +- .../pathparameters/aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 36 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../labelexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../matrixexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../pathparameters/operations/__init__.py | 4 +- .../pathparameters/operations/_operations.py | 38 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../pathexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 12 +- .../operations/_operations.py | 12 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../simpleexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 24 +- .../queryparameters/operations/__init__.py | 4 +- .../queryparameters/operations/_operations.py | 26 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../aio/operations/_operations.py | 20 +- .../explode/aio/operations/_operations.py | 16 +- .../explode/operations/_operations.py | 16 +- .../queryexpansion/operations/_operations.py | 20 +- .../standard/aio/operations/_operations.py | 16 +- .../standard/operations/_operations.py | 16 +- .../serialization/encodedname/json/_client.py | 11 +- .../encodedname/json/aio/_client.py | 11 +- .../json/property/aio/operations/__init__.py | 4 +- .../property/aio/operations/_operations.py | 10 +- .../json/property/operations/__init__.py | 4 +- .../json/property/operations/_operations.py | 12 +- .../special-words/specialwords/_client.py | 41 +- .../special-words/specialwords/aio/_client.py | 41 +- .../specialwords/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 276 ++++----- .../aio/operations/__init__.py | 4 +- .../aio/operations/_operations.py | 16 +- .../modelproperties/operations/__init__.py | 4 +- .../modelproperties/operations/_operations.py | 22 +- .../models/aio/operations/__init__.py | 4 +- .../models/aio/operations/_operations.py | 136 ++-- .../models/operations/__init__.py | 4 +- .../models/operations/_operations.py | 154 +++-- .../specialwords/operations/__init__.py | 8 +- .../specialwords/operations/_operations.py | 406 +++++++----- .../specs/documentation/_client.py | 21 +- .../specs/documentation/aio/_client.py | 21 +- .../documentation/aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 32 +- .../documentation/operations/__init__.py | 8 +- .../documentation/operations/_operations.py | 42 +- .../streaming/jsonl/_client.py | 10 +- .../streaming/jsonl/aio/_client.py | 10 +- .../jsonl/basic/aio/operations/__init__.py | 4 +- .../jsonl/basic/aio/operations/_operations.py | 10 +- .../jsonl/basic/operations/__init__.py | 4 +- .../jsonl/basic/operations/_operations.py | 12 +- .../typetest-array/typetest/array/_client.py | 140 +++-- .../typetest/array/aio/_client.py | 144 +++-- .../typetest/array/aio/operations/__init__.py | 56 +- .../array/aio/operations/_operations.py | 168 ++--- .../typetest/array/operations/__init__.py | 56 +- .../typetest/array/operations/_operations.py | 172 +++--- .../typetest/dictionary/_client.py | 119 ++-- .../typetest/dictionary/aio/_client.py | 120 ++-- .../dictionary/aio/operations/__init__.py | 44 +- .../dictionary/aio/operations/_operations.py | 132 ++-- .../dictionary/operations/__init__.py | 44 +- .../dictionary/operations/_operations.py | 140 +++-- .../typetest/discriminatedunion/_client.py | 20 +- .../discriminatedunion/aio/_client.py | 20 +- .../aio/operations/__init__.py | 8 +- .../aio/operations/_operations.py | 80 +-- .../discriminatedunion/operations/__init__.py | 8 +- .../operations/_operations.py | 90 +-- .../typetest/enum/extensible/_client.py | 11 +- .../typetest/enum/extensible/aio/_client.py | 11 +- .../extensible/aio/operations/__init__.py | 4 +- .../extensible/aio/operations/_operations.py | 20 +- .../enum/extensible/operations/__init__.py | 4 +- .../enum/extensible/operations/_operations.py | 28 +- .../typetest/enum/fixed/_client.py | 10 +- .../typetest/enum/fixed/aio/_client.py | 10 +- .../enum/fixed/aio/operations/__init__.py | 4 +- .../enum/fixed/aio/operations/_operations.py | 16 +- .../enum/fixed/operations/__init__.py | 4 +- .../enum/fixed/operations/_operations.py | 16 +- .../property/additionalproperties/_client.py | 388 +++++++----- .../additionalproperties/aio/_client.py | 390 +++++++----- .../aio/operations/__init__.py | 124 ++-- .../aio/operations/_operations.py | 372 +++++------ .../operations/__init__.py | 124 ++-- .../operations/_operations.py | 482 +++++++++------ .../typetest/property/nullable/_client.py | 71 ++- .../typetest/property/nullable/aio/_client.py | 73 ++- .../nullable/aio/operations/__init__.py | 28 +- .../nullable/aio/operations/_operations.py | 140 ++--- .../property/nullable/operations/__init__.py | 28 +- .../nullable/operations/_operations.py | 180 +++--- .../typetest/property/optional/_client.py | 168 +++-- .../typetest/property/optional/aio/_client.py | 170 +++-- .../optional/aio/operations/__init__.py | 64 +- .../optional/aio/operations/_operations.py | 320 +++++----- .../property/optional/operations/__init__.py | 64 +- .../optional/operations/_operations.py | 384 +++++++----- .../typetest/property/valuetypes/_client.py | 316 ++++++---- .../property/valuetypes/aio/_client.py | 319 ++++++---- .../valuetypes/aio/operations/__init__.py | 116 ++-- .../valuetypes/aio/operations/_operations.py | 348 +++++------ .../valuetypes/operations/__init__.py | 116 ++-- .../valuetypes/operations/_operations.py | 376 +++++------ .../typetest/scalar/_client.py | 72 ++- .../typetest/scalar/aio/_client.py | 72 ++- .../scalar/aio/operations/__init__.py | 28 +- .../scalar/aio/operations/_operations.py | 92 +-- .../typetest/scalar/operations/__init__.py | 28 +- .../typetest/scalar/operations/_operations.py | 104 ++-- .../typetest-union/typetest/union/_client.py | 101 +-- .../typetest/union/aio/_client.py | 105 ++-- .../typetest/union/aio/operations/__init__.py | 40 +- .../union/aio/operations/_operations.py | 120 ++-- .../typetest/union/operations/__init__.py | 40 +- .../typetest/union/operations/_operations.py | 130 ++-- .../versioning/added/_client.py | 11 +- .../versioning/added/aio/_client.py | 11 +- .../added/aio/operations/__init__.py | 4 +- .../added/aio/operations/_operations.py | 8 +- .../versioning/added/operations/__init__.py | 4 +- .../added/operations/_operations.py | 10 +- .../versioning/renamedfrom/_client.py | 11 +- .../versioning/renamedfrom/aio/_client.py | 11 +- .../renamedfrom/aio/operations/__init__.py | 4 +- .../renamedfrom/aio/operations/_operations.py | 8 +- .../renamedfrom/operations/__init__.py | 4 +- .../renamedfrom/operations/_operations.py | 10 +- 1345 files changed, 44183 insertions(+), 16614 deletions(-) create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations.py create mode 100644 packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations.py create mode 100644 packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations.py create mode 100644 packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations.py create mode 100644 packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations.py create mode 100644 packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations.py create mode 100644 packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations.py create mode 100644 packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations.py create mode 100644 packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations.py create mode 100644 packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations.py create mode 100644 packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations.py create mode 100644 packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations_async.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations.py create mode 100644 packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations_async.py diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/apiview-properties.json index ebae021ab3..b8e40f5130 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/apiview-properties.json @@ -5,11 +5,11 @@ "specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal": "_Specs_.Azure.ClientGenerator.Core.Access.InternalOperation.PublicDecoratorModelInInternal", "specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.PublicDecoratorModelInPublic", "specs.azure.clientgenerator.core.access.models.SharedModel": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.SharedModel", - "specs.azure.clientgenerator.core.access.operations.PublicOperationOperations.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic", - "specs.azure.clientgenerator.core.access.aio.operations.PublicOperationOperations.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic", - "specs.azure.clientgenerator.core.access.operations.PublicOperationOperations.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic", - "specs.azure.clientgenerator.core.access.aio.operations.PublicOperationOperations.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic", - "specs.azure.clientgenerator.core.access.operations.SharedModelInOperationOperations.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public", - "specs.azure.clientgenerator.core.access.aio.operations.SharedModelInOperationOperations.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public" + "specs.azure.clientgenerator.core.access.operations.AccessClientPublicOperationOperations.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic", + "specs.azure.clientgenerator.core.access.aio.operations.AccessClientPublicOperationOperations.no_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.noDecoratorInPublic", + "specs.azure.clientgenerator.core.access.operations.AccessClientPublicOperationOperations.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic", + "specs.azure.clientgenerator.core.access.aio.operations.AccessClientPublicOperationOperations.public_decorator_in_public": "_Specs_.Azure.ClientGenerator.Core.Access.PublicOperation.publicDecoratorInPublic", + "specs.azure.clientgenerator.core.access.operations.AccessClientSharedModelInOperationOperations.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public", + "specs.azure.clientgenerator.core.access.aio.operations.AccessClientSharedModelInOperationOperations.public": "_Specs_.Azure.ClientGenerator.Core.Access.SharedModelInOperation.public" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations.py new file mode 100644 index 0000000000..a220a4ab8f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AccessClientTestBase, AccessPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAccessAccessClientPublicOperationOperations(AccessClientTestBase): + @AccessPreparer() + @recorded_by_proxy + def test_access_client_public_operation_no_decorator_in_public(self, access_endpoint): + client = self.create_client(endpoint=access_endpoint) + response = client.access_client_public_operation.no_decorator_in_public( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @AccessPreparer() + @recorded_by_proxy + def test_access_client_public_operation_public_decorator_in_public(self, access_endpoint): + client = self.create_client(endpoint=access_endpoint) + response = client.access_client_public_operation.public_decorator_in_public( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations_async.py new file mode 100644 index 0000000000..4606b09146 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_public_operation_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AccessPreparer +from testpreparer_async import AccessClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAccessAccessClientPublicOperationOperationsAsync(AccessClientTestBaseAsync): + @AccessPreparer() + @recorded_by_proxy_async + async def test_access_client_public_operation_no_decorator_in_public(self, access_endpoint): + client = self.create_async_client(endpoint=access_endpoint) + response = await client.access_client_public_operation.no_decorator_in_public( + name="str", + ) + + # please add some check logic here by yourself + # ... + + @AccessPreparer() + @recorded_by_proxy_async + async def test_access_client_public_operation_public_decorator_in_public(self, access_endpoint): + client = self.create_async_client(endpoint=access_endpoint) + response = await client.access_client_public_operation.public_decorator_in_public( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations.py new file mode 100644 index 0000000000..a14e2451e6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AccessClientTestBase, AccessPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAccessAccessClientSharedModelInOperationOperations(AccessClientTestBase): + @AccessPreparer() + @recorded_by_proxy + def test_access_client_shared_model_in_operation_public(self, access_endpoint): + client = self.create_client(endpoint=access_endpoint) + response = client.access_client_shared_model_in_operation.public( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations_async.py new file mode 100644 index 0000000000..4b520daf1c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/generated_tests/test_access_access_client_shared_model_in_operation_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AccessPreparer +from testpreparer_async import AccessClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAccessAccessClientSharedModelInOperationOperationsAsync(AccessClientTestBaseAsync): + @AccessPreparer() + @recorded_by_proxy_async + async def test_access_client_shared_model_in_operation_public(self, access_endpoint): + client = self.create_async_client(endpoint=access_endpoint) + response = await client.access_client_shared_model_in_operation.public( + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_client.py index d9c94e451c..7c89902be2 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/_client.py @@ -17,28 +17,30 @@ from ._configuration import AccessClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - InternalOperationOperations, - PublicOperationOperations, - RelativeModelInOperationOperations, - SharedModelInOperationOperations, + AccessClientInternalOperationOperations, + AccessClientPublicOperationOperations, + AccessClientRelativeModelInOperationOperations, + AccessClientSharedModelInOperationOperations, ) class AccessClient: # pylint: disable=client-accepts-api-version-keyword """Test for internal decorator. - :ivar public_operation: PublicOperationOperations operations - :vartype public_operation: - specs.azure.clientgenerator.core.access.operations.PublicOperationOperations - :ivar internal_operation: InternalOperationOperations operations - :vartype internal_operation: - specs.azure.clientgenerator.core.access.operations.InternalOperationOperations - :ivar shared_model_in_operation: SharedModelInOperationOperations operations - :vartype shared_model_in_operation: - specs.azure.clientgenerator.core.access.operations.SharedModelInOperationOperations - :ivar relative_model_in_operation: RelativeModelInOperationOperations operations - :vartype relative_model_in_operation: - specs.azure.clientgenerator.core.access.operations.RelativeModelInOperationOperations + :ivar access_client_public_operation: AccessClientPublicOperationOperations operations + :vartype access_client_public_operation: + specs.azure.clientgenerator.core.access.operations.AccessClientPublicOperationOperations + :ivar access_client_internal_operation: AccessClientInternalOperationOperations operations + :vartype access_client_internal_operation: + specs.azure.clientgenerator.core.access.operations.AccessClientInternalOperationOperations + :ivar access_client_shared_model_in_operation: AccessClientSharedModelInOperationOperations + operations + :vartype access_client_shared_model_in_operation: + specs.azure.clientgenerator.core.access.operations.AccessClientSharedModelInOperationOperations + :ivar access_client_relative_model_in_operation: AccessClientRelativeModelInOperationOperations + operations + :vartype access_client_relative_model_in_operation: + specs.azure.clientgenerator.core.access.operations.AccessClientRelativeModelInOperationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -71,16 +73,16 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.public_operation = PublicOperationOperations( + self.access_client_public_operation = AccessClientPublicOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internal_operation = InternalOperationOperations( + self.access_client_internal_operation = AccessClientInternalOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.shared_model_in_operation = SharedModelInOperationOperations( + self.access_client_shared_model_in_operation = AccessClientSharedModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.relative_model_in_operation = RelativeModelInOperationOperations( + self.access_client_relative_model_in_operation = AccessClientRelativeModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/_client.py index e731ef7b56..c891f7da3b 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/_client.py @@ -17,28 +17,30 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AccessClientConfiguration from .operations import ( - InternalOperationOperations, - PublicOperationOperations, - RelativeModelInOperationOperations, - SharedModelInOperationOperations, + AccessClientInternalOperationOperations, + AccessClientPublicOperationOperations, + AccessClientRelativeModelInOperationOperations, + AccessClientSharedModelInOperationOperations, ) class AccessClient: # pylint: disable=client-accepts-api-version-keyword """Test for internal decorator. - :ivar public_operation: PublicOperationOperations operations - :vartype public_operation: - specs.azure.clientgenerator.core.access.aio.operations.PublicOperationOperations - :ivar internal_operation: InternalOperationOperations operations - :vartype internal_operation: - specs.azure.clientgenerator.core.access.aio.operations.InternalOperationOperations - :ivar shared_model_in_operation: SharedModelInOperationOperations operations - :vartype shared_model_in_operation: - specs.azure.clientgenerator.core.access.aio.operations.SharedModelInOperationOperations - :ivar relative_model_in_operation: RelativeModelInOperationOperations operations - :vartype relative_model_in_operation: - specs.azure.clientgenerator.core.access.aio.operations.RelativeModelInOperationOperations + :ivar access_client_public_operation: AccessClientPublicOperationOperations operations + :vartype access_client_public_operation: + specs.azure.clientgenerator.core.access.aio.operations.AccessClientPublicOperationOperations + :ivar access_client_internal_operation: AccessClientInternalOperationOperations operations + :vartype access_client_internal_operation: + specs.azure.clientgenerator.core.access.aio.operations.AccessClientInternalOperationOperations + :ivar access_client_shared_model_in_operation: AccessClientSharedModelInOperationOperations + operations + :vartype access_client_shared_model_in_operation: + specs.azure.clientgenerator.core.access.aio.operations.AccessClientSharedModelInOperationOperations + :ivar access_client_relative_model_in_operation: AccessClientRelativeModelInOperationOperations + operations + :vartype access_client_relative_model_in_operation: + specs.azure.clientgenerator.core.access.aio.operations.AccessClientRelativeModelInOperationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -71,16 +73,16 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.public_operation = PublicOperationOperations( + self.access_client_public_operation = AccessClientPublicOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.internal_operation = InternalOperationOperations( + self.access_client_internal_operation = AccessClientInternalOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.shared_model_in_operation = SharedModelInOperationOperations( + self.access_client_shared_model_in_operation = AccessClientSharedModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.relative_model_in_operation = RelativeModelInOperationOperations( + self.access_client_relative_model_in_operation = AccessClientRelativeModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/__init__.py index 4d4e085659..8a3d829446 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PublicOperationOperations # type: ignore -from ._operations import InternalOperationOperations # type: ignore -from ._operations import SharedModelInOperationOperations # type: ignore -from ._operations import RelativeModelInOperationOperations # type: ignore +from ._operations import AccessClientPublicOperationOperations # type: ignore +from ._operations import AccessClientInternalOperationOperations # type: ignore +from ._operations import AccessClientSharedModelInOperationOperations # type: ignore +from ._operations import AccessClientRelativeModelInOperationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PublicOperationOperations", - "InternalOperationOperations", - "SharedModelInOperationOperations", - "RelativeModelInOperationOperations", + "AccessClientPublicOperationOperations", + "AccessClientInternalOperationOperations", + "AccessClientSharedModelInOperationOperations", + "AccessClientRelativeModelInOperationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py index aec498f71b..8cb0bc20d9 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py @@ -27,15 +27,15 @@ from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_internal_operation_internal_decorator_in_internal_request, - build_internal_operation_no_decorator_in_internal_request, - build_internal_operation_public_decorator_in_internal_request, - build_public_operation_no_decorator_in_public_request, - build_public_operation_public_decorator_in_public_request, - build_relative_model_in_operation_discriminator_request, - build_relative_model_in_operation_operation_request, - build_shared_model_in_operation_internal_request, - build_shared_model_in_operation_public_request, + build_access_client_internal_operation_internal_decorator_in_internal_request, + build_access_client_internal_operation_no_decorator_in_internal_request, + build_access_client_internal_operation_public_decorator_in_internal_request, + build_access_client_public_operation_no_decorator_in_public_request, + build_access_client_public_operation_public_decorator_in_public_request, + build_access_client_relative_model_in_operation_discriminator_request, + build_access_client_relative_model_in_operation_operation_request, + build_access_client_shared_model_in_operation_internal_request, + build_access_client_shared_model_in_operation_public_request, ) from .._configuration import AccessClientConfiguration @@ -43,14 +43,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PublicOperationOperations: +class AccessClientPublicOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s - :attr:`public_operation` attribute. + :attr:`access_client_public_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,7 +84,7 @@ async def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.N cls: ClsType[_models.NoDecoratorModelInPublic] = kwargs.pop("cls", None) - _request = build_public_operation_no_decorator_in_public_request( + _request = build_access_client_public_operation_no_decorator_in_public_request( name=name, headers=_headers, params=_params, @@ -144,7 +144,7 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode cls: ClsType[_models.PublicDecoratorModelInPublic] = kwargs.pop("cls", None) - _request = build_public_operation_public_decorator_in_public_request( + _request = build_access_client_public_operation_public_decorator_in_public_request( name=name, headers=_headers, params=_params, @@ -181,14 +181,14 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode return deserialized # type: ignore -class InternalOperationOperations: +class AccessClientInternalOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s - :attr:`internal_operation` attribute. + :attr:`access_client_internal_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -224,7 +224,7 @@ async def _no_decorator_in_internal( cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_no_decorator_in_internal_request( + _request = build_access_client_internal_operation_no_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -289,7 +289,7 @@ async def _internal_decorator_in_internal( cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_internal_decorator_in_internal_request( + _request = build_access_client_internal_operation_internal_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -353,7 +353,7 @@ async def _public_decorator_in_internal( cls: ClsType[_models.PublicDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_public_decorator_in_internal_request( + _request = build_access_client_internal_operation_public_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -390,14 +390,14 @@ async def _public_decorator_in_internal( return deserialized # type: ignore -class SharedModelInOperationOperations: +class AccessClientSharedModelInOperationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s - :attr:`shared_model_in_operation` attribute. + :attr:`access_client_shared_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -430,7 +430,7 @@ async def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel: cls: ClsType[_models.SharedModel] = kwargs.pop("cls", None) - _request = build_shared_model_in_operation_public_request( + _request = build_access_client_shared_model_in_operation_public_request( name=name, headers=_headers, params=_params, @@ -489,7 +489,7 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: cls: ClsType[_models.SharedModel] = kwargs.pop("cls", None) - _request = build_shared_model_in_operation_internal_request( + _request = build_access_client_shared_model_in_operation_internal_request( name=name, headers=_headers, params=_params, @@ -526,14 +526,14 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: return deserialized # type: ignore -class RelativeModelInOperationOperations: +class AccessClientRelativeModelInOperationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.aio.AccessClient`'s - :attr:`relative_model_in_operation` attribute. + :attr:`access_client_relative_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -576,7 +576,7 @@ async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.Outer cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) - _request = build_relative_model_in_operation_operation_request( + _request = build_access_client_relative_model_in_operation_operation_request( name=name, headers=_headers, params=_params, @@ -642,7 +642,7 @@ async def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.A cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) - _request = build_relative_model_in_operation_discriminator_request( + _request = build_access_client_relative_model_in_operation_discriminator_request( kind=kind, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/__init__.py index 4d4e085659..8a3d829446 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PublicOperationOperations # type: ignore -from ._operations import InternalOperationOperations # type: ignore -from ._operations import SharedModelInOperationOperations # type: ignore -from ._operations import RelativeModelInOperationOperations # type: ignore +from ._operations import AccessClientPublicOperationOperations # type: ignore +from ._operations import AccessClientInternalOperationOperations # type: ignore +from ._operations import AccessClientSharedModelInOperationOperations # type: ignore +from ._operations import AccessClientRelativeModelInOperationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PublicOperationOperations", - "InternalOperationOperations", - "SharedModelInOperationOperations", - "RelativeModelInOperationOperations", + "AccessClientPublicOperationOperations", + "AccessClientInternalOperationOperations", + "AccessClientSharedModelInOperationOperations", + "AccessClientRelativeModelInOperationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py index b247db12f3..f78fba2469 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py @@ -36,7 +36,7 @@ _SERIALIZER.client_side_validation = False -def build_public_operation_no_decorator_in_public_request( # pylint: disable=name-too-long +def build_access_client_public_operation_no_decorator_in_public_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -56,7 +56,7 @@ def build_public_operation_no_decorator_in_public_request( # pylint: disable=na return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_public_operation_public_decorator_in_public_request( # pylint: disable=name-too-long +def build_access_client_public_operation_public_decorator_in_public_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -76,7 +76,7 @@ def build_public_operation_public_decorator_in_public_request( # pylint: disabl return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_internal_operation_no_decorator_in_internal_request( # pylint: disable=name-too-long +def build_access_client_internal_operation_no_decorator_in_internal_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -96,7 +96,7 @@ def build_internal_operation_no_decorator_in_internal_request( # pylint: disabl return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_internal_operation_internal_decorator_in_internal_request( # pylint: disable=name-too-long +def build_access_client_internal_operation_internal_decorator_in_internal_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -116,7 +116,7 @@ def build_internal_operation_internal_decorator_in_internal_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_internal_operation_public_decorator_in_internal_request( # pylint: disable=name-too-long +def build_access_client_internal_operation_public_decorator_in_internal_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -136,7 +136,7 @@ def build_internal_operation_public_decorator_in_internal_request( # pylint: di return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_shared_model_in_operation_public_request( # pylint: disable=name-too-long +def build_access_client_shared_model_in_operation_public_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -156,7 +156,7 @@ def build_shared_model_in_operation_public_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_shared_model_in_operation_internal_request( # pylint: disable=name-too-long +def build_access_client_shared_model_in_operation_internal_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -176,7 +176,7 @@ def build_shared_model_in_operation_internal_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_relative_model_in_operation_operation_request( # pylint: disable=name-too-long +def build_access_client_relative_model_in_operation_operation_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -196,7 +196,7 @@ def build_relative_model_in_operation_operation_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_relative_model_in_operation_discriminator_request( # pylint: disable=name-too-long +def build_access_client_relative_model_in_operation_discriminator_request( # pylint: disable=name-too-long *, kind: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -216,14 +216,14 @@ def build_relative_model_in_operation_discriminator_request( # pylint: disable= return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class PublicOperationOperations: +class AccessClientPublicOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.AccessClient`'s - :attr:`public_operation` attribute. + :attr:`access_client_public_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -257,7 +257,7 @@ def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.NoDecor cls: ClsType[_models.NoDecoratorModelInPublic] = kwargs.pop("cls", None) - _request = build_public_operation_no_decorator_in_public_request( + _request = build_access_client_public_operation_no_decorator_in_public_request( name=name, headers=_headers, params=_params, @@ -317,7 +317,7 @@ def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.Pub cls: ClsType[_models.PublicDecoratorModelInPublic] = kwargs.pop("cls", None) - _request = build_public_operation_public_decorator_in_public_request( + _request = build_access_client_public_operation_public_decorator_in_public_request( name=name, headers=_headers, params=_params, @@ -354,14 +354,14 @@ def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.Pub return deserialized # type: ignore -class InternalOperationOperations: +class AccessClientInternalOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.AccessClient`'s - :attr:`internal_operation` attribute. + :attr:`access_client_internal_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -395,7 +395,7 @@ def _no_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models._mod cls: ClsType[_models._models.NoDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_no_decorator_in_internal_request( + _request = build_access_client_internal_operation_no_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -460,7 +460,7 @@ def _internal_decorator_in_internal( cls: ClsType[_models._models.InternalDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_internal_decorator_in_internal_request( + _request = build_access_client_internal_operation_internal_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -522,7 +522,7 @@ def _public_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models. cls: ClsType[_models.PublicDecoratorModelInInternal] = kwargs.pop("cls", None) - _request = build_internal_operation_public_decorator_in_internal_request( + _request = build_access_client_internal_operation_public_decorator_in_internal_request( name=name, headers=_headers, params=_params, @@ -559,14 +559,14 @@ def _public_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models. return deserialized # type: ignore -class SharedModelInOperationOperations: +class AccessClientSharedModelInOperationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.AccessClient`'s - :attr:`shared_model_in_operation` attribute. + :attr:`access_client_shared_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -599,7 +599,7 @@ def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel: cls: ClsType[_models.SharedModel] = kwargs.pop("cls", None) - _request = build_shared_model_in_operation_public_request( + _request = build_access_client_shared_model_in_operation_public_request( name=name, headers=_headers, params=_params, @@ -658,7 +658,7 @@ def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: cls: ClsType[_models.SharedModel] = kwargs.pop("cls", None) - _request = build_shared_model_in_operation_internal_request( + _request = build_access_client_shared_model_in_operation_internal_request( name=name, headers=_headers, params=_params, @@ -695,14 +695,14 @@ def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel: return deserialized # type: ignore -class RelativeModelInOperationOperations: +class AccessClientRelativeModelInOperationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.access.AccessClient`'s - :attr:`relative_model_in_operation` attribute. + :attr:`access_client_relative_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -745,7 +745,7 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel: cls: ClsType[_models._models.OuterModel] = kwargs.pop("cls", None) - _request = build_relative_model_in_operation_operation_request( + _request = build_access_client_relative_model_in_operation_operation_request( name=name, headers=_headers, params=_params, @@ -811,7 +811,7 @@ def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.Abstrac cls: ClsType[_models._models.AbstractModel] = kwargs.pop("cls", None) - _request = build_relative_model_in_operation_discriminator_request( + _request = build_access_client_relative_model_in_operation_discriminator_request( kind=kind, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/apiview-properties.json index a030a996a8..e0d31a654f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/apiview-properties.json @@ -3,13 +3,13 @@ "CrossLanguageDefinitionId": { "specs.azure.clientgenerator.core.alternatetype.models.Geometry": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.Geometry", "specs.azure.clientgenerator.core.alternatetype.models.ModelWithFeatureProperty": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.ModelWithFeatureProperty", - "specs.azure.clientgenerator.core.alternatetype.operations.ExternalTypeOperations.get_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getModel", - "specs.azure.clientgenerator.core.alternatetype.aio.operations.ExternalTypeOperations.get_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getModel", - "specs.azure.clientgenerator.core.alternatetype.operations.ExternalTypeOperations.put_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putModel", - "specs.azure.clientgenerator.core.alternatetype.aio.operations.ExternalTypeOperations.put_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putModel", - "specs.azure.clientgenerator.core.alternatetype.operations.ExternalTypeOperations.get_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getProperty", - "specs.azure.clientgenerator.core.alternatetype.aio.operations.ExternalTypeOperations.get_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getProperty", - "specs.azure.clientgenerator.core.alternatetype.operations.ExternalTypeOperations.put_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putProperty", - "specs.azure.clientgenerator.core.alternatetype.aio.operations.ExternalTypeOperations.put_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putProperty" + "specs.azure.clientgenerator.core.alternatetype.operations.AlternateTypeClientExternalTypeOperations.get_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getModel", + "specs.azure.clientgenerator.core.alternatetype.aio.operations.AlternateTypeClientExternalTypeOperations.get_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getModel", + "specs.azure.clientgenerator.core.alternatetype.operations.AlternateTypeClientExternalTypeOperations.put_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putModel", + "specs.azure.clientgenerator.core.alternatetype.aio.operations.AlternateTypeClientExternalTypeOperations.put_model": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putModel", + "specs.azure.clientgenerator.core.alternatetype.operations.AlternateTypeClientExternalTypeOperations.get_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getProperty", + "specs.azure.clientgenerator.core.alternatetype.aio.operations.AlternateTypeClientExternalTypeOperations.get_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.getProperty", + "specs.azure.clientgenerator.core.alternatetype.operations.AlternateTypeClientExternalTypeOperations.put_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putProperty", + "specs.azure.clientgenerator.core.alternatetype.aio.operations.AlternateTypeClientExternalTypeOperations.put_property": "_Specs_.Azure.ClientGenerator.Core.AlternateType.ExternalType.putProperty" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations.py new file mode 100644 index 0000000000..e0ddfb0804 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AlternateTypeClientTestBase, AlternateTypePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAlternateTypeAlternateTypeClientExternalTypeOperations(AlternateTypeClientTestBase): + @AlternateTypePreparer() + @recorded_by_proxy + def test_alternate_type_client_external_type_get_model(self, alternatetype_endpoint): + client = self.create_client(endpoint=alternatetype_endpoint) + response = client.alternate_type_client_external_type.get_model() + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy + def test_alternate_type_client_external_type_put_model(self, alternatetype_endpoint): + client = self.create_client(endpoint=alternatetype_endpoint) + response = client.alternate_type_client_external_type.put_model( + body="geojson.Feature(...)", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy + def test_alternate_type_client_external_type_get_property(self, alternatetype_endpoint): + client = self.create_client(endpoint=alternatetype_endpoint) + response = client.alternate_type_client_external_type.get_property() + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy + def test_alternate_type_client_external_type_put_property(self, alternatetype_endpoint): + client = self.create_client(endpoint=alternatetype_endpoint) + response = client.alternate_type_client_external_type.put_property( + body={"additionalProperty": "str", "feature": "geojson.Feature(...)"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations_async.py new file mode 100644 index 0000000000..ce259fe6b0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/generated_tests/test_alternate_type_alternate_type_client_external_type_operations_async.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AlternateTypePreparer +from testpreparer_async import AlternateTypeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAlternateTypeAlternateTypeClientExternalTypeOperationsAsync(AlternateTypeClientTestBaseAsync): + @AlternateTypePreparer() + @recorded_by_proxy_async + async def test_alternate_type_client_external_type_get_model(self, alternatetype_endpoint): + client = self.create_async_client(endpoint=alternatetype_endpoint) + response = await client.alternate_type_client_external_type.get_model() + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy_async + async def test_alternate_type_client_external_type_put_model(self, alternatetype_endpoint): + client = self.create_async_client(endpoint=alternatetype_endpoint) + response = await client.alternate_type_client_external_type.put_model( + body="geojson.Feature(...)", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy_async + async def test_alternate_type_client_external_type_get_property(self, alternatetype_endpoint): + client = self.create_async_client(endpoint=alternatetype_endpoint) + response = await client.alternate_type_client_external_type.get_property() + + # please add some check logic here by yourself + # ... + + @AlternateTypePreparer() + @recorded_by_proxy_async + async def test_alternate_type_client_external_type_put_property(self, alternatetype_endpoint): + client = self.create_async_client(endpoint=alternatetype_endpoint) + response = await client.alternate_type_client_external_type.put_property( + body={"additionalProperty": "str", "feature": "geojson.Feature(...)"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/_client.py index 5f6f4f3a36..f293af0648 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/_client.py @@ -16,15 +16,15 @@ from ._configuration import AlternateTypeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ExternalTypeOperations +from .operations import AlternateTypeClientExternalTypeOperations class AlternateTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test for alternate type decorator. - :ivar external_type: ExternalTypeOperations operations - :vartype external_type: - specs.azure.clientgenerator.core.alternatetype.operations.ExternalTypeOperations + :ivar alternate_type_client_external_type: AlternateTypeClientExternalTypeOperations operations + :vartype alternate_type_client_external_type: + specs.azure.clientgenerator.core.alternatetype.operations.AlternateTypeClientExternalTypeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.external_type = ExternalTypeOperations(self._client, self._config, self._serialize, self._deserialize) + self.alternate_type_client_external_type = AlternateTypeClientExternalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/_client.py index 700583712c..1f49bb6fb2 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/_client.py @@ -16,15 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AlternateTypeClientConfiguration -from .operations import ExternalTypeOperations +from .operations import AlternateTypeClientExternalTypeOperations class AlternateTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test for alternate type decorator. - :ivar external_type: ExternalTypeOperations operations - :vartype external_type: - specs.azure.clientgenerator.core.alternatetype.aio.operations.ExternalTypeOperations + :ivar alternate_type_client_external_type: AlternateTypeClientExternalTypeOperations operations + :vartype alternate_type_client_external_type: + specs.azure.clientgenerator.core.alternatetype.aio.operations.AlternateTypeClientExternalTypeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.external_type = ExternalTypeOperations(self._client, self._config, self._serialize, self._deserialize) + self.alternate_type_client_external_type = AlternateTypeClientExternalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/__init__.py index 3d70eabcd5..42e7da7ec2 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExternalTypeOperations # type: ignore +from ._operations import AlternateTypeClientExternalTypeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExternalTypeOperations", + "AlternateTypeClientExternalTypeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/_operations.py index 87bcba7cfc..0403fdde73 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/aio/operations/_operations.py @@ -32,10 +32,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_external_type_get_model_request, - build_external_type_get_property_request, - build_external_type_put_model_request, - build_external_type_put_property_request, + build_alternate_type_client_external_type_get_model_request, + build_alternate_type_client_external_type_get_property_request, + build_alternate_type_client_external_type_put_model_request, + build_alternate_type_client_external_type_put_property_request, ) from .._configuration import AlternateTypeClientConfiguration @@ -44,14 +44,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ExternalTypeOperations: +class AlternateTypeClientExternalTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.alternatetype.aio.AlternateTypeClient`'s - :attr:`external_type` attribute. + :attr:`alternate_type_client_external_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -82,7 +82,7 @@ async def get_model(self, **kwargs: Any) -> geojson.Feature: cls: ClsType[geojson.Feature] = kwargs.pop("cls", None) - _request = build_external_type_get_model_request( + _request = build_alternate_type_client_external_type_get_model_request( headers=_headers, params=_params, ) @@ -143,7 +143,7 @@ async def put_model(self, body: geojson.Feature, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_external_type_put_model_request( + _request = build_alternate_type_client_external_type_put_model_request( content_type=content_type, content=_content, headers=_headers, @@ -190,7 +190,7 @@ async def get_property(self, **kwargs: Any) -> _models.ModelWithFeatureProperty: cls: ClsType[_models.ModelWithFeatureProperty] = kwargs.pop("cls", None) - _request = build_external_type_get_property_request( + _request = build_alternate_type_client_external_type_get_property_request( headers=_headers, params=_params, ) @@ -301,7 +301,7 @@ async def put_property(self, body: Union[_models.ModelWithFeatureProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_external_type_put_property_request( + _request = build_alternate_type_client_external_type_put_property_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/__init__.py index 3d70eabcd5..42e7da7ec2 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExternalTypeOperations # type: ignore +from ._operations import AlternateTypeClientExternalTypeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExternalTypeOperations", + "AlternateTypeClientExternalTypeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/_operations.py index d6ab2c2759..54a09006c4 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-alternate-type/specs/azure/clientgenerator/core/alternatetype/operations/_operations.py @@ -41,7 +41,9 @@ _SERIALIZER.client_side_validation = False -def build_external_type_get_model_request(**kwargs: Any) -> HttpRequest: +def build_alternate_type_client_external_type_get_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -55,7 +57,9 @@ def build_external_type_get_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_external_type_put_model_request(**kwargs: Any) -> HttpRequest: +def build_alternate_type_client_external_type_put_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -68,7 +72,9 @@ def build_external_type_put_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_external_type_get_property_request(**kwargs: Any) -> HttpRequest: +def build_alternate_type_client_external_type_get_property_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -82,7 +88,9 @@ def build_external_type_get_property_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_external_type_put_property_request(**kwargs: Any) -> HttpRequest: +def build_alternate_type_client_external_type_put_property_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -96,14 +104,14 @@ def build_external_type_put_property_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ExternalTypeOperations: +class AlternateTypeClientExternalTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.alternatetype.AlternateTypeClient`'s - :attr:`external_type` attribute. + :attr:`alternate_type_client_external_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -134,7 +142,7 @@ def get_model(self, **kwargs: Any) -> geojson.Feature: cls: ClsType[geojson.Feature] = kwargs.pop("cls", None) - _request = build_external_type_get_model_request( + _request = build_alternate_type_client_external_type_get_model_request( headers=_headers, params=_params, ) @@ -195,7 +203,7 @@ def put_model(self, body: geojson.Feature, **kwargs: Any) -> None: # pylint: di _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_external_type_put_model_request( + _request = build_alternate_type_client_external_type_put_model_request( content_type=content_type, content=_content, headers=_headers, @@ -242,7 +250,7 @@ def get_property(self, **kwargs: Any) -> _models.ModelWithFeatureProperty: cls: ClsType[_models.ModelWithFeatureProperty] = kwargs.pop("cls", None) - _request = build_external_type_get_property_request( + _request = build_alternate_type_client_external_type_get_property_request( headers=_headers, params=_params, ) @@ -355,7 +363,7 @@ def put_property( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_external_type_put_property_request( + _request = build_alternate_type_client_external_type_put_property_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/apiview-properties.json index 90f78d67f2..8bfa374b2f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/apiview-properties.json @@ -2,39 +2,39 @@ "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient", "CrossLanguageDefinitionId": { "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.models.BlobProperties": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.BlobProperties", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithPathClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithPathClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithPathClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithPathClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithPathClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithPathClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithQueryClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithQueryClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithQueryClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithQueryClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithQueryClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithQueryClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithHeaderClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithHeaderClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithHeaderClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithHeaderClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithHeaderClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithHeaderClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMultipleClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMultipleClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMultipleClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMultipleClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMultipleClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMultipleClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMixedClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMixedClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.withQuery", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMixedClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMixedClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.getStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMixedClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMixedClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.deleteStandalone", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithParamAliasClientOperations.with_aliased_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withAliasedName", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithParamAliasClientOperations.with_aliased_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withAliasedName", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithParamAliasClientOperations.with_original_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withOriginalName", - "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithParamAliasClientOperations.with_original_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withOriginalName" + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithPathClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithQueryClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithHeaderClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMultipleClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.with_query": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.withQuery", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.get_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.getStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations.delete_standalone": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithMixedClient.deleteStandalone", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations.with_aliased_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withAliasedName", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations.with_aliased_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withAliasedName", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations.with_original_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withOriginalName", + "specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations.with_original_name": "_Specs_.Azure.ClientGenerator.Core.ClientInitialization.IndividuallyParentClient.IndividuallyParentNestedWithParamAliasClient.withOriginalName" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations.py new file mode 100644 index 0000000000..3781cb8e36 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_header_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_header_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_header_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_header_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_header_client.delete_standalone() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations_async.py new file mode 100644 index 0000000000..6b9883c744 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_header_client_operations_async.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_header_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_header_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_header_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_header_client.get_standalone() + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_header_client.delete_standalone() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations.py new file mode 100644 index 0000000000..753a3ecff9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_mixed_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_mixed_client.with_query( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_mixed_client.get_standalone( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_mixed_client.delete_standalone( + region="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations_async.py new file mode 100644 index 0000000000..779992dd7a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_mixed_client_operations_async.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithMixedClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_mixed_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_mixed_client.with_query( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_mixed_client.get_standalone( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_mixed_client.delete_standalone( + region="str", + ) + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations.py new file mode 100644 index 0000000000..2d660e1854 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_multiple_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_multiple_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_multiple_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_multiple_client.delete_standalone() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations_async.py new file mode 100644 index 0000000000..575dc865cb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_multiple_client_operations_async.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_multiple_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_multiple_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_multiple_client.get_standalone() + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_multiple_client.delete_standalone() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations.py new file mode 100644 index 0000000000..6befd5c2d7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = ( + client.individually_parent_client_individually_parent_nested_with_param_alias_client.with_aliased_name() + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = ( + client.individually_parent_client_individually_parent_nested_with_param_alias_client.with_original_name() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations_async.py new file mode 100644 index 0000000000..ef6af69427 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_param_alias_client_operations_async.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_param_alias_client.with_aliased_name() + ) + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_param_alias_client.with_original_name() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations.py new file mode 100644 index 0000000000..67cc36ed07 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithPathClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_path_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_path_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_path_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_path_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_path_client.delete_standalone() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations_async.py new file mode 100644 index 0000000000..287dab7be1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_path_client_operations_async.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithPathClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_path_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_path_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_path_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_path_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_path_client.delete_standalone() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations.py new file mode 100644 index 0000000000..d571129956 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import IndividuallyParentClientTestBase, IndividuallyParentPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations( + IndividuallyParentClientTestBase +): + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_query_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_query_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_query_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_query_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy + def test_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_client(endpoint=individuallyparent_endpoint) + response = client.individually_parent_client_individually_parent_nested_with_query_client.delete_standalone() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations_async.py new file mode 100644 index 0000000000..8cbe080b6a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/generated_tests/test_individually_parent_individually_parent_client_individually_parent_nested_with_query_client_operations_async.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import IndividuallyParentPreparer +from testpreparer_async import IndividuallyParentClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestIndividuallyParentIndividuallyParentClientIndividuallyParentNestedWithQueryClientOperationsAsync( + IndividuallyParentClientTestBaseAsync +): + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_query_client_with_query( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_query_client.with_query() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_query_client_get_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = await client.individually_parent_client_individually_parent_nested_with_query_client.get_standalone() + + # please add some check logic here by yourself + # ... + + @IndividuallyParentPreparer() + @recorded_by_proxy_async + async def test_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone( + self, individuallyparent_endpoint + ): + client = self.create_async_client(endpoint=individuallyparent_endpoint) + response = ( + await client.individually_parent_client_individually_parent_nested_with_query_client.delete_standalone() + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/_client.py index 421a939dd5..d38c19ece0 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/_client.py @@ -18,42 +18,42 @@ from ._configuration import IndividuallyParentClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - IndividuallyParentNestedWithHeaderClientOperations, - IndividuallyParentNestedWithMixedClientOperations, - IndividuallyParentNestedWithMultipleClientOperations, - IndividuallyParentNestedWithParamAliasClientOperations, - IndividuallyParentNestedWithPathClientOperations, - IndividuallyParentNestedWithQueryClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations, ) class IndividuallyParentClient: # pylint: disable=client-accepts-api-version-keyword """Test for client initialization decorator - moving parameters from method to client level. - :ivar individually_parent_nested_with_path_client: - IndividuallyParentNestedWithPathClientOperations operations - :vartype individually_parent_nested_with_path_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithPathClientOperations - :ivar individually_parent_nested_with_query_client: - IndividuallyParentNestedWithQueryClientOperations operations - :vartype individually_parent_nested_with_query_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithQueryClientOperations - :ivar individually_parent_nested_with_header_client: - IndividuallyParentNestedWithHeaderClientOperations operations - :vartype individually_parent_nested_with_header_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithHeaderClientOperations - :ivar individually_parent_nested_with_multiple_client: - IndividuallyParentNestedWithMultipleClientOperations operations - :vartype individually_parent_nested_with_multiple_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMultipleClientOperations - :ivar individually_parent_nested_with_mixed_client: - IndividuallyParentNestedWithMixedClientOperations operations - :vartype individually_parent_nested_with_mixed_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithMixedClientOperations - :ivar individually_parent_nested_with_param_alias_client: - IndividuallyParentNestedWithParamAliasClientOperations operations - :vartype individually_parent_nested_with_param_alias_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentNestedWithParamAliasClientOperations + :ivar individually_parent_client_individually_parent_nested_with_path_client: + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_path_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations + :ivar individually_parent_client_individually_parent_nested_with_query_client: + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_query_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations + :ivar individually_parent_client_individually_parent_nested_with_header_client: + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_header_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations + :ivar individually_parent_client_individually_parent_nested_with_multiple_client: + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_multiple_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations + :ivar individually_parent_client_individually_parent_nested_with_mixed_client: + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_mixed_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations + :ivar individually_parent_client_individually_parent_nested_with_param_alias_client: + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_param_alias_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations :param blob_name: The blob name to use for operations. Required. :type blob_name: str :param name: The name to use for operations. Required. @@ -94,23 +94,33 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.individually_parent_nested_with_path_client = IndividuallyParentNestedWithPathClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_path_client = ( + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_query_client = IndividuallyParentNestedWithQueryClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_query_client = ( + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_header_client = IndividuallyParentNestedWithHeaderClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_header_client = ( + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_multiple_client = IndividuallyParentNestedWithMultipleClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_multiple_client = ( + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_mixed_client = IndividuallyParentNestedWithMixedClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_mixed_client = ( + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_param_alias_client = ( - IndividuallyParentNestedWithParamAliasClientOperations( + self.individually_parent_client_individually_parent_nested_with_param_alias_client = ( + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations( self._client, self._config, self._serialize, self._deserialize ) ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/_client.py index 0dcd88c302..8fbb898717 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/_client.py @@ -18,42 +18,42 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import IndividuallyParentClientConfiguration from .operations import ( - IndividuallyParentNestedWithHeaderClientOperations, - IndividuallyParentNestedWithMixedClientOperations, - IndividuallyParentNestedWithMultipleClientOperations, - IndividuallyParentNestedWithParamAliasClientOperations, - IndividuallyParentNestedWithPathClientOperations, - IndividuallyParentNestedWithQueryClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations, + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations, ) class IndividuallyParentClient: # pylint: disable=client-accepts-api-version-keyword """Test for client initialization decorator - moving parameters from method to client level. - :ivar individually_parent_nested_with_path_client: - IndividuallyParentNestedWithPathClientOperations operations - :vartype individually_parent_nested_with_path_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithPathClientOperations - :ivar individually_parent_nested_with_query_client: - IndividuallyParentNestedWithQueryClientOperations operations - :vartype individually_parent_nested_with_query_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithQueryClientOperations - :ivar individually_parent_nested_with_header_client: - IndividuallyParentNestedWithHeaderClientOperations operations - :vartype individually_parent_nested_with_header_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithHeaderClientOperations - :ivar individually_parent_nested_with_multiple_client: - IndividuallyParentNestedWithMultipleClientOperations operations - :vartype individually_parent_nested_with_multiple_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMultipleClientOperations - :ivar individually_parent_nested_with_mixed_client: - IndividuallyParentNestedWithMixedClientOperations operations - :vartype individually_parent_nested_with_mixed_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithMixedClientOperations - :ivar individually_parent_nested_with_param_alias_client: - IndividuallyParentNestedWithParamAliasClientOperations operations - :vartype individually_parent_nested_with_param_alias_client: - specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentNestedWithParamAliasClientOperations + :ivar individually_parent_client_individually_parent_nested_with_path_client: + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_path_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations + :ivar individually_parent_client_individually_parent_nested_with_query_client: + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_query_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations + :ivar individually_parent_client_individually_parent_nested_with_header_client: + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_header_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations + :ivar individually_parent_client_individually_parent_nested_with_multiple_client: + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_multiple_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations + :ivar individually_parent_client_individually_parent_nested_with_mixed_client: + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_mixed_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations + :ivar individually_parent_client_individually_parent_nested_with_param_alias_client: + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations operations + :vartype individually_parent_client_individually_parent_nested_with_param_alias_client: + specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.operations.IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations :param blob_name: The blob name to use for operations. Required. :type blob_name: str :param name: The name to use for operations. Required. @@ -94,23 +94,33 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.individually_parent_nested_with_path_client = IndividuallyParentNestedWithPathClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_path_client = ( + IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_query_client = IndividuallyParentNestedWithQueryClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_query_client = ( + IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_header_client = IndividuallyParentNestedWithHeaderClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_header_client = ( + IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_multiple_client = IndividuallyParentNestedWithMultipleClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_multiple_client = ( + IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_mixed_client = IndividuallyParentNestedWithMixedClientOperations( - self._client, self._config, self._serialize, self._deserialize + self.individually_parent_client_individually_parent_nested_with_mixed_client = ( + IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.individually_parent_nested_with_param_alias_client = ( - IndividuallyParentNestedWithParamAliasClientOperations( + self.individually_parent_client_individually_parent_nested_with_param_alias_client = ( + IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations( self._client, self._config, self._serialize, self._deserialize ) ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/__init__.py index 640d33afd2..0b99835abb 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/__init__.py @@ -12,24 +12,24 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import IndividuallyParentNestedWithPathClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithQueryClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithHeaderClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithMultipleClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithMixedClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithParamAliasClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "IndividuallyParentNestedWithPathClientOperations", - "IndividuallyParentNestedWithQueryClientOperations", - "IndividuallyParentNestedWithHeaderClientOperations", - "IndividuallyParentNestedWithMultipleClientOperations", - "IndividuallyParentNestedWithMixedClientOperations", - "IndividuallyParentNestedWithParamAliasClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/_operations.py index 65ab0d8463..a3fc4340e7 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/aio/operations/_operations.py @@ -28,23 +28,23 @@ from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_individually_parent_nested_with_header_client_delete_standalone_request, - build_individually_parent_nested_with_header_client_get_standalone_request, - build_individually_parent_nested_with_header_client_with_query_request, - build_individually_parent_nested_with_mixed_client_delete_standalone_request, - build_individually_parent_nested_with_mixed_client_get_standalone_request, - build_individually_parent_nested_with_mixed_client_with_query_request, - build_individually_parent_nested_with_multiple_client_delete_standalone_request, - build_individually_parent_nested_with_multiple_client_get_standalone_request, - build_individually_parent_nested_with_multiple_client_with_query_request, - build_individually_parent_nested_with_param_alias_client_with_aliased_name_request, - build_individually_parent_nested_with_param_alias_client_with_original_name_request, - build_individually_parent_nested_with_path_client_delete_standalone_request, - build_individually_parent_nested_with_path_client_get_standalone_request, - build_individually_parent_nested_with_path_client_with_query_request, - build_individually_parent_nested_with_query_client_delete_standalone_request, - build_individually_parent_nested_with_query_client_get_standalone_request, - build_individually_parent_nested_with_query_client_with_query_request, + build_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone_request, + build_individually_parent_client_individually_parent_nested_with_header_client_get_standalone_request, + build_individually_parent_client_individually_parent_nested_with_header_client_with_query_request, + build_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone_request, + build_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone_request, + build_individually_parent_client_individually_parent_nested_with_mixed_client_with_query_request, + build_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone_request, + build_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone_request, + build_individually_parent_client_individually_parent_nested_with_multiple_client_with_query_request, + build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name_request, + build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name_request, + build_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone_request, + build_individually_parent_client_individually_parent_nested_with_path_client_get_standalone_request, + build_individually_parent_client_individually_parent_nested_with_path_client_with_query_request, + build_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone_request, + build_individually_parent_client_individually_parent_nested_with_query_client_get_standalone_request, + build_individually_parent_client_individually_parent_nested_with_query_client_with_query_request, ) from .._configuration import IndividuallyParentClientConfiguration @@ -52,14 +52,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class IndividuallyParentNestedWithPathClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_path_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_path_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -92,7 +92,7 @@ async def with_query(self, *, format: Optional[str] = None, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_path_client_with_query_request( blob_name=self._config.blob_name, format=format, headers=_headers, @@ -139,7 +139,7 @@ async def get_standalone(self, **kwargs: Any) -> _models.BlobProperties: cls: ClsType[_models.BlobProperties] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_path_client_get_standalone_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -196,10 +196,12 @@ async def delete_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_delete_standalone_request( - blob_name=self._config.blob_name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone_request( + blob_name=self._config.blob_name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -221,14 +223,14 @@ async def delete_standalone(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithQueryClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_query_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_query_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -261,7 +263,7 @@ async def with_query(self, *, format: Optional[str] = None, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_query_client_with_query_request( blob_name=self._config.blob_name, format=format, headers=_headers, @@ -308,7 +310,7 @@ async def get_standalone(self, **kwargs: Any) -> _models.BlobProperties: cls: ClsType[_models.BlobProperties] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_query_client_get_standalone_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -365,10 +367,12 @@ async def delete_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_delete_standalone_request( - blob_name=self._config.blob_name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone_request( + blob_name=self._config.blob_name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -390,14 +394,14 @@ async def delete_standalone(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithHeaderClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_header_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_header_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -430,7 +434,7 @@ async def with_query(self, *, format: Optional[str] = None, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_header_client_with_query_request( name=self._config.name, format=format, headers=_headers, @@ -476,10 +480,12 @@ async def get_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_get_standalone_request( - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_header_client_get_standalone_request( + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -521,10 +527,12 @@ async def delete_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_delete_standalone_request( - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone_request( + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -546,14 +554,14 @@ async def delete_standalone(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithMultipleClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_multiple_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_multiple_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -586,7 +594,7 @@ async def with_query(self, *, format: Optional[str] = None, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_multiple_client_with_query_request( name=self._config.name, region=self._config.region, format=format, @@ -633,11 +641,13 @@ async def get_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_get_standalone_request( - name=self._config.name, - region=self._config.region, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone_request( + name=self._config.name, + region=self._config.region, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -679,11 +689,13 @@ async def delete_standalone(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_delete_standalone_request( - name=self._config.name, - region=self._config.region, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone_request( + name=self._config.name, + region=self._config.region, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -705,14 +717,14 @@ async def delete_standalone(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithMixedClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_mixed_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_mixed_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -747,7 +759,7 @@ async def with_query(self, *, region: str, format: Optional[str] = None, **kwarg cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_mixed_client_with_query_request( region=region, name=self._config.name, format=format, @@ -796,7 +808,7 @@ async def get_standalone(self, *, region: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone_request( region=region, name=self._config.name, headers=_headers, @@ -844,11 +856,13 @@ async def delete_standalone(self, *, region: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_delete_standalone_request( - region=region, - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone_request( + region=region, + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -870,14 +884,14 @@ async def delete_standalone(self, *, region: str, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithParamAliasClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.aio.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_param_alias_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_param_alias_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -908,7 +922,7 @@ async def with_aliased_name(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_param_alias_client_with_aliased_name_request( + _request = build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -953,7 +967,7 @@ async def with_original_name(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_param_alias_client_with_original_name_request( + _request = build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name_request( blob_name=self._config.blob_name, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/__init__.py index 640d33afd2..0b99835abb 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/__init__.py @@ -12,24 +12,24 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import IndividuallyParentNestedWithPathClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithQueryClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithHeaderClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithMultipleClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithMixedClientOperations # type: ignore -from ._operations import IndividuallyParentNestedWithParamAliasClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations # type: ignore +from ._operations import IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "IndividuallyParentNestedWithPathClientOperations", - "IndividuallyParentNestedWithQueryClientOperations", - "IndividuallyParentNestedWithHeaderClientOperations", - "IndividuallyParentNestedWithMultipleClientOperations", - "IndividuallyParentNestedWithMixedClientOperations", - "IndividuallyParentNestedWithParamAliasClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations", + "IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/_operations.py index c4e9dce2bb..ad1d4ca7d4 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-initialization-individuallyparent/specs/azure/clientgenerator/core/clientinitialization/individuallyparent/operations/_operations.py @@ -37,7 +37,7 @@ _SERIALIZER.client_side_validation = False -def build_individually_parent_nested_with_path_client_with_query_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_path_client_with_query_request( # pylint: disable=name-too-long blob_name: str, *, format: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -57,7 +57,7 @@ def build_individually_parent_nested_with_path_client_with_query_request( # pyl return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_individually_parent_nested_with_path_client_get_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_path_client_get_standalone_request( # pylint: disable=name-too-long blob_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -78,7 +78,7 @@ def build_individually_parent_nested_with_path_client_get_standalone_request( # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_individually_parent_nested_with_path_client_delete_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone_request( # pylint: disable=name-too-long blob_name: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -92,7 +92,7 @@ def build_individually_parent_nested_with_path_client_delete_standalone_request( return HttpRequest(method="DELETE", url=_url, **kwargs) -def build_individually_parent_nested_with_query_client_with_query_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_query_client_with_query_request( # pylint: disable=name-too-long *, blob_name: str, format: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -108,7 +108,7 @@ def build_individually_parent_nested_with_query_client_with_query_request( # py return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_individually_parent_nested_with_query_client_get_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_query_client_get_standalone_request( # pylint: disable=name-too-long *, blob_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -128,7 +128,7 @@ def build_individually_parent_nested_with_query_client_get_standalone_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_query_client_delete_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone_request( # pylint: disable=name-too-long *, blob_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -142,7 +142,7 @@ def build_individually_parent_nested_with_query_client_delete_standalone_request return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_individually_parent_nested_with_header_client_with_query_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_header_client_with_query_request( # pylint: disable=name-too-long *, name: str, format: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -161,7 +161,7 @@ def build_individually_parent_nested_with_header_client_with_query_request( # p return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_header_client_get_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_header_client_get_standalone_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -175,7 +175,7 @@ def build_individually_parent_nested_with_header_client_get_standalone_request( return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_individually_parent_nested_with_header_client_delete_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone_request( # pylint: disable=name-too-long *, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -189,7 +189,7 @@ def build_individually_parent_nested_with_header_client_delete_standalone_reques return HttpRequest(method="DELETE", url=_url, headers=_headers, **kwargs) -def build_individually_parent_nested_with_multiple_client_with_query_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_multiple_client_with_query_request( # pylint: disable=name-too-long *, name: str, region: str, format: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -209,7 +209,7 @@ def build_individually_parent_nested_with_multiple_client_with_query_request( # return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_multiple_client_get_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone_request( # pylint: disable=name-too-long *, name: str, region: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -227,7 +227,7 @@ def build_individually_parent_nested_with_multiple_client_get_standalone_request return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_multiple_client_delete_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone_request( # pylint: disable=name-too-long *, name: str, region: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -245,7 +245,7 @@ def build_individually_parent_nested_with_multiple_client_delete_standalone_requ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_mixed_client_with_query_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_mixed_client_with_query_request( # pylint: disable=name-too-long *, region: str, name: str, format: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -265,7 +265,7 @@ def build_individually_parent_nested_with_mixed_client_with_query_request( # py return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_mixed_client_get_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone_request( # pylint: disable=name-too-long *, region: str, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -283,7 +283,7 @@ def build_individually_parent_nested_with_mixed_client_get_standalone_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_mixed_client_delete_standalone_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone_request( # pylint: disable=name-too-long *, region: str, name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -301,7 +301,7 @@ def build_individually_parent_nested_with_mixed_client_delete_standalone_request return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) -def build_individually_parent_nested_with_param_alias_client_with_aliased_name_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name_request( # pylint: disable=name-too-long blob_name: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -315,7 +315,7 @@ def build_individually_parent_nested_with_param_alias_client_with_aliased_name_r return HttpRequest(method="GET", url=_url, **kwargs) -def build_individually_parent_nested_with_param_alias_client_with_original_name_request( # pylint: disable=name-too-long +def build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name_request( # pylint: disable=name-too-long blob_name: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -329,14 +329,14 @@ def build_individually_parent_nested_with_param_alias_client_with_original_name_ return HttpRequest(method="GET", url=_url, **kwargs) -class IndividuallyParentNestedWithPathClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithPathClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_path_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_path_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -371,7 +371,7 @@ def with_query( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_path_client_with_query_request( blob_name=self._config.blob_name, format=format, headers=_headers, @@ -418,7 +418,7 @@ def get_standalone(self, **kwargs: Any) -> _models.BlobProperties: cls: ClsType[_models.BlobProperties] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_path_client_get_standalone_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -475,10 +475,12 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_path_client_delete_standalone_request( - blob_name=self._config.blob_name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_path_client_delete_standalone_request( + blob_name=self._config.blob_name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -500,14 +502,14 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithQueryClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithQueryClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_query_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_query_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -542,7 +544,7 @@ def with_query( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_query_client_with_query_request( blob_name=self._config.blob_name, format=format, headers=_headers, @@ -589,7 +591,7 @@ def get_standalone(self, **kwargs: Any) -> _models.BlobProperties: cls: ClsType[_models.BlobProperties] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_query_client_get_standalone_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -646,10 +648,12 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_query_client_delete_standalone_request( - blob_name=self._config.blob_name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_query_client_delete_standalone_request( + blob_name=self._config.blob_name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -671,14 +675,14 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithHeaderClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithHeaderClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_header_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_header_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -713,7 +717,7 @@ def with_query( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_header_client_with_query_request( name=self._config.name, format=format, headers=_headers, @@ -759,10 +763,12 @@ def get_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_get_standalone_request( - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_header_client_get_standalone_request( + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -804,10 +810,12 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_header_client_delete_standalone_request( - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_header_client_delete_standalone_request( + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -829,14 +837,14 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithMultipleClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithMultipleClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_multiple_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_multiple_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -871,7 +879,7 @@ def with_query( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_multiple_client_with_query_request( name=self._config.name, region=self._config.region, format=format, @@ -918,11 +926,13 @@ def get_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_get_standalone_request( - name=self._config.name, - region=self._config.region, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_multiple_client_get_standalone_request( + name=self._config.name, + region=self._config.region, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -964,11 +974,13 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_multiple_client_delete_standalone_request( - name=self._config.name, - region=self._config.region, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_multiple_client_delete_standalone_request( + name=self._config.name, + region=self._config.region, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -990,14 +1002,14 @@ def delete_standalone(self, **kwargs: Any) -> None: # pylint: disable=inconsist return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithMixedClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithMixedClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_mixed_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_mixed_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1034,7 +1046,7 @@ def with_query( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_with_query_request( + _request = build_individually_parent_client_individually_parent_nested_with_mixed_client_with_query_request( region=region, name=self._config.name, format=format, @@ -1083,7 +1095,7 @@ def get_standalone(self, *, region: str, **kwargs: Any) -> None: # pylint: disa cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_get_standalone_request( + _request = build_individually_parent_client_individually_parent_nested_with_mixed_client_get_standalone_request( region=region, name=self._config.name, headers=_headers, @@ -1133,11 +1145,13 @@ def delete_standalone( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_mixed_client_delete_standalone_request( - region=region, - name=self._config.name, - headers=_headers, - params=_params, + _request = ( + build_individually_parent_client_individually_parent_nested_with_mixed_client_delete_standalone_request( + region=region, + name=self._config.name, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -1159,14 +1173,14 @@ def delete_standalone( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IndividuallyParentNestedWithParamAliasClientOperations: # pylint: disable=name-too-long +class IndividuallyParentClientIndividuallyParentNestedWithParamAliasClientOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientinitialization.individuallyparent.IndividuallyParentClient`'s - :attr:`individually_parent_nested_with_param_alias_client` attribute. + :attr:`individually_parent_client_individually_parent_nested_with_param_alias_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1197,7 +1211,7 @@ def with_aliased_name(self, **kwargs: Any) -> None: # pylint: disable=inconsist cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_param_alias_client_with_aliased_name_request( + _request = build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_aliased_name_request( blob_name=self._config.blob_name, headers=_headers, params=_params, @@ -1242,7 +1256,7 @@ def with_original_name(self, **kwargs: Any) -> None: # pylint: disable=inconsis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_individually_parent_nested_with_param_alias_client_with_original_name_request( + _request = build_individually_parent_client_individually_parent_nested_with_param_alias_client_with_original_name_request( blob_name=self._config.blob_name, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/apiview-properties.json index af3e6c404e..13b513d614 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/apiview-properties.json @@ -2,7 +2,7 @@ "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient", "CrossLanguageDefinitionId": { "specs.azure.clientgenerator.core.clientlocation.parameter.models.Blob": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.Blob", - "specs.azure.clientgenerator.core.clientlocation.parameter.operations.BlobOperationsOperations.get_blob": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob", - "specs.azure.clientgenerator.core.clientlocation.parameter.aio.operations.BlobOperationsOperations.get_blob": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob" + "specs.azure.clientgenerator.core.clientlocation.parameter.operations.MoveMethodParameterToClientBlobOperationsOperations.get_blob": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob", + "specs.azure.clientgenerator.core.clientlocation.parameter.aio.operations.MoveMethodParameterToClientBlobOperationsOperations.get_blob": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveMethodParameterToClient.BlobOperations.getBlob" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations.py new file mode 100644 index 0000000000..a79e68bb8a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveMethodParameterToClientTestBase, MoveMethodParameterToPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveMethodParameterToMoveMethodParameterToClientBlobOperationsOperations(MoveMethodParameterToClientTestBase): + @MoveMethodParameterToPreparer() + @recorded_by_proxy + def test_move_method_parameter_to_client_blob_operations_get_blob(self, movemethodparameterto_endpoint): + client = self.create_client(endpoint=movemethodparameterto_endpoint) + response = client.move_method_parameter_to_client_blob_operations.get_blob( + container="str", + blob="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations_async.py new file mode 100644 index 0000000000..b79561ee7b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/generated_tests/test_move_method_parameter_to_move_method_parameter_to_client_blob_operations_operations_async.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveMethodParameterToPreparer +from testpreparer_async import MoveMethodParameterToClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveMethodParameterToMoveMethodParameterToClientBlobOperationsOperationsAsync( + MoveMethodParameterToClientTestBaseAsync +): + @MoveMethodParameterToPreparer() + @recorded_by_proxy_async + async def test_move_method_parameter_to_client_blob_operations_get_blob(self, movemethodparameterto_endpoint): + client = self.create_async_client(endpoint=movemethodparameterto_endpoint) + response = await client.move_method_parameter_to_client_blob_operations.get_blob( + container="str", + blob="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/_client.py index 4cc1f63ca7..d8290e70a5 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,15 +17,16 @@ from ._configuration import MoveMethodParameterToClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import BlobOperationsOperations +from .operations import MoveMethodParameterToClientBlobOperationsOperations class MoveMethodParameterToClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar blob_operations: BlobOperationsOperations operations - :vartype blob_operations: - specs.azure.clientgenerator.core.clientlocation.parameter.operations.BlobOperationsOperations + :ivar move_method_parameter_to_client_blob_operations: + MoveMethodParameterToClientBlobOperationsOperations operations + :vartype move_method_parameter_to_client_blob_operations: + specs.azure.clientgenerator.core.clientlocation.parameter.operations.MoveMethodParameterToClientBlobOperationsOperations :param storage_account: Required. :type storage_account: str :keyword endpoint: Service host. Default value is "http://localhost:3000". @@ -61,7 +63,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.blob_operations = BlobOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.move_method_parameter_to_client_blob_operations = MoveMethodParameterToClientBlobOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/_client.py index c66717949c..a15e432d15 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,15 +17,16 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MoveMethodParameterToClientConfiguration -from .operations import BlobOperationsOperations +from .operations import MoveMethodParameterToClientBlobOperationsOperations class MoveMethodParameterToClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar blob_operations: BlobOperationsOperations operations - :vartype blob_operations: - specs.azure.clientgenerator.core.clientlocation.parameter.aio.operations.BlobOperationsOperations + :ivar move_method_parameter_to_client_blob_operations: + MoveMethodParameterToClientBlobOperationsOperations operations + :vartype move_method_parameter_to_client_blob_operations: + specs.azure.clientgenerator.core.clientlocation.parameter.aio.operations.MoveMethodParameterToClientBlobOperationsOperations :param storage_account: Required. :type storage_account: str :keyword endpoint: Service host. Default value is "http://localhost:3000". @@ -61,7 +63,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.blob_operations = BlobOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.move_method_parameter_to_client_blob_operations = MoveMethodParameterToClientBlobOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/__init__.py index c2d5971fb6..b392449c77 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BlobOperationsOperations # type: ignore +from ._operations import MoveMethodParameterToClientBlobOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BlobOperationsOperations", + "MoveMethodParameterToClientBlobOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/_operations.py index 7b30cb6143..6b25b5c3b2 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/aio/operations/_operations.py @@ -26,21 +26,21 @@ from ... import models as _models from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_blob_operations_get_blob_request +from ...operations._operations import build_move_method_parameter_to_client_blob_operations_get_blob_request from .._configuration import MoveMethodParameterToClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BlobOperationsOperations: +class MoveMethodParameterToClientBlobOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.parameter.aio.MoveMethodParameterToClient`'s - :attr:`blob_operations` attribute. + :attr:`move_method_parameter_to_client_blob_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -77,7 +77,7 @@ async def get_blob(self, *, container: str, blob: str, **kwargs: Any) -> _models cls: ClsType[_models.Blob] = kwargs.pop("cls", None) - _request = build_blob_operations_get_blob_request( + _request = build_move_method_parameter_to_client_blob_operations_get_blob_request( container=container, blob=blob, storage_account=self._config.storage_account, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/__init__.py index c2d5971fb6..b392449c77 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BlobOperationsOperations # type: ignore +from ._operations import MoveMethodParameterToClientBlobOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BlobOperationsOperations", + "MoveMethodParameterToClientBlobOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/_operations.py index dbf42aa1a1..08fda0ecf8 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-method-parameter-to-client/specs/azure/clientgenerator/core/clientlocation/parameter/operations/_operations.py @@ -36,7 +36,7 @@ _SERIALIZER.client_side_validation = False -def build_blob_operations_get_blob_request( +def build_move_method_parameter_to_client_blob_operations_get_blob_request( # pylint: disable=name-too-long *, container: str, blob: str, storage_account: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -58,14 +58,14 @@ def build_blob_operations_get_blob_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class BlobOperationsOperations: +class MoveMethodParameterToClientBlobOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.parameter.MoveMethodParameterToClient`'s - :attr:`blob_operations` attribute. + :attr:`move_method_parameter_to_client_blob_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -102,7 +102,7 @@ def get_blob(self, *, container: str, blob: str, **kwargs: Any) -> _models.Blob: cls: ClsType[_models.Blob] = kwargs.pop("cls", None) - _request = build_blob_operations_get_blob_request( + _request = build_move_method_parameter_to_client_blob_operations_get_blob_request( container=container, blob=blob, storage_account=self._config.storage_account, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/apiview-properties.json index 1d3c1d12ad..72fde6bcfd 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/apiview-properties.json @@ -1,11 +1,11 @@ { "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient", "CrossLanguageDefinitionId": { - "specs.azure.clientgenerator.core.clientlocation.subclient.operations.AdminOperationsOperations.get_admin_info": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations.getAdminInfo", - "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.AdminOperationsOperations.get_admin_info": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations.getAdminInfo", - "specs.azure.clientgenerator.core.clientlocation.subclient.operations.AdminOperationsOperations.delete_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.deleteUser", - "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.AdminOperationsOperations.delete_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.deleteUser", - "specs.azure.clientgenerator.core.clientlocation.subclient.operations.UserOperationsOperations.get_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.getUser", - "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.UserOperationsOperations.get_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.getUser" + "specs.azure.clientgenerator.core.clientlocation.subclient.operations.MoveToExistingSubClientAdminOperationsOperations.get_admin_info": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations.getAdminInfo", + "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.MoveToExistingSubClientAdminOperationsOperations.get_admin_info": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.AdminOperations.getAdminInfo", + "specs.azure.clientgenerator.core.clientlocation.subclient.operations.MoveToExistingSubClientAdminOperationsOperations.delete_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.deleteUser", + "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.MoveToExistingSubClientAdminOperationsOperations.delete_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.deleteUser", + "specs.azure.clientgenerator.core.clientlocation.subclient.operations.MoveToExistingSubClientUserOperationsOperations.get_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.getUser", + "specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.MoveToExistingSubClientUserOperationsOperations.get_user": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToExistingSubClient.UserOperations.getUser" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations.py new file mode 100644 index 0000000000..e53d247334 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveToExistingSubClientTestBase, MoveToExistingSubPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToExistingSubMoveToExistingSubClientAdminOperationsOperations(MoveToExistingSubClientTestBase): + @MoveToExistingSubPreparer() + @recorded_by_proxy + def test_move_to_existing_sub_client_admin_operations_get_admin_info(self, movetoexistingsub_endpoint): + client = self.create_client(endpoint=movetoexistingsub_endpoint) + response = client.move_to_existing_sub_client_admin_operations.get_admin_info() + + # please add some check logic here by yourself + # ... + + @MoveToExistingSubPreparer() + @recorded_by_proxy + def test_move_to_existing_sub_client_admin_operations_delete_user(self, movetoexistingsub_endpoint): + client = self.create_client(endpoint=movetoexistingsub_endpoint) + response = client.move_to_existing_sub_client_admin_operations.delete_user() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations_async.py new file mode 100644 index 0000000000..e620cc26b3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_admin_operations_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveToExistingSubPreparer +from testpreparer_async import MoveToExistingSubClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToExistingSubMoveToExistingSubClientAdminOperationsOperationsAsync(MoveToExistingSubClientTestBaseAsync): + @MoveToExistingSubPreparer() + @recorded_by_proxy_async + async def test_move_to_existing_sub_client_admin_operations_get_admin_info(self, movetoexistingsub_endpoint): + client = self.create_async_client(endpoint=movetoexistingsub_endpoint) + response = await client.move_to_existing_sub_client_admin_operations.get_admin_info() + + # please add some check logic here by yourself + # ... + + @MoveToExistingSubPreparer() + @recorded_by_proxy_async + async def test_move_to_existing_sub_client_admin_operations_delete_user(self, movetoexistingsub_endpoint): + client = self.create_async_client(endpoint=movetoexistingsub_endpoint) + response = await client.move_to_existing_sub_client_admin_operations.delete_user() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations.py new file mode 100644 index 0000000000..380938815c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveToExistingSubClientTestBase, MoveToExistingSubPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToExistingSubMoveToExistingSubClientUserOperationsOperations(MoveToExistingSubClientTestBase): + @MoveToExistingSubPreparer() + @recorded_by_proxy + def test_move_to_existing_sub_client_user_operations_get_user(self, movetoexistingsub_endpoint): + client = self.create_client(endpoint=movetoexistingsub_endpoint) + response = client.move_to_existing_sub_client_user_operations.get_user() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations_async.py new file mode 100644 index 0000000000..d9e8a8b1b4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/generated_tests/test_move_to_existing_sub_move_to_existing_sub_client_user_operations_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveToExistingSubPreparer +from testpreparer_async import MoveToExistingSubClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToExistingSubMoveToExistingSubClientUserOperationsOperationsAsync(MoveToExistingSubClientTestBaseAsync): + @MoveToExistingSubPreparer() + @recorded_by_proxy_async + async def test_move_to_existing_sub_client_user_operations_get_user(self, movetoexistingsub_endpoint): + client = self.create_async_client(endpoint=movetoexistingsub_endpoint) + response = await client.move_to_existing_sub_client_user_operations.get_user() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/_client.py index fa5125e977..0f4c8b487f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,18 +17,23 @@ from ._configuration import MoveToExistingSubClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import AdminOperationsOperations, UserOperationsOperations +from .operations import ( + MoveToExistingSubClientAdminOperationsOperations, + MoveToExistingSubClientUserOperationsOperations, +) class MoveToExistingSubClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar admin_operations: AdminOperationsOperations operations - :vartype admin_operations: - specs.azure.clientgenerator.core.clientlocation.subclient.operations.AdminOperationsOperations - :ivar user_operations: UserOperationsOperations operations - :vartype user_operations: - specs.azure.clientgenerator.core.clientlocation.subclient.operations.UserOperationsOperations + :ivar move_to_existing_sub_client_admin_operations: + MoveToExistingSubClientAdminOperationsOperations operations + :vartype move_to_existing_sub_client_admin_operations: + specs.azure.clientgenerator.core.clientlocation.subclient.operations.MoveToExistingSubClientAdminOperationsOperations + :ivar move_to_existing_sub_client_user_operations: + MoveToExistingSubClientUserOperationsOperations operations + :vartype move_to_existing_sub_client_user_operations: + specs.azure.clientgenerator.core.clientlocation.subclient.operations.MoveToExistingSubClientUserOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,10 +66,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.admin_operations = AdminOperationsOperations( + self.move_to_existing_sub_client_admin_operations = MoveToExistingSubClientAdminOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.move_to_existing_sub_client_user_operations = MoveToExistingSubClientUserOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user_operations = UserOperationsOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/_client.py index 57c994423a..460a81ff17 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,18 +17,23 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MoveToExistingSubClientConfiguration -from .operations import AdminOperationsOperations, UserOperationsOperations +from .operations import ( + MoveToExistingSubClientAdminOperationsOperations, + MoveToExistingSubClientUserOperationsOperations, +) class MoveToExistingSubClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar admin_operations: AdminOperationsOperations operations - :vartype admin_operations: - specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.AdminOperationsOperations - :ivar user_operations: UserOperationsOperations operations - :vartype user_operations: - specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.UserOperationsOperations + :ivar move_to_existing_sub_client_admin_operations: + MoveToExistingSubClientAdminOperationsOperations operations + :vartype move_to_existing_sub_client_admin_operations: + specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.MoveToExistingSubClientAdminOperationsOperations + :ivar move_to_existing_sub_client_user_operations: + MoveToExistingSubClientUserOperationsOperations operations + :vartype move_to_existing_sub_client_user_operations: + specs.azure.clientgenerator.core.clientlocation.subclient.aio.operations.MoveToExistingSubClientUserOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,10 +66,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.admin_operations = AdminOperationsOperations( + self.move_to_existing_sub_client_admin_operations = MoveToExistingSubClientAdminOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.move_to_existing_sub_client_user_operations = MoveToExistingSubClientUserOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.user_operations = UserOperationsOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/__init__.py index 36a7878f08..0c72400ac1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AdminOperationsOperations # type: ignore -from ._operations import UserOperationsOperations # type: ignore +from ._operations import MoveToExistingSubClientAdminOperationsOperations # type: ignore +from ._operations import MoveToExistingSubClientUserOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AdminOperationsOperations", - "UserOperationsOperations", + "MoveToExistingSubClientAdminOperationsOperations", + "MoveToExistingSubClientUserOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/_operations.py index 6b68f990ae..33a98f5338 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/aio/operations/_operations.py @@ -23,9 +23,9 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_admin_operations_delete_user_request, - build_admin_operations_get_admin_info_request, - build_user_operations_get_user_request, + build_move_to_existing_sub_client_admin_operations_delete_user_request, + build_move_to_existing_sub_client_admin_operations_get_admin_info_request, + build_move_to_existing_sub_client_user_operations_get_user_request, ) from .._configuration import MoveToExistingSubClientConfiguration @@ -33,14 +33,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class AdminOperationsOperations: +class MoveToExistingSubClientAdminOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.subclient.aio.MoveToExistingSubClient`'s - :attr:`admin_operations` attribute. + :attr:`move_to_existing_sub_client_admin_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -71,7 +71,7 @@ async def get_admin_info(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_admin_operations_get_admin_info_request( + _request = build_move_to_existing_sub_client_admin_operations_get_admin_info_request( headers=_headers, params=_params, ) @@ -115,7 +115,7 @@ async def delete_user(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_admin_operations_delete_user_request( + _request = build_move_to_existing_sub_client_admin_operations_delete_user_request( headers=_headers, params=_params, ) @@ -139,14 +139,14 @@ async def delete_user(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class UserOperationsOperations: +class MoveToExistingSubClientUserOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.subclient.aio.MoveToExistingSubClient`'s - :attr:`user_operations` attribute. + :attr:`move_to_existing_sub_client_user_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -177,7 +177,7 @@ async def get_user(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_user_operations_get_user_request( + _request = build_move_to_existing_sub_client_user_operations_get_user_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/__init__.py index 36a7878f08..0c72400ac1 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AdminOperationsOperations # type: ignore -from ._operations import UserOperationsOperations # type: ignore +from ._operations import MoveToExistingSubClientAdminOperationsOperations # type: ignore +from ._operations import MoveToExistingSubClientUserOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AdminOperationsOperations", - "UserOperationsOperations", + "MoveToExistingSubClientAdminOperationsOperations", + "MoveToExistingSubClientUserOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/_operations.py index c6cfbb1e68..fdaf43786c 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-existing-sub-client/specs/azure/clientgenerator/core/clientlocation/subclient/operations/_operations.py @@ -31,35 +31,41 @@ _SERIALIZER.client_side_validation = False -def build_admin_operations_get_admin_info_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_move_to_existing_sub_client_admin_operations_get_admin_info_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-existing-sub-client/admin" return HttpRequest(method="GET", url=_url, **kwargs) -def build_admin_operations_delete_user_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_move_to_existing_sub_client_admin_operations_delete_user_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-existing-sub-client/user" return HttpRequest(method="DELETE", url=_url, **kwargs) -def build_user_operations_get_user_request(**kwargs: Any) -> HttpRequest: +def build_move_to_existing_sub_client_user_operations_get_user_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-existing-sub-client/user" return HttpRequest(method="GET", url=_url, **kwargs) -class AdminOperationsOperations: +class MoveToExistingSubClientAdminOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.subclient.MoveToExistingSubClient`'s - :attr:`admin_operations` attribute. + :attr:`move_to_existing_sub_client_admin_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -90,7 +96,7 @@ def get_admin_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_admin_operations_get_admin_info_request( + _request = build_move_to_existing_sub_client_admin_operations_get_admin_info_request( headers=_headers, params=_params, ) @@ -134,7 +140,7 @@ def delete_user(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_admin_operations_delete_user_request( + _request = build_move_to_existing_sub_client_admin_operations_delete_user_request( headers=_headers, params=_params, ) @@ -158,14 +164,14 @@ def delete_user(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re return cls(pipeline_response, None, {}) # type: ignore -class UserOperationsOperations: +class MoveToExistingSubClientUserOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.subclient.MoveToExistingSubClient`'s - :attr:`user_operations` attribute. + :attr:`move_to_existing_sub_client_user_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -196,7 +202,7 @@ def get_user(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_user_operations_get_user_request( + _request = build_move_to_existing_sub_client_user_operations_get_user_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/apiview-properties.json index fc30b30710..bae285541d 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/apiview-properties.json @@ -1,9 +1,9 @@ { "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient", "CrossLanguageDefinitionId": { - "specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.ProductOperationsOperations.list_products": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.listProducts", - "specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.ProductOperationsOperations.list_products": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.listProducts", - "specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.ArchiveOperationsOperations.archive_product": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.archiveProduct", - "specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.ArchiveOperationsOperations.archive_product": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.archiveProduct" + "specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.MoveToNewSubClientProductOperationsOperations.list_products": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.listProducts", + "specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.MoveToNewSubClientProductOperationsOperations.list_products": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.listProducts", + "specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.MoveToNewSubClientArchiveOperationsOperations.archive_product": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.archiveProduct", + "specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.MoveToNewSubClientArchiveOperationsOperations.archive_product": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToNewSubClient.ProductOperations.archiveProduct" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations.py new file mode 100644 index 0000000000..af3404e0f2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveToNewSubClientTestBase, MoveToNewSubPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToNewSubMoveToNewSubClientArchiveOperationsOperations(MoveToNewSubClientTestBase): + @MoveToNewSubPreparer() + @recorded_by_proxy + def test_move_to_new_sub_client_archive_operations_archive_product(self, movetonewsub_endpoint): + client = self.create_client(endpoint=movetonewsub_endpoint) + response = client.move_to_new_sub_client_archive_operations.archive_product() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations_async.py new file mode 100644 index 0000000000..bc1b0b320d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_archive_operations_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveToNewSubPreparer +from testpreparer_async import MoveToNewSubClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToNewSubMoveToNewSubClientArchiveOperationsOperationsAsync(MoveToNewSubClientTestBaseAsync): + @MoveToNewSubPreparer() + @recorded_by_proxy_async + async def test_move_to_new_sub_client_archive_operations_archive_product(self, movetonewsub_endpoint): + client = self.create_async_client(endpoint=movetonewsub_endpoint) + response = await client.move_to_new_sub_client_archive_operations.archive_product() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations.py new file mode 100644 index 0000000000..3e05847456 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveToNewSubClientTestBase, MoveToNewSubPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToNewSubMoveToNewSubClientProductOperationsOperations(MoveToNewSubClientTestBase): + @MoveToNewSubPreparer() + @recorded_by_proxy + def test_move_to_new_sub_client_product_operations_list_products(self, movetonewsub_endpoint): + client = self.create_client(endpoint=movetonewsub_endpoint) + response = client.move_to_new_sub_client_product_operations.list_products() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations_async.py new file mode 100644 index 0000000000..272f1b8438 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/generated_tests/test_move_to_new_sub_move_to_new_sub_client_product_operations_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveToNewSubPreparer +from testpreparer_async import MoveToNewSubClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToNewSubMoveToNewSubClientProductOperationsOperationsAsync(MoveToNewSubClientTestBaseAsync): + @MoveToNewSubPreparer() + @recorded_by_proxy_async + async def test_move_to_new_sub_client_product_operations_list_products(self, movetonewsub_endpoint): + client = self.create_async_client(endpoint=movetonewsub_endpoint) + response = await client.move_to_new_sub_client_product_operations.list_products() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/_client.py index 22b5fd7dfa..c2a31a43ec 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,18 +17,20 @@ from ._configuration import MoveToNewSubClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ArchiveOperationsOperations, ProductOperationsOperations +from .operations import MoveToNewSubClientArchiveOperationsOperations, MoveToNewSubClientProductOperationsOperations class MoveToNewSubClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar product_operations: ProductOperationsOperations operations - :vartype product_operations: - specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.ProductOperationsOperations - :ivar archive_operations: ArchiveOperationsOperations operations - :vartype archive_operations: - specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.ArchiveOperationsOperations + :ivar move_to_new_sub_client_product_operations: MoveToNewSubClientProductOperationsOperations + operations + :vartype move_to_new_sub_client_product_operations: + specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.MoveToNewSubClientProductOperationsOperations + :ivar move_to_new_sub_client_archive_operations: MoveToNewSubClientArchiveOperationsOperations + operations + :vartype move_to_new_sub_client_archive_operations: + specs.azure.clientgenerator.core.clientlocation.newsubclient.operations.MoveToNewSubClientArchiveOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,10 +63,10 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.product_operations = ProductOperationsOperations( + self.move_to_new_sub_client_product_operations = MoveToNewSubClientProductOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.archive_operations = ArchiveOperationsOperations( + self.move_to_new_sub_client_archive_operations = MoveToNewSubClientArchiveOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/_client.py index e9bab050e7..0ba5421323 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,18 +17,20 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MoveToNewSubClientConfiguration -from .operations import ArchiveOperationsOperations, ProductOperationsOperations +from .operations import MoveToNewSubClientArchiveOperationsOperations, MoveToNewSubClientProductOperationsOperations class MoveToNewSubClient: # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar product_operations: ProductOperationsOperations operations - :vartype product_operations: - specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.ProductOperationsOperations - :ivar archive_operations: ArchiveOperationsOperations operations - :vartype archive_operations: - specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.ArchiveOperationsOperations + :ivar move_to_new_sub_client_product_operations: MoveToNewSubClientProductOperationsOperations + operations + :vartype move_to_new_sub_client_product_operations: + specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.MoveToNewSubClientProductOperationsOperations + :ivar move_to_new_sub_client_archive_operations: MoveToNewSubClientArchiveOperationsOperations + operations + :vartype move_to_new_sub_client_archive_operations: + specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.operations.MoveToNewSubClientArchiveOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,10 +63,10 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.product_operations = ProductOperationsOperations( + self.move_to_new_sub_client_product_operations = MoveToNewSubClientProductOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.archive_operations = ArchiveOperationsOperations( + self.move_to_new_sub_client_archive_operations = MoveToNewSubClientArchiveOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/__init__.py index afbcd3fb3d..fe97966745 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ProductOperationsOperations # type: ignore -from ._operations import ArchiveOperationsOperations # type: ignore +from ._operations import MoveToNewSubClientProductOperationsOperations # type: ignore +from ._operations import MoveToNewSubClientArchiveOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ProductOperationsOperations", - "ArchiveOperationsOperations", + "MoveToNewSubClientProductOperationsOperations", + "MoveToNewSubClientArchiveOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/_operations.py index 2ccc7220b8..662e731617 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/aio/operations/_operations.py @@ -23,8 +23,8 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_archive_operations_archive_product_request, - build_product_operations_list_products_request, + build_move_to_new_sub_client_archive_operations_archive_product_request, + build_move_to_new_sub_client_product_operations_list_products_request, ) from .._configuration import MoveToNewSubClientConfiguration @@ -32,14 +32,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ProductOperationsOperations: +class MoveToNewSubClientProductOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.MoveToNewSubClient`'s - :attr:`product_operations` attribute. + :attr:`move_to_new_sub_client_product_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -70,7 +70,7 @@ async def list_products(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_product_operations_list_products_request( + _request = build_move_to_new_sub_client_product_operations_list_products_request( headers=_headers, params=_params, ) @@ -94,14 +94,14 @@ async def list_products(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ArchiveOperationsOperations: +class MoveToNewSubClientArchiveOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.newsubclient.aio.MoveToNewSubClient`'s - :attr:`archive_operations` attribute. + :attr:`move_to_new_sub_client_archive_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -132,7 +132,7 @@ async def archive_product(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_archive_operations_archive_product_request( + _request = build_move_to_new_sub_client_archive_operations_archive_product_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/__init__.py index afbcd3fb3d..fe97966745 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ProductOperationsOperations # type: ignore -from ._operations import ArchiveOperationsOperations # type: ignore +from ._operations import MoveToNewSubClientProductOperationsOperations # type: ignore +from ._operations import MoveToNewSubClientArchiveOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ProductOperationsOperations", - "ArchiveOperationsOperations", + "MoveToNewSubClientProductOperationsOperations", + "MoveToNewSubClientArchiveOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/_operations.py index 7d642f59e3..a9e7dcd020 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-new-sub-client/specs/azure/clientgenerator/core/clientlocation/newsubclient/operations/_operations.py @@ -31,28 +31,32 @@ _SERIALIZER.client_side_validation = False -def build_product_operations_list_products_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_move_to_new_sub_client_product_operations_list_products_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-new-sub-client/products" return HttpRequest(method="GET", url=_url, **kwargs) -def build_archive_operations_archive_product_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_move_to_new_sub_client_archive_operations_archive_product_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-new-sub-client/products/archive" return HttpRequest(method="POST", url=_url, **kwargs) -class ProductOperationsOperations: +class MoveToNewSubClientProductOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.newsubclient.MoveToNewSubClient`'s - :attr:`product_operations` attribute. + :attr:`move_to_new_sub_client_product_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -83,7 +87,7 @@ def list_products(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_product_operations_list_products_request( + _request = build_move_to_new_sub_client_product_operations_list_products_request( headers=_headers, params=_params, ) @@ -107,14 +111,14 @@ def list_products(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- return cls(pipeline_response, None, {}) # type: ignore -class ArchiveOperationsOperations: +class MoveToNewSubClientArchiveOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.newsubclient.MoveToNewSubClient`'s - :attr:`archive_operations` attribute. + :attr:`move_to_new_sub_client_archive_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -145,7 +149,7 @@ def archive_product(self, **kwargs: Any) -> None: # pylint: disable=inconsisten cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_archive_operations_archive_product_request( + _request = build_move_to_new_sub_client_archive_operations_archive_product_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/apiview-properties.json index 219ac876af..16e979e150 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/apiview-properties.json @@ -1,8 +1,8 @@ { "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient", "CrossLanguageDefinitionId": { - "specs.azure.clientgenerator.core.clientlocation.rootclient.operations.ResourceOperationsOperations.get_resource": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getResource", - "specs.azure.clientgenerator.core.clientlocation.rootclient.aio.operations.ResourceOperationsOperations.get_resource": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getResource", + "specs.azure.clientgenerator.core.clientlocation.rootclient.operations.MoveToRootClientResourceOperationsOperations.get_resource": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getResource", + "specs.azure.clientgenerator.core.clientlocation.rootclient.aio.operations.MoveToRootClientResourceOperationsOperations.get_resource": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getResource", "specs.azure.clientgenerator.core.clientlocation.rootclient.MoveToRootClient.get_health_status": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getHealthStatus", "specs.azure.clientgenerator.core.clientlocation.rootclient.aio.MoveToRootClient.get_health_status": "_Specs_.Azure.ClientGenerator.Core.ClientLocation.MoveToRootClient.ResourceOperations.getHealthStatus" } diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations.py new file mode 100644 index 0000000000..87abed15c0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MoveToRootClientTestBase, MoveToRootPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToRootMoveToRootClientResourceOperationsOperations(MoveToRootClientTestBase): + @MoveToRootPreparer() + @recorded_by_proxy + def test_move_to_root_client_resource_operations_get_resource(self, movetoroot_endpoint): + client = self.create_client(endpoint=movetoroot_endpoint) + response = client.move_to_root_client_resource_operations.get_resource() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations_async.py new file mode 100644 index 0000000000..e22ae7cdfc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/generated_tests/test_move_to_root_move_to_root_client_resource_operations_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MoveToRootPreparer +from testpreparer_async import MoveToRootClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMoveToRootMoveToRootClientResourceOperationsOperationsAsync(MoveToRootClientTestBaseAsync): + @MoveToRootPreparer() + @recorded_by_proxy_async + async def test_move_to_root_client_resource_operations_get_resource(self, movetoroot_endpoint): + client = self.create_async_client(endpoint=movetoroot_endpoint) + response = await client.move_to_root_client_resource_operations.get_resource() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/_client.py index abbf51cf09..968f2bb9da 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/_client.py @@ -16,15 +16,16 @@ from ._configuration import MoveToRootClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ResourceOperationsOperations, _MoveToRootClientOperationsMixin +from .operations import MoveToRootClientResourceOperationsOperations, _MoveToRootClientOperationsMixin class MoveToRootClient(_MoveToRootClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar resource_operations: ResourceOperationsOperations operations - :vartype resource_operations: - specs.azure.clientgenerator.core.clientlocation.rootclient.operations.ResourceOperationsOperations + :ivar move_to_root_client_resource_operations: MoveToRootClientResourceOperationsOperations + operations + :vartype move_to_root_client_resource_operations: + specs.azure.clientgenerator.core.clientlocation.rootclient.operations.MoveToRootClientResourceOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +58,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.resource_operations = ResourceOperationsOperations( + self.move_to_root_client_resource_operations = MoveToRootClientResourceOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/_client.py index 8ea90e4529..9136866631 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -16,15 +17,16 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MoveToRootClientConfiguration -from .operations import ResourceOperationsOperations, _MoveToRootClientOperationsMixin +from .operations import MoveToRootClientResourceOperationsOperations, _MoveToRootClientOperationsMixin class MoveToRootClient(_MoveToRootClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for @clientLocation decorator - moving operations between clients. - :ivar resource_operations: ResourceOperationsOperations operations - :vartype resource_operations: - specs.azure.clientgenerator.core.clientlocation.rootclient.aio.operations.ResourceOperationsOperations + :ivar move_to_root_client_resource_operations: MoveToRootClientResourceOperationsOperations + operations + :vartype move_to_root_client_resource_operations: + specs.azure.clientgenerator.core.clientlocation.rootclient.aio.operations.MoveToRootClientResourceOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +59,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.resource_operations = ResourceOperationsOperations( + self.move_to_root_client_resource_operations = MoveToRootClientResourceOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/__init__.py index a9bf3f0994..93d629cf47 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResourceOperationsOperations # type: ignore +from ._operations import MoveToRootClientResourceOperationsOperations # type: ignore from ._operations import _MoveToRootClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResourceOperationsOperations", + "MoveToRootClientResourceOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/_operations.py index f32cd2d920..65e2ccae1f 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/aio/operations/_operations.py @@ -25,8 +25,8 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( + build_move_to_root_client_resource_operations_get_resource_request, build_move_to_root_get_health_status_request, - build_resource_operations_get_resource_request, ) from .._configuration import MoveToRootClientConfiguration @@ -34,14 +34,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ResourceOperationsOperations: +class MoveToRootClientResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.rootclient.aio.MoveToRootClient`'s - :attr:`resource_operations` attribute. + :attr:`move_to_root_client_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -72,7 +72,7 @@ async def get_resource(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_resource_operations_get_resource_request( + _request = build_move_to_root_client_resource_operations_get_resource_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/__init__.py index a9bf3f0994..93d629cf47 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResourceOperationsOperations # type: ignore +from ._operations import MoveToRootClientResourceOperationsOperations # type: ignore from ._operations import _MoveToRootClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResourceOperationsOperations", + "MoveToRootClientResourceOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/_operations.py index 010a5c2d64..91c2d7b026 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-client-location-move-to-root-client/specs/azure/clientgenerator/core/clientlocation/rootclient/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_resource_operations_get_resource_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_move_to_root_client_resource_operations_get_resource_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/client-location/move-to-root-client/resource" @@ -46,14 +48,14 @@ def build_move_to_root_get_health_status_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, **kwargs) -class ResourceOperationsOperations: +class MoveToRootClientResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.clientlocation.rootclient.MoveToRootClient`'s - :attr:`resource_operations` attribute. + :attr:`move_to_root_client_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,7 +86,7 @@ def get_resource(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_resource_operations_get_resource_request( + _request = build_move_to_root_client_resource_operations_get_resource_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/apiview-properties.json index f14b69de13..14648c418e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/apiview-properties.json @@ -4,15 +4,15 @@ "specs.azure.clientgenerator.core.hierarchybuilding.models.Animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.Animal", "specs.azure.clientgenerator.core.hierarchybuilding.models.Pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.Pet", "specs.azure.clientgenerator.core.hierarchybuilding.models.Dog": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.Dog", - "specs.azure.clientgenerator.core.hierarchybuilding.operations.AnimalOperationsOperations.update_pet_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updatePetAsAnimal", - "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.AnimalOperationsOperations.update_pet_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updatePetAsAnimal", - "specs.azure.clientgenerator.core.hierarchybuilding.operations.AnimalOperationsOperations.update_dog_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updateDogAsAnimal", - "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.AnimalOperationsOperations.update_dog_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updateDogAsAnimal", - "specs.azure.clientgenerator.core.hierarchybuilding.operations.PetOperationsOperations.update_pet_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updatePetAsPet", - "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.PetOperationsOperations.update_pet_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updatePetAsPet", - "specs.azure.clientgenerator.core.hierarchybuilding.operations.PetOperationsOperations.update_dog_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updateDogAsPet", - "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.PetOperationsOperations.update_dog_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updateDogAsPet", - "specs.azure.clientgenerator.core.hierarchybuilding.operations.DogOperationsOperations.update_dog_as_dog": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.DogOperations.updateDogAsDog", - "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.DogOperationsOperations.update_dog_as_dog": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.DogOperations.updateDogAsDog" + "specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientAnimalOperationsOperations.update_pet_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updatePetAsAnimal", + "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientAnimalOperationsOperations.update_pet_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updatePetAsAnimal", + "specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientAnimalOperationsOperations.update_dog_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updateDogAsAnimal", + "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientAnimalOperationsOperations.update_dog_as_animal": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.AnimalOperations.updateDogAsAnimal", + "specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientPetOperationsOperations.update_pet_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updatePetAsPet", + "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientPetOperationsOperations.update_pet_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updatePetAsPet", + "specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientPetOperationsOperations.update_dog_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updateDogAsPet", + "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientPetOperationsOperations.update_dog_as_pet": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.PetOperations.updateDogAsPet", + "specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientDogOperationsOperations.update_dog_as_dog": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.DogOperations.updateDogAsDog", + "specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientDogOperationsOperations.update_dog_as_dog": "_Specs_.Azure.ClientGenerator.Core.HierarchyBuilding.DogOperations.updateDogAsDog" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations.py new file mode 100644 index 0000000000..681c2bfd54 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import HierarchyBuildingClientTestBase, HierarchyBuildingPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientAnimalOperationsOperations(HierarchyBuildingClientTestBase): + @HierarchyBuildingPreparer() + @recorded_by_proxy + def test_hierarchy_building_client_animal_operations_update_pet_as_animal(self, hierarchybuilding_endpoint): + client = self.create_client(endpoint=hierarchybuilding_endpoint) + response = client.hierarchy_building_client_animal_operations.update_pet_as_animal( + animal={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... + + @HierarchyBuildingPreparer() + @recorded_by_proxy + def test_hierarchy_building_client_animal_operations_update_dog_as_animal(self, hierarchybuilding_endpoint): + client = self.create_client(endpoint=hierarchybuilding_endpoint) + response = client.hierarchy_building_client_animal_operations.update_dog_as_animal( + animal={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations_async.py new file mode 100644 index 0000000000..7ad9e9bef0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_animal_operations_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import HierarchyBuildingPreparer +from testpreparer_async import HierarchyBuildingClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientAnimalOperationsOperationsAsync(HierarchyBuildingClientTestBaseAsync): + @HierarchyBuildingPreparer() + @recorded_by_proxy_async + async def test_hierarchy_building_client_animal_operations_update_pet_as_animal(self, hierarchybuilding_endpoint): + client = self.create_async_client(endpoint=hierarchybuilding_endpoint) + response = await client.hierarchy_building_client_animal_operations.update_pet_as_animal( + animal={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... + + @HierarchyBuildingPreparer() + @recorded_by_proxy_async + async def test_hierarchy_building_client_animal_operations_update_dog_as_animal(self, hierarchybuilding_endpoint): + client = self.create_async_client(endpoint=hierarchybuilding_endpoint) + response = await client.hierarchy_building_client_animal_operations.update_dog_as_animal( + animal={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations.py new file mode 100644 index 0000000000..71ba9dca6b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import HierarchyBuildingClientTestBase, HierarchyBuildingPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientDogOperationsOperations(HierarchyBuildingClientTestBase): + @HierarchyBuildingPreparer() + @recorded_by_proxy + def test_hierarchy_building_client_dog_operations_update_dog_as_dog(self, hierarchybuilding_endpoint): + client = self.create_client(endpoint=hierarchybuilding_endpoint) + response = client.hierarchy_building_client_dog_operations.update_dog_as_dog( + dog={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations_async.py new file mode 100644 index 0000000000..40244e7e81 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_dog_operations_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import HierarchyBuildingPreparer +from testpreparer_async import HierarchyBuildingClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientDogOperationsOperationsAsync(HierarchyBuildingClientTestBaseAsync): + @HierarchyBuildingPreparer() + @recorded_by_proxy_async + async def test_hierarchy_building_client_dog_operations_update_dog_as_dog(self, hierarchybuilding_endpoint): + client = self.create_async_client(endpoint=hierarchybuilding_endpoint) + response = await client.hierarchy_building_client_dog_operations.update_dog_as_dog( + dog={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations.py new file mode 100644 index 0000000000..c58b09e389 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import HierarchyBuildingClientTestBase, HierarchyBuildingPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientPetOperationsOperations(HierarchyBuildingClientTestBase): + @HierarchyBuildingPreparer() + @recorded_by_proxy + def test_hierarchy_building_client_pet_operations_update_pet_as_pet(self, hierarchybuilding_endpoint): + client = self.create_client(endpoint=hierarchybuilding_endpoint) + response = client.hierarchy_building_client_pet_operations.update_pet_as_pet( + pet={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... + + @HierarchyBuildingPreparer() + @recorded_by_proxy + def test_hierarchy_building_client_pet_operations_update_dog_as_pet(self, hierarchybuilding_endpoint): + client = self.create_client(endpoint=hierarchybuilding_endpoint) + response = client.hierarchy_building_client_pet_operations.update_dog_as_pet( + pet={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations_async.py new file mode 100644 index 0000000000..df62303868 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/generated_tests/test_hierarchy_building_hierarchy_building_client_pet_operations_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import HierarchyBuildingPreparer +from testpreparer_async import HierarchyBuildingClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestHierarchyBuildingHierarchyBuildingClientPetOperationsOperationsAsync(HierarchyBuildingClientTestBaseAsync): + @HierarchyBuildingPreparer() + @recorded_by_proxy_async + async def test_hierarchy_building_client_pet_operations_update_pet_as_pet(self, hierarchybuilding_endpoint): + client = self.create_async_client(endpoint=hierarchybuilding_endpoint) + response = await client.hierarchy_building_client_pet_operations.update_pet_as_pet( + pet={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... + + @HierarchyBuildingPreparer() + @recorded_by_proxy_async + async def test_hierarchy_building_client_pet_operations_update_dog_as_pet(self, hierarchybuilding_endpoint): + client = self.create_async_client(endpoint=hierarchybuilding_endpoint) + response = await client.hierarchy_building_client_pet_operations.update_dog_as_pet( + pet={"breed": "str", "kind": "dog", "name": "str", "trained": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/_client.py index 2fbc7d670d..8c36722f8e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/_client.py @@ -16,21 +16,28 @@ from ._configuration import HierarchyBuildingClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import AnimalOperationsOperations, DogOperationsOperations, PetOperationsOperations +from .operations import ( + HierarchyBuildingClientAnimalOperationsOperations, + HierarchyBuildingClientDogOperationsOperations, + HierarchyBuildingClientPetOperationsOperations, +) class HierarchyBuildingClient: # pylint: disable=client-accepts-api-version-keyword """Test for @hierarchyBuilding decorator. - :ivar animal_operations: AnimalOperationsOperations operations - :vartype animal_operations: - specs.azure.clientgenerator.core.hierarchybuilding.operations.AnimalOperationsOperations - :ivar pet_operations: PetOperationsOperations operations - :vartype pet_operations: - specs.azure.clientgenerator.core.hierarchybuilding.operations.PetOperationsOperations - :ivar dog_operations: DogOperationsOperations operations - :vartype dog_operations: - specs.azure.clientgenerator.core.hierarchybuilding.operations.DogOperationsOperations + :ivar hierarchy_building_client_animal_operations: + HierarchyBuildingClientAnimalOperationsOperations operations + :vartype hierarchy_building_client_animal_operations: + specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientAnimalOperationsOperations + :ivar hierarchy_building_client_pet_operations: HierarchyBuildingClientPetOperationsOperations + operations + :vartype hierarchy_building_client_pet_operations: + specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientPetOperationsOperations + :ivar hierarchy_building_client_dog_operations: HierarchyBuildingClientDogOperationsOperations + operations + :vartype hierarchy_building_client_dog_operations: + specs.azure.clientgenerator.core.hierarchybuilding.operations.HierarchyBuildingClientDogOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,11 +70,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.animal_operations = AnimalOperationsOperations( + self.hierarchy_building_client_animal_operations = HierarchyBuildingClientAnimalOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.hierarchy_building_client_pet_operations = HierarchyBuildingClientPetOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.hierarchy_building_client_dog_operations = HierarchyBuildingClientDogOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.pet_operations = PetOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.dog_operations = DogOperationsOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/_client.py index ffce83178a..cfa2f67ddf 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/_client.py @@ -16,21 +16,28 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import HierarchyBuildingClientConfiguration -from .operations import AnimalOperationsOperations, DogOperationsOperations, PetOperationsOperations +from .operations import ( + HierarchyBuildingClientAnimalOperationsOperations, + HierarchyBuildingClientDogOperationsOperations, + HierarchyBuildingClientPetOperationsOperations, +) class HierarchyBuildingClient: # pylint: disable=client-accepts-api-version-keyword """Test for @hierarchyBuilding decorator. - :ivar animal_operations: AnimalOperationsOperations operations - :vartype animal_operations: - specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.AnimalOperationsOperations - :ivar pet_operations: PetOperationsOperations operations - :vartype pet_operations: - specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.PetOperationsOperations - :ivar dog_operations: DogOperationsOperations operations - :vartype dog_operations: - specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.DogOperationsOperations + :ivar hierarchy_building_client_animal_operations: + HierarchyBuildingClientAnimalOperationsOperations operations + :vartype hierarchy_building_client_animal_operations: + specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientAnimalOperationsOperations + :ivar hierarchy_building_client_pet_operations: HierarchyBuildingClientPetOperationsOperations + operations + :vartype hierarchy_building_client_pet_operations: + specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientPetOperationsOperations + :ivar hierarchy_building_client_dog_operations: HierarchyBuildingClientDogOperationsOperations + operations + :vartype hierarchy_building_client_dog_operations: + specs.azure.clientgenerator.core.hierarchybuilding.aio.operations.HierarchyBuildingClientDogOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,11 +70,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.animal_operations = AnimalOperationsOperations( + self.hierarchy_building_client_animal_operations = HierarchyBuildingClientAnimalOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.hierarchy_building_client_pet_operations = HierarchyBuildingClientPetOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.hierarchy_building_client_dog_operations = HierarchyBuildingClientDogOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.pet_operations = PetOperationsOperations(self._client, self._config, self._serialize, self._deserialize) - self.dog_operations = DogOperationsOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/__init__.py index 812f734f84..8e399fb3f6 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AnimalOperationsOperations # type: ignore -from ._operations import PetOperationsOperations # type: ignore -from ._operations import DogOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientAnimalOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientPetOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientDogOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AnimalOperationsOperations", - "PetOperationsOperations", - "DogOperationsOperations", + "HierarchyBuildingClientAnimalOperationsOperations", + "HierarchyBuildingClientPetOperationsOperations", + "HierarchyBuildingClientDogOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/_operations.py index 7ba62206a3..85f6dea938 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/aio/operations/_operations.py @@ -30,11 +30,11 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_animal_operations_update_dog_as_animal_request, - build_animal_operations_update_pet_as_animal_request, - build_dog_operations_update_dog_as_dog_request, - build_pet_operations_update_dog_as_pet_request, - build_pet_operations_update_pet_as_pet_request, + build_hierarchy_building_client_animal_operations_update_dog_as_animal_request, + build_hierarchy_building_client_animal_operations_update_pet_as_animal_request, + build_hierarchy_building_client_dog_operations_update_dog_as_dog_request, + build_hierarchy_building_client_pet_operations_update_dog_as_pet_request, + build_hierarchy_building_client_pet_operations_update_pet_as_pet_request, ) from .._configuration import HierarchyBuildingClientConfiguration @@ -43,14 +43,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class AnimalOperationsOperations: +class HierarchyBuildingClientAnimalOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.aio.HierarchyBuildingClient`'s - :attr:`animal_operations` attribute. + :attr:`hierarchy_building_client_animal_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -142,7 +142,7 @@ async def update_pet_as_animal( else: _content = json.dumps(animal, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_animal_operations_update_pet_as_animal_request( + _request = build_hierarchy_building_client_animal_operations_update_pet_as_animal_request( content_type=content_type, content=_content, headers=_headers, @@ -261,7 +261,7 @@ async def update_dog_as_animal( else: _content = json.dumps(animal, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_animal_operations_update_dog_as_animal_request( + _request = build_hierarchy_building_client_animal_operations_update_dog_as_animal_request( content_type=content_type, content=_content, headers=_headers, @@ -299,14 +299,14 @@ async def update_dog_as_animal( return deserialized # type: ignore -class PetOperationsOperations: +class HierarchyBuildingClientPetOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.aio.HierarchyBuildingClient`'s - :attr:`pet_operations` attribute. + :attr:`hierarchy_building_client_pet_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -395,7 +395,7 @@ async def update_pet_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kw else: _content = json.dumps(pet, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_pet_operations_update_pet_as_pet_request( + _request = build_hierarchy_building_client_pet_operations_update_pet_as_pet_request( content_type=content_type, content=_content, headers=_headers, @@ -511,7 +511,7 @@ async def update_dog_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kw else: _content = json.dumps(pet, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_pet_operations_update_dog_as_pet_request( + _request = build_hierarchy_building_client_pet_operations_update_dog_as_pet_request( content_type=content_type, content=_content, headers=_headers, @@ -549,14 +549,14 @@ async def update_dog_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kw return deserialized # type: ignore -class DogOperationsOperations: +class HierarchyBuildingClientDogOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.aio.HierarchyBuildingClient`'s - :attr:`dog_operations` attribute. + :attr:`hierarchy_building_client_dog_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -645,7 +645,7 @@ async def update_dog_as_dog(self, dog: Union[_models.Dog, JSON, IO[bytes]], **kw else: _content = json.dumps(dog, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dog_operations_update_dog_as_dog_request( + _request = build_hierarchy_building_client_dog_operations_update_dog_as_dog_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/__init__.py index 812f734f84..8e399fb3f6 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AnimalOperationsOperations # type: ignore -from ._operations import PetOperationsOperations # type: ignore -from ._operations import DogOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientAnimalOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientPetOperationsOperations # type: ignore +from ._operations import HierarchyBuildingClientDogOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AnimalOperationsOperations", - "PetOperationsOperations", - "DogOperationsOperations", + "HierarchyBuildingClientAnimalOperationsOperations", + "HierarchyBuildingClientPetOperationsOperations", + "HierarchyBuildingClientDogOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/_operations.py index fb42496d39..65d32e82f9 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-hierarchy-building/specs/azure/clientgenerator/core/hierarchybuilding/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_animal_operations_update_pet_as_animal_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_hierarchy_building_client_animal_operations_update_pet_as_animal_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -56,7 +58,9 @@ def build_animal_operations_update_pet_as_animal_request(**kwargs: Any) -> HttpR return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_animal_operations_update_dog_as_animal_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_hierarchy_building_client_animal_operations_update_dog_as_animal_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -73,7 +77,9 @@ def build_animal_operations_update_dog_as_animal_request(**kwargs: Any) -> HttpR return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_pet_operations_update_pet_as_pet_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_hierarchy_building_client_pet_operations_update_pet_as_pet_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +96,9 @@ def build_pet_operations_update_pet_as_pet_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_pet_operations_update_dog_as_pet_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_hierarchy_building_client_pet_operations_update_dog_as_pet_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -107,7 +115,9 @@ def build_pet_operations_update_dog_as_pet_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_dog_operations_update_dog_as_dog_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_hierarchy_building_client_dog_operations_update_dog_as_dog_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -124,14 +134,14 @@ def build_dog_operations_update_dog_as_dog_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class AnimalOperationsOperations: +class HierarchyBuildingClientAnimalOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.HierarchyBuildingClient`'s - :attr:`animal_operations` attribute. + :attr:`hierarchy_building_client_animal_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -221,7 +231,7 @@ def update_pet_as_animal(self, animal: Union[_models.Animal, JSON, IO[bytes]], * else: _content = json.dumps(animal, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_animal_operations_update_pet_as_animal_request( + _request = build_hierarchy_building_client_animal_operations_update_pet_as_animal_request( content_type=content_type, content=_content, headers=_headers, @@ -338,7 +348,7 @@ def update_dog_as_animal(self, animal: Union[_models.Animal, JSON, IO[bytes]], * else: _content = json.dumps(animal, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_animal_operations_update_dog_as_animal_request( + _request = build_hierarchy_building_client_animal_operations_update_dog_as_animal_request( content_type=content_type, content=_content, headers=_headers, @@ -376,14 +386,14 @@ def update_dog_as_animal(self, animal: Union[_models.Animal, JSON, IO[bytes]], * return deserialized # type: ignore -class PetOperationsOperations: +class HierarchyBuildingClientPetOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.HierarchyBuildingClient`'s - :attr:`pet_operations` attribute. + :attr:`hierarchy_building_client_pet_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -470,7 +480,7 @@ def update_pet_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(pet, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_pet_operations_update_pet_as_pet_request( + _request = build_hierarchy_building_client_pet_operations_update_pet_as_pet_request( content_type=content_type, content=_content, headers=_headers, @@ -584,7 +594,7 @@ def update_dog_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(pet, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_pet_operations_update_dog_as_pet_request( + _request = build_hierarchy_building_client_pet_operations_update_dog_as_pet_request( content_type=content_type, content=_content, headers=_headers, @@ -622,14 +632,14 @@ def update_dog_as_pet(self, pet: Union[_models.Pet, JSON, IO[bytes]], **kwargs: return deserialized # type: ignore -class DogOperationsOperations: +class HierarchyBuildingClientDogOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.hierarchybuilding.HierarchyBuildingClient`'s - :attr:`dog_operations` attribute. + :attr:`hierarchy_building_client_dog_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -716,7 +726,7 @@ def update_dog_as_dog(self, dog: Union[_models.Dog, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(dog, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dog_operations_update_dog_as_dog_request( + _request = build_hierarchy_building_client_dog_operations_update_dog_as_dog_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/apiview-properties.json index 02fd6fef2a..8f64cf23e4 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/apiview-properties.json @@ -2,13 +2,13 @@ "CrossLanguagePackageId": "_Specs_.Azure.ClientGenerator.Core.Override", "CrossLanguageDefinitionId": { "specs.azure.clientgenerator.core.override.models.GroupParametersOptions": "Customization.GroupParametersOptions", - "specs.azure.clientgenerator.core.override.operations.ReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder", - "specs.azure.clientgenerator.core.override.aio.operations.ReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder", - "specs.azure.clientgenerator.core.override.operations.GroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group", - "specs.azure.clientgenerator.core.override.aio.operations.GroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group", - "specs.azure.clientgenerator.core.override.operations.RequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional", - "specs.azure.clientgenerator.core.override.aio.operations.RequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional", - "specs.azure.clientgenerator.core.override.operations.RemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional", - "specs.azure.clientgenerator.core.override.aio.operations.RemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional" + "specs.azure.clientgenerator.core.override.operations.OverrideClientReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder", + "specs.azure.clientgenerator.core.override.aio.operations.OverrideClientReorderParametersOperations.reorder": "_Specs_.Azure.ClientGenerator.Core.Override.ReorderParameters.reorder", + "specs.azure.clientgenerator.core.override.operations.OverrideClientGroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group", + "specs.azure.clientgenerator.core.override.aio.operations.OverrideClientGroupParametersOperations.group": "_Specs_.Azure.ClientGenerator.Core.Override.GroupParameters.group", + "specs.azure.clientgenerator.core.override.operations.OverrideClientRequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional", + "specs.azure.clientgenerator.core.override.aio.operations.OverrideClientRequireOptionalParameterOperations.require_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RequireOptionalParameter.requireOptional", + "specs.azure.clientgenerator.core.override.operations.OverrideClientRemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional", + "specs.azure.clientgenerator.core.override.aio.operations.OverrideClientRemoveOptionalParameterOperations.remove_optional": "_Specs_.Azure.ClientGenerator.Core.Override.RemoveOptionalParameter.removeOptional" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations.py new file mode 100644 index 0000000000..76e2c24cf4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OverrideClientTestBase, OverridePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientGroupParametersOperations(OverrideClientTestBase): + @OverridePreparer() + @recorded_by_proxy + def test_override_client_group_parameters_group(self, override_endpoint): + client = self.create_client(endpoint=override_endpoint) + response = client.override_client_group_parameters.group( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations_async.py new file mode 100644 index 0000000000..d30084c397 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_group_parameters_operations_async.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OverridePreparer +from testpreparer_async import OverrideClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientGroupParametersOperationsAsync(OverrideClientTestBaseAsync): + @OverridePreparer() + @recorded_by_proxy_async + async def test_override_client_group_parameters_group(self, override_endpoint): + client = self.create_async_client(endpoint=override_endpoint) + response = await client.override_client_group_parameters.group( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations.py new file mode 100644 index 0000000000..67b29b68fb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OverrideClientTestBase, OverridePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientRemoveOptionalParameterOperations(OverrideClientTestBase): + @OverridePreparer() + @recorded_by_proxy + def test_override_client_remove_optional_parameter_remove_optional(self, override_endpoint): + client = self.create_client(endpoint=override_endpoint) + response = client.override_client_remove_optional_parameter.remove_optional( + param1="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations_async.py new file mode 100644 index 0000000000..55d10e6b34 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_remove_optional_parameter_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OverridePreparer +from testpreparer_async import OverrideClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientRemoveOptionalParameterOperationsAsync(OverrideClientTestBaseAsync): + @OverridePreparer() + @recorded_by_proxy_async + async def test_override_client_remove_optional_parameter_remove_optional(self, override_endpoint): + client = self.create_async_client(endpoint=override_endpoint) + response = await client.override_client_remove_optional_parameter.remove_optional( + param1="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations.py new file mode 100644 index 0000000000..71992645f3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OverrideClientTestBase, OverridePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientReorderParametersOperations(OverrideClientTestBase): + @OverridePreparer() + @recorded_by_proxy + def test_override_client_reorder_parameters_reorder(self, override_endpoint): + client = self.create_client(endpoint=override_endpoint) + response = client.override_client_reorder_parameters.reorder( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations_async.py new file mode 100644 index 0000000000..36629002ae --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_reorder_parameters_operations_async.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OverridePreparer +from testpreparer_async import OverrideClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientReorderParametersOperationsAsync(OverrideClientTestBaseAsync): + @OverridePreparer() + @recorded_by_proxy_async + async def test_override_client_reorder_parameters_reorder(self, override_endpoint): + client = self.create_async_client(endpoint=override_endpoint) + response = await client.override_client_reorder_parameters.reorder( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations.py new file mode 100644 index 0000000000..81481740e6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OverrideClientTestBase, OverridePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientRequireOptionalParameterOperations(OverrideClientTestBase): + @OverridePreparer() + @recorded_by_proxy + def test_override_client_require_optional_parameter_require_optional(self, override_endpoint): + client = self.create_client(endpoint=override_endpoint) + response = client.override_client_require_optional_parameter.require_optional( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations_async.py new file mode 100644 index 0000000000..09d41ddae5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/generated_tests/test_override_override_client_require_optional_parameter_operations_async.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OverridePreparer +from testpreparer_async import OverrideClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOverrideOverrideClientRequireOptionalParameterOperationsAsync(OverrideClientTestBaseAsync): + @OverridePreparer() + @recorded_by_proxy_async + async def test_override_client_require_optional_parameter_require_optional(self, override_endpoint): + client = self.create_async_client(endpoint=override_endpoint) + response = await client.override_client_require_optional_parameter.require_optional( + param1="str", + param2="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/_client.py index 18f33dea2f..843aa3d2a5 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/_client.py @@ -17,28 +17,30 @@ from ._configuration import OverrideClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - GroupParametersOperations, - RemoveOptionalParameterOperations, - ReorderParametersOperations, - RequireOptionalParameterOperations, + OverrideClientGroupParametersOperations, + OverrideClientRemoveOptionalParameterOperations, + OverrideClientReorderParametersOperations, + OverrideClientRequireOptionalParameterOperations, ) class OverrideClient: # pylint: disable=client-accepts-api-version-keyword """Test scenarios for client override behavior. - :ivar reorder_parameters: ReorderParametersOperations operations - :vartype reorder_parameters: - specs.azure.clientgenerator.core.override.operations.ReorderParametersOperations - :ivar group_parameters: GroupParametersOperations operations - :vartype group_parameters: - specs.azure.clientgenerator.core.override.operations.GroupParametersOperations - :ivar require_optional_parameter: RequireOptionalParameterOperations operations - :vartype require_optional_parameter: - specs.azure.clientgenerator.core.override.operations.RequireOptionalParameterOperations - :ivar remove_optional_parameter: RemoveOptionalParameterOperations operations - :vartype remove_optional_parameter: - specs.azure.clientgenerator.core.override.operations.RemoveOptionalParameterOperations + :ivar override_client_reorder_parameters: OverrideClientReorderParametersOperations operations + :vartype override_client_reorder_parameters: + specs.azure.clientgenerator.core.override.operations.OverrideClientReorderParametersOperations + :ivar override_client_group_parameters: OverrideClientGroupParametersOperations operations + :vartype override_client_group_parameters: + specs.azure.clientgenerator.core.override.operations.OverrideClientGroupParametersOperations + :ivar override_client_require_optional_parameter: + OverrideClientRequireOptionalParameterOperations operations + :vartype override_client_require_optional_parameter: + specs.azure.clientgenerator.core.override.operations.OverrideClientRequireOptionalParameterOperations + :ivar override_client_remove_optional_parameter: + OverrideClientRemoveOptionalParameterOperations operations + :vartype override_client_remove_optional_parameter: + specs.azure.clientgenerator.core.override.operations.OverrideClientRemoveOptionalParameterOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -71,16 +73,16 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.reorder_parameters = ReorderParametersOperations( + self.override_client_reorder_parameters = OverrideClientReorderParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.group_parameters = GroupParametersOperations( + self.override_client_group_parameters = OverrideClientGroupParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.require_optional_parameter = RequireOptionalParameterOperations( + self.override_client_require_optional_parameter = OverrideClientRequireOptionalParameterOperations( self._client, self._config, self._serialize, self._deserialize ) - self.remove_optional_parameter = RemoveOptionalParameterOperations( + self.override_client_remove_optional_parameter = OverrideClientRemoveOptionalParameterOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/_client.py index f5f9bd68d9..db27a3c6ad 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/_client.py @@ -17,28 +17,30 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OverrideClientConfiguration from .operations import ( - GroupParametersOperations, - RemoveOptionalParameterOperations, - ReorderParametersOperations, - RequireOptionalParameterOperations, + OverrideClientGroupParametersOperations, + OverrideClientRemoveOptionalParameterOperations, + OverrideClientReorderParametersOperations, + OverrideClientRequireOptionalParameterOperations, ) class OverrideClient: # pylint: disable=client-accepts-api-version-keyword """Test scenarios for client override behavior. - :ivar reorder_parameters: ReorderParametersOperations operations - :vartype reorder_parameters: - specs.azure.clientgenerator.core.override.aio.operations.ReorderParametersOperations - :ivar group_parameters: GroupParametersOperations operations - :vartype group_parameters: - specs.azure.clientgenerator.core.override.aio.operations.GroupParametersOperations - :ivar require_optional_parameter: RequireOptionalParameterOperations operations - :vartype require_optional_parameter: - specs.azure.clientgenerator.core.override.aio.operations.RequireOptionalParameterOperations - :ivar remove_optional_parameter: RemoveOptionalParameterOperations operations - :vartype remove_optional_parameter: - specs.azure.clientgenerator.core.override.aio.operations.RemoveOptionalParameterOperations + :ivar override_client_reorder_parameters: OverrideClientReorderParametersOperations operations + :vartype override_client_reorder_parameters: + specs.azure.clientgenerator.core.override.aio.operations.OverrideClientReorderParametersOperations + :ivar override_client_group_parameters: OverrideClientGroupParametersOperations operations + :vartype override_client_group_parameters: + specs.azure.clientgenerator.core.override.aio.operations.OverrideClientGroupParametersOperations + :ivar override_client_require_optional_parameter: + OverrideClientRequireOptionalParameterOperations operations + :vartype override_client_require_optional_parameter: + specs.azure.clientgenerator.core.override.aio.operations.OverrideClientRequireOptionalParameterOperations + :ivar override_client_remove_optional_parameter: + OverrideClientRemoveOptionalParameterOperations operations + :vartype override_client_remove_optional_parameter: + specs.azure.clientgenerator.core.override.aio.operations.OverrideClientRemoveOptionalParameterOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -71,16 +73,16 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.reorder_parameters = ReorderParametersOperations( + self.override_client_reorder_parameters = OverrideClientReorderParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.group_parameters = GroupParametersOperations( + self.override_client_group_parameters = OverrideClientGroupParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.require_optional_parameter = RequireOptionalParameterOperations( + self.override_client_require_optional_parameter = OverrideClientRequireOptionalParameterOperations( self._client, self._config, self._serialize, self._deserialize ) - self.remove_optional_parameter = RemoveOptionalParameterOperations( + self.override_client_remove_optional_parameter = OverrideClientRemoveOptionalParameterOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/__init__.py index 66ecd0da32..d9bbfb0019 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ReorderParametersOperations # type: ignore -from ._operations import GroupParametersOperations # type: ignore -from ._operations import RequireOptionalParameterOperations # type: ignore -from ._operations import RemoveOptionalParameterOperations # type: ignore +from ._operations import OverrideClientReorderParametersOperations # type: ignore +from ._operations import OverrideClientGroupParametersOperations # type: ignore +from ._operations import OverrideClientRequireOptionalParameterOperations # type: ignore +from ._operations import OverrideClientRemoveOptionalParameterOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ReorderParametersOperations", - "GroupParametersOperations", - "RequireOptionalParameterOperations", - "RemoveOptionalParameterOperations", + "OverrideClientReorderParametersOperations", + "OverrideClientGroupParametersOperations", + "OverrideClientRequireOptionalParameterOperations", + "OverrideClientRemoveOptionalParameterOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/_operations.py index 8020ce31f3..856cc38614 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/aio/operations/_operations.py @@ -23,10 +23,10 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_group_parameters_group_request, - build_remove_optional_parameter_remove_optional_request, - build_reorder_parameters_reorder_request, - build_require_optional_parameter_require_optional_request, + build_override_client_group_parameters_group_request, + build_override_client_remove_optional_parameter_remove_optional_request, + build_override_client_reorder_parameters_reorder_request, + build_override_client_require_optional_parameter_require_optional_request, ) from .._configuration import OverrideClientConfiguration @@ -34,14 +34,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ReorderParametersOperations: +class OverrideClientReorderParametersOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.aio.OverrideClient`'s - :attr:`reorder_parameters` attribute. + :attr:`override_client_reorder_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def reorder(self, param1: str, param2: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_reorder_parameters_reorder_request( + _request = build_override_client_reorder_parameters_reorder_request( param1=param1, param2=param2, headers=_headers, @@ -102,14 +102,14 @@ async def reorder(self, param1: str, param2: str, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class GroupParametersOperations: +class OverrideClientGroupParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.aio.OverrideClient`'s - :attr:`group_parameters` attribute. + :attr:`override_client_group_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -144,7 +144,7 @@ async def group(self, *, param1: str, param2: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_parameters_group_request( + _request = build_override_client_group_parameters_group_request( param1=param1, param2=param2, headers=_headers, @@ -170,14 +170,14 @@ async def group(self, *, param1: str, param2: str, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class RequireOptionalParameterOperations: +class OverrideClientRequireOptionalParameterOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.aio.OverrideClient`'s - :attr:`require_optional_parameter` attribute. + :attr:`override_client_require_optional_parameter` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -212,7 +212,7 @@ async def require_optional(self, param1: str, param2: str, **kwargs: Any) -> Non cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_require_optional_parameter_require_optional_request( + _request = build_override_client_require_optional_parameter_require_optional_request( param1=param1, param2=param2, headers=_headers, @@ -238,14 +238,14 @@ async def require_optional(self, param1: str, param2: str, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class RemoveOptionalParameterOperations: +class OverrideClientRemoveOptionalParameterOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.aio.OverrideClient`'s - :attr:`remove_optional_parameter` attribute. + :attr:`override_client_remove_optional_parameter` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -280,7 +280,7 @@ async def remove_optional(self, param1: str, *, param2: Optional[str] = None, ** cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_remove_optional_parameter_remove_optional_request( + _request = build_override_client_remove_optional_parameter_remove_optional_request( param1=param1, param2=param2, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/__init__.py index 66ecd0da32..d9bbfb0019 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ReorderParametersOperations # type: ignore -from ._operations import GroupParametersOperations # type: ignore -from ._operations import RequireOptionalParameterOperations # type: ignore -from ._operations import RemoveOptionalParameterOperations # type: ignore +from ._operations import OverrideClientReorderParametersOperations # type: ignore +from ._operations import OverrideClientGroupParametersOperations # type: ignore +from ._operations import OverrideClientRequireOptionalParameterOperations # type: ignore +from ._operations import OverrideClientRemoveOptionalParameterOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ReorderParametersOperations", - "GroupParametersOperations", - "RequireOptionalParameterOperations", - "RemoveOptionalParameterOperations", + "OverrideClientReorderParametersOperations", + "OverrideClientGroupParametersOperations", + "OverrideClientRequireOptionalParameterOperations", + "OverrideClientRemoveOptionalParameterOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/_operations.py index 0f91a78e39..4f6682d688 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-override/specs/azure/clientgenerator/core/override/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_reorder_parameters_reorder_request(param1: str, param2: str, **kwargs: Any) -> HttpRequest: +def build_override_client_reorder_parameters_reorder_request( # pylint: disable=name-too-long + param1: str, param2: str, **kwargs: Any +) -> HttpRequest: # Construct URL _url = "/azure/client-generator-core/override/reorder/{param2}/{param1}" path_format_arguments = { @@ -45,7 +47,9 @@ def build_reorder_parameters_reorder_request(param1: str, param2: str, **kwargs: return HttpRequest(method="GET", url=_url, **kwargs) -def build_group_parameters_group_request(*, param1: str, param2: str, **kwargs: Any) -> HttpRequest: +def build_override_client_group_parameters_group_request( # pylint: disable=name-too-long + *, param1: str, param2: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -58,7 +62,7 @@ def build_group_parameters_group_request(*, param1: str, param2: str, **kwargs: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_require_optional_parameter_require_optional_request( # pylint: disable=name-too-long +def build_override_client_require_optional_parameter_require_optional_request( # pylint: disable=name-too-long param1: str, param2: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,7 +77,7 @@ def build_require_optional_parameter_require_optional_request( # pylint: disabl return HttpRequest(method="GET", url=_url, **kwargs) -def build_remove_optional_parameter_remove_optional_request( # pylint: disable=name-too-long +def build_override_client_remove_optional_parameter_remove_optional_request( # pylint: disable=name-too-long param1: str, *, param2: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -93,14 +97,14 @@ def build_remove_optional_parameter_remove_optional_request( # pylint: disable= return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class ReorderParametersOperations: +class OverrideClientReorderParametersOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.OverrideClient`'s - :attr:`reorder_parameters` attribute. + :attr:`override_client_reorder_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -137,7 +141,7 @@ def reorder( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_reorder_parameters_reorder_request( + _request = build_override_client_reorder_parameters_reorder_request( param1=param1, param2=param2, headers=_headers, @@ -163,14 +167,14 @@ def reorder( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class GroupParametersOperations: +class OverrideClientGroupParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.OverrideClient`'s - :attr:`group_parameters` attribute. + :attr:`override_client_group_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -207,7 +211,7 @@ def group( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_parameters_group_request( + _request = build_override_client_group_parameters_group_request( param1=param1, param2=param2, headers=_headers, @@ -233,14 +237,14 @@ def group( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RequireOptionalParameterOperations: +class OverrideClientRequireOptionalParameterOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.OverrideClient`'s - :attr:`require_optional_parameter` attribute. + :attr:`override_client_require_optional_parameter` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -277,7 +281,7 @@ def require_optional( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_require_optional_parameter_require_optional_request( + _request = build_override_client_require_optional_parameter_require_optional_request( param1=param1, param2=param2, headers=_headers, @@ -303,14 +307,14 @@ def require_optional( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RemoveOptionalParameterOperations: +class OverrideClientRemoveOptionalParameterOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.override.OverrideClient`'s - :attr:`remove_optional_parameter` attribute. + :attr:`override_client_remove_optional_parameter` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -347,7 +351,7 @@ def remove_optional( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_remove_optional_parameter_remove_optional_request( + _request = build_override_client_remove_optional_parameter_remove_optional_request( param1=param1, param2=param2, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/apiview-properties.json index e2cc0050e4..ae61054147 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/apiview-properties.json @@ -6,13 +6,13 @@ "specs.azure.clientgenerator.core.usage.models.OutputModel": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.OutputModel", "specs.azure.clientgenerator.core.usage.models.ResultModel": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.ResultModel", "specs.azure.clientgenerator.core.usage.models.RoundTripModel": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.RoundTripModel", - "specs.azure.clientgenerator.core.usage.operations.ModelInOperationOperations.input_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput", - "specs.azure.clientgenerator.core.usage.aio.operations.ModelInOperationOperations.input_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput", - "specs.azure.clientgenerator.core.usage.operations.ModelInOperationOperations.output_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput", - "specs.azure.clientgenerator.core.usage.aio.operations.ModelInOperationOperations.output_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput", - "specs.azure.clientgenerator.core.usage.operations.ModelInOperationOperations.model_in_read_only_property": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.modelInReadOnlyProperty", - "specs.azure.clientgenerator.core.usage.aio.operations.ModelInOperationOperations.model_in_read_only_property": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.modelInReadOnlyProperty", - "specs.azure.clientgenerator.core.usage.operations.ModelInOperationOperations.orphan_model_serializable": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.orphanModelSerializable", - "specs.azure.clientgenerator.core.usage.aio.operations.ModelInOperationOperations.orphan_model_serializable": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.orphanModelSerializable" + "specs.azure.clientgenerator.core.usage.operations.UsageClientModelInOperationOperations.input_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput", + "specs.azure.clientgenerator.core.usage.aio.operations.UsageClientModelInOperationOperations.input_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput", + "specs.azure.clientgenerator.core.usage.operations.UsageClientModelInOperationOperations.output_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput", + "specs.azure.clientgenerator.core.usage.aio.operations.UsageClientModelInOperationOperations.output_to_input_output": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput", + "specs.azure.clientgenerator.core.usage.operations.UsageClientModelInOperationOperations.model_in_read_only_property": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.modelInReadOnlyProperty", + "specs.azure.clientgenerator.core.usage.aio.operations.UsageClientModelInOperationOperations.model_in_read_only_property": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.modelInReadOnlyProperty", + "specs.azure.clientgenerator.core.usage.operations.UsageClientModelInOperationOperations.orphan_model_serializable": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.orphanModelSerializable", + "specs.azure.clientgenerator.core.usage.aio.operations.UsageClientModelInOperationOperations.orphan_model_serializable": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.orphanModelSerializable" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations.py new file mode 100644 index 0000000000..8b97c09842 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UsageClientTestBase, UsagePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUsageUsageClientModelInOperationOperations(UsageClientTestBase): + @UsagePreparer() + @recorded_by_proxy + def test_usage_client_model_in_operation_input_to_input_output(self, usage_endpoint): + client = self.create_client(endpoint=usage_endpoint) + response = client.usage_client_model_in_operation.input_to_input_output( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy + def test_usage_client_model_in_operation_output_to_input_output(self, usage_endpoint): + client = self.create_client(endpoint=usage_endpoint) + response = client.usage_client_model_in_operation.output_to_input_output() + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy + def test_usage_client_model_in_operation_model_in_read_only_property(self, usage_endpoint): + client = self.create_client(endpoint=usage_endpoint) + response = client.usage_client_model_in_operation.model_in_read_only_property( + body={"result": {"name": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy + def test_usage_client_model_in_operation_orphan_model_serializable(self, usage_endpoint): + client = self.create_client(endpoint=usage_endpoint) + response = client.usage_client_model_in_operation.orphan_model_serializable( + body={}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations_async.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations_async.py new file mode 100644 index 0000000000..7defd127a1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/generated_tests/test_usage_usage_client_model_in_operation_operations_async.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UsagePreparer +from testpreparer_async import UsageClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUsageUsageClientModelInOperationOperationsAsync(UsageClientTestBaseAsync): + @UsagePreparer() + @recorded_by_proxy_async + async def test_usage_client_model_in_operation_input_to_input_output(self, usage_endpoint): + client = self.create_async_client(endpoint=usage_endpoint) + response = await client.usage_client_model_in_operation.input_to_input_output( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy_async + async def test_usage_client_model_in_operation_output_to_input_output(self, usage_endpoint): + client = self.create_async_client(endpoint=usage_endpoint) + response = await client.usage_client_model_in_operation.output_to_input_output() + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy_async + async def test_usage_client_model_in_operation_model_in_read_only_property(self, usage_endpoint): + client = self.create_async_client(endpoint=usage_endpoint) + response = await client.usage_client_model_in_operation.model_in_read_only_property( + body={"result": {"name": "str"}}, + ) + + # please add some check logic here by yourself + # ... + + @UsagePreparer() + @recorded_by_proxy_async + async def test_usage_client_model_in_operation_orphan_model_serializable(self, usage_endpoint): + client = self.create_async_client(endpoint=usage_endpoint) + response = await client.usage_client_model_in_operation.orphan_model_serializable( + body={}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_client.py index e46fc7d382..b02610782d 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/_client.py @@ -16,15 +16,15 @@ from ._configuration import UsageClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ModelInOperationOperations +from .operations import UsageClientModelInOperationOperations class UsageClient: # pylint: disable=client-accepts-api-version-keyword """Test for internal decorator. - :ivar model_in_operation: ModelInOperationOperations operations - :vartype model_in_operation: - specs.azure.clientgenerator.core.usage.operations.ModelInOperationOperations + :ivar usage_client_model_in_operation: UsageClientModelInOperationOperations operations + :vartype usage_client_model_in_operation: + specs.azure.clientgenerator.core.usage.operations.UsageClientModelInOperationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model_in_operation = ModelInOperationOperations( + self.usage_client_model_in_operation = UsageClientModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/_client.py index e613aa05e5..49be3ab3b4 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/_client.py @@ -16,15 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UsageClientConfiguration -from .operations import ModelInOperationOperations +from .operations import UsageClientModelInOperationOperations class UsageClient: # pylint: disable=client-accepts-api-version-keyword """Test for internal decorator. - :ivar model_in_operation: ModelInOperationOperations operations - :vartype model_in_operation: - specs.azure.clientgenerator.core.usage.aio.operations.ModelInOperationOperations + :ivar usage_client_model_in_operation: UsageClientModelInOperationOperations operations + :vartype usage_client_model_in_operation: + specs.azure.clientgenerator.core.usage.aio.operations.UsageClientModelInOperationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model_in_operation = ModelInOperationOperations( + self.usage_client_model_in_operation = UsageClientModelInOperationOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/__init__.py index 9a46cfc7af..baffa4086e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelInOperationOperations # type: ignore +from ._operations import UsageClientModelInOperationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelInOperationOperations", + "UsageClientModelInOperationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py index b843525db5..aa9c3a8645 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/aio/operations/_operations.py @@ -30,10 +30,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_model_in_operation_input_to_input_output_request, - build_model_in_operation_model_in_read_only_property_request, - build_model_in_operation_orphan_model_serializable_request, - build_model_in_operation_output_to_input_output_request, + build_usage_client_model_in_operation_input_to_input_output_request, + build_usage_client_model_in_operation_model_in_read_only_property_request, + build_usage_client_model_in_operation_orphan_model_serializable_request, + build_usage_client_model_in_operation_output_to_input_output_request, ) from .._configuration import UsageClientConfiguration @@ -42,14 +42,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelInOperationOperations: +class UsageClientModelInOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.usage.aio.UsageClient`'s - :attr:`model_in_operation` attribute. + :attr:`usage_client_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -160,7 +160,7 @@ async def input_to_input_output(self, body: Union[_models.InputModel, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_input_to_input_output_request( + _request = build_usage_client_model_in_operation_input_to_input_output_request( content_type=content_type, content=_content, headers=_headers, @@ -212,7 +212,7 @@ async def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: cls: ClsType[_models.OutputModel] = kwargs.pop("cls", None) - _request = build_model_in_operation_output_to_input_output_request( + _request = build_usage_client_model_in_operation_output_to_input_output_request( headers=_headers, params=_params, ) @@ -396,7 +396,7 @@ async def model_in_read_only_property( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_model_in_read_only_property_request( + _request = build_usage_client_model_in_operation_model_in_read_only_property_request( content_type=content_type, content=_content, headers=_headers, @@ -468,7 +468,7 @@ async def orphan_model_serializable(self, body: Any, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_orphan_model_serializable_request( + _request = build_usage_client_model_in_operation_orphan_model_serializable_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/__init__.py index 9a46cfc7af..baffa4086e 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelInOperationOperations # type: ignore +from ._operations import UsageClientModelInOperationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelInOperationOperations", + "UsageClientModelInOperationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py index 5e468d7938..47608a358d 100644 --- a/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-client-generator-core-usage/specs/azure/clientgenerator/core/usage/operations/_operations.py @@ -39,7 +39,7 @@ _SERIALIZER.client_side_validation = False -def build_model_in_operation_input_to_input_output_request( # pylint: disable=name-too-long +def build_usage_client_model_in_operation_input_to_input_output_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -55,7 +55,7 @@ def build_model_in_operation_input_to_input_output_request( # pylint: disable=n return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_in_operation_output_to_input_output_request( # pylint: disable=name-too-long +def build_usage_client_model_in_operation_output_to_input_output_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -71,7 +71,7 @@ def build_model_in_operation_output_to_input_output_request( # pylint: disable= return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_in_operation_model_in_read_only_property_request( # pylint: disable=name-too-long +def build_usage_client_model_in_operation_model_in_read_only_property_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -90,7 +90,7 @@ def build_model_in_operation_model_in_read_only_property_request( # pylint: dis return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_in_operation_orphan_model_serializable_request( # pylint: disable=name-too-long +def build_usage_client_model_in_operation_orphan_model_serializable_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -105,14 +105,14 @@ def build_model_in_operation_orphan_model_serializable_request( # pylint: disab return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ModelInOperationOperations: +class UsageClientModelInOperationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.clientgenerator.core.usage.UsageClient`'s - :attr:`model_in_operation` attribute. + :attr:`usage_client_model_in_operation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -223,7 +223,7 @@ def input_to_input_output( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_input_to_input_output_request( + _request = build_usage_client_model_in_operation_input_to_input_output_request( content_type=content_type, content=_content, headers=_headers, @@ -275,7 +275,7 @@ def output_to_input_output(self, **kwargs: Any) -> _models.OutputModel: cls: ClsType[_models.OutputModel] = kwargs.pop("cls", None) - _request = build_model_in_operation_output_to_input_output_request( + _request = build_usage_client_model_in_operation_output_to_input_output_request( headers=_headers, params=_params, ) @@ -459,7 +459,7 @@ def model_in_read_only_property( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_model_in_read_only_property_request( + _request = build_usage_client_model_in_operation_model_in_read_only_property_request( content_type=content_type, content=_content, headers=_headers, @@ -533,7 +533,7 @@ def orphan_model_serializable( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_in_operation_orphan_model_serializable_request( + _request = build_usage_client_model_in_operation_orphan_model_serializable_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-model/apiview-properties.json index 0ad4df9df3..50a4fc4ce6 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-model/apiview-properties.json @@ -2,11 +2,11 @@ "CrossLanguagePackageId": "_Specs_.Azure.Core.Model", "CrossLanguageDefinitionId": { "specs.azure.core.model.models.AzureEmbeddingModel": "_Specs_.Azure.Core.Model.AzureEmbeddingModel", - "specs.azure.core.model.operations.AzureCoreEmbeddingVectorOperations.get": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.get", - "specs.azure.core.model.aio.operations.AzureCoreEmbeddingVectorOperations.get": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.get", - "specs.azure.core.model.operations.AzureCoreEmbeddingVectorOperations.put": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.put", - "specs.azure.core.model.aio.operations.AzureCoreEmbeddingVectorOperations.put": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.put", - "specs.azure.core.model.operations.AzureCoreEmbeddingVectorOperations.post": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.post", - "specs.azure.core.model.aio.operations.AzureCoreEmbeddingVectorOperations.post": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.post" + "specs.azure.core.model.operations.ModelClientAzureCoreEmbeddingVectorOperations.get": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.get", + "specs.azure.core.model.aio.operations.ModelClientAzureCoreEmbeddingVectorOperations.get": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.get", + "specs.azure.core.model.operations.ModelClientAzureCoreEmbeddingVectorOperations.put": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.put", + "specs.azure.core.model.aio.operations.ModelClientAzureCoreEmbeddingVectorOperations.put": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.put", + "specs.azure.core.model.operations.ModelClientAzureCoreEmbeddingVectorOperations.post": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.post", + "specs.azure.core.model.aio.operations.ModelClientAzureCoreEmbeddingVectorOperations.post": "_Specs_.Azure.Core.Model.AzureCoreEmbeddingVector.post" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations.py b/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations.py new file mode 100644 index 0000000000..e3e2aed473 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ModelClientTestBase, ModelPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestModelModelClientAzureCoreEmbeddingVectorOperations(ModelClientTestBase): + @ModelPreparer() + @recorded_by_proxy + def test_model_client_azure_core_embedding_vector_get(self, model_endpoint): + client = self.create_client(endpoint=model_endpoint) + response = client.model_client_azure_core_embedding_vector.get() + + # please add some check logic here by yourself + # ... + + @ModelPreparer() + @recorded_by_proxy + def test_model_client_azure_core_embedding_vector_put(self, model_endpoint): + client = self.create_client(endpoint=model_endpoint) + response = client.model_client_azure_core_embedding_vector.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... + + @ModelPreparer() + @recorded_by_proxy + def test_model_client_azure_core_embedding_vector_post(self, model_endpoint): + client = self.create_client(endpoint=model_endpoint) + response = client.model_client_azure_core_embedding_vector.post( + body={"embedding": [0]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations_async.py b/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations_async.py new file mode 100644 index 0000000000..9376727033 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-model/generated_tests/test_model_model_client_azure_core_embedding_vector_operations_async.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ModelPreparer +from testpreparer_async import ModelClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestModelModelClientAzureCoreEmbeddingVectorOperationsAsync(ModelClientTestBaseAsync): + @ModelPreparer() + @recorded_by_proxy_async + async def test_model_client_azure_core_embedding_vector_get(self, model_endpoint): + client = self.create_async_client(endpoint=model_endpoint) + response = await client.model_client_azure_core_embedding_vector.get() + + # please add some check logic here by yourself + # ... + + @ModelPreparer() + @recorded_by_proxy_async + async def test_model_client_azure_core_embedding_vector_put(self, model_endpoint): + client = self.create_async_client(endpoint=model_endpoint) + response = await client.model_client_azure_core_embedding_vector.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... + + @ModelPreparer() + @recorded_by_proxy_async + async def test_model_client_azure_core_embedding_vector_post(self, model_endpoint): + client = self.create_async_client(endpoint=model_endpoint) + response = await client.model_client_azure_core_embedding_vector.post( + body={"embedding": [0]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_client.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_client.py index e058323504..123147ec08 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/_client.py @@ -16,15 +16,16 @@ from ._configuration import ModelClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import AzureCoreEmbeddingVectorOperations +from .operations import ModelClientAzureCoreEmbeddingVectorOperations class ModelClient: # pylint: disable=client-accepts-api-version-keyword """ModelClient. - :ivar azure_core_embedding_vector: AzureCoreEmbeddingVectorOperations operations - :vartype azure_core_embedding_vector: - specs.azure.core.model.operations.AzureCoreEmbeddingVectorOperations + :ivar model_client_azure_core_embedding_vector: ModelClientAzureCoreEmbeddingVectorOperations + operations + :vartype model_client_azure_core_embedding_vector: + specs.azure.core.model.operations.ModelClientAzureCoreEmbeddingVectorOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +58,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.azure_core_embedding_vector = AzureCoreEmbeddingVectorOperations( + self.model_client_azure_core_embedding_vector = ModelClientAzureCoreEmbeddingVectorOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/_client.py index 13c47c2bae..edd5499382 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/_client.py @@ -16,15 +16,16 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ModelClientConfiguration -from .operations import AzureCoreEmbeddingVectorOperations +from .operations import ModelClientAzureCoreEmbeddingVectorOperations class ModelClient: # pylint: disable=client-accepts-api-version-keyword """ModelClient. - :ivar azure_core_embedding_vector: AzureCoreEmbeddingVectorOperations operations - :vartype azure_core_embedding_vector: - specs.azure.core.model.aio.operations.AzureCoreEmbeddingVectorOperations + :ivar model_client_azure_core_embedding_vector: ModelClientAzureCoreEmbeddingVectorOperations + operations + :vartype model_client_azure_core_embedding_vector: + specs.azure.core.model.aio.operations.ModelClientAzureCoreEmbeddingVectorOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +58,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.azure_core_embedding_vector = AzureCoreEmbeddingVectorOperations( + self.model_client_azure_core_embedding_vector = ModelClientAzureCoreEmbeddingVectorOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/__init__.py index 74e18edeac..22708d5a82 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AzureCoreEmbeddingVectorOperations # type: ignore +from ._operations import ModelClientAzureCoreEmbeddingVectorOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AzureCoreEmbeddingVectorOperations", + "ModelClientAzureCoreEmbeddingVectorOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py index 4a318b7502..18c5b8d640 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/aio/operations/_operations.py @@ -30,9 +30,9 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_azure_core_embedding_vector_get_request, - build_azure_core_embedding_vector_post_request, - build_azure_core_embedding_vector_put_request, + build_model_client_azure_core_embedding_vector_get_request, + build_model_client_azure_core_embedding_vector_post_request, + build_model_client_azure_core_embedding_vector_put_request, ) from .._configuration import ModelClientConfiguration @@ -41,14 +41,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class AzureCoreEmbeddingVectorOperations: +class ModelClientAzureCoreEmbeddingVectorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.model.aio.ModelClient`'s - :attr:`azure_core_embedding_vector` attribute. + :attr:`model_client_azure_core_embedding_vector` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -79,7 +79,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_azure_core_embedding_vector_get_request( + _request = build_model_client_azure_core_embedding_vector_get_request( headers=_headers, params=_params, ) @@ -173,7 +173,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_core_embedding_vector_put_request( + _request = build_model_client_azure_core_embedding_vector_put_request( content_type=content_type, content=_content, headers=_headers, @@ -279,7 +279,7 @@ async def post( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_core_embedding_vector_post_request( + _request = build_model_client_azure_core_embedding_vector_post_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/__init__.py index 74e18edeac..22708d5a82 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AzureCoreEmbeddingVectorOperations # type: ignore +from ._operations import ModelClientAzureCoreEmbeddingVectorOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AzureCoreEmbeddingVectorOperations", + "ModelClientAzureCoreEmbeddingVectorOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py index 0a24ac2cf2..e5ac02375a 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-model/specs/azure/core/model/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_azure_core_embedding_vector_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_model_client_azure_core_embedding_vector_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -53,7 +55,9 @@ def build_azure_core_embedding_vector_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_azure_core_embedding_vector_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_model_client_azure_core_embedding_vector_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -67,7 +71,9 @@ def build_azure_core_embedding_vector_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_azure_core_embedding_vector_post_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_model_client_azure_core_embedding_vector_post_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -84,14 +90,14 @@ def build_azure_core_embedding_vector_post_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class AzureCoreEmbeddingVectorOperations: +class ModelClientAzureCoreEmbeddingVectorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.model.ModelClient`'s - :attr:`azure_core_embedding_vector` attribute. + :attr:`model_client_azure_core_embedding_vector` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -122,7 +128,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_azure_core_embedding_vector_get_request( + _request = build_model_client_azure_core_embedding_vector_get_request( headers=_headers, params=_params, ) @@ -218,7 +224,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_core_embedding_vector_put_request( + _request = build_model_client_azure_core_embedding_vector_put_request( content_type=content_type, content=_content, headers=_headers, @@ -322,7 +328,7 @@ def post( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_core_embedding_vector_post_request( + _request = build_model_client_azure_core_embedding_vector_post_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-page/apiview-properties.json index 59c7f7af80..0ad644ba50 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-page/apiview-properties.json @@ -7,10 +7,10 @@ "specs.azure.core.page.models.User": "_Specs_.Azure.Core.Page.User", "specs.azure.core.page.models.UserOrder": "_Specs_.Azure.Core.Page.UserOrder", "specs.azure.core.page.models.ListItemInputExtensibleEnum": "_Specs_.Azure.Core.Page.ListItemInputExtensibleEnum", - "specs.azure.core.page.operations.TwoModelsAsPageItemOperations.list_first_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listFirstItem", - "specs.azure.core.page.aio.operations.TwoModelsAsPageItemOperations.list_first_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listFirstItem", - "specs.azure.core.page.operations.TwoModelsAsPageItemOperations.list_second_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listSecondItem", - "specs.azure.core.page.aio.operations.TwoModelsAsPageItemOperations.list_second_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listSecondItem", + "specs.azure.core.page.operations.PageClientTwoModelsAsPageItemOperations.list_first_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listFirstItem", + "specs.azure.core.page.aio.operations.PageClientTwoModelsAsPageItemOperations.list_first_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listFirstItem", + "specs.azure.core.page.operations.PageClientTwoModelsAsPageItemOperations.list_second_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listSecondItem", + "specs.azure.core.page.aio.operations.PageClientTwoModelsAsPageItemOperations.list_second_item": "_Specs_.Azure.Core.Page.TwoModelsAsPageItem.listSecondItem", "specs.azure.core.page.PageClient.list_with_page": "_Specs_.Azure.Core.Page.listWithPage", "specs.azure.core.page.aio.PageClient.list_with_page": "_Specs_.Azure.Core.Page.listWithPage", "specs.azure.core.page.PageClient.list_with_parameters": "_Specs_.Azure.Core.Page.listWithParameters", diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations.py b/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations.py new file mode 100644 index 0000000000..28b309be8d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import PageClientTestBase, PagePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPagePageClientTwoModelsAsPageItemOperations(PageClientTestBase): + @PagePreparer() + @recorded_by_proxy + def test_page_client_two_models_as_page_item_list_first_item(self, page_endpoint): + client = self.create_client(endpoint=page_endpoint) + response = client.page_client_two_models_as_page_item.list_first_item() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PagePreparer() + @recorded_by_proxy + def test_page_client_two_models_as_page_item_list_second_item(self, page_endpoint): + client = self.create_client(endpoint=page_endpoint) + response = client.page_client_two_models_as_page_item.list_second_item() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations_async.py b/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations_async.py new file mode 100644 index 0000000000..7891888454 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-page/generated_tests/test_page_page_client_two_models_as_page_item_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import PagePreparer +from testpreparer_async import PageClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPagePageClientTwoModelsAsPageItemOperationsAsync(PageClientTestBaseAsync): + @PagePreparer() + @recorded_by_proxy_async + async def test_page_client_two_models_as_page_item_list_first_item(self, page_endpoint): + client = self.create_async_client(endpoint=page_endpoint) + response = client.page_client_two_models_as_page_item.list_first_item() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PagePreparer() + @recorded_by_proxy_async + async def test_page_client_two_models_as_page_item_list_second_item(self, page_endpoint): + client = self.create_async_client(endpoint=page_endpoint) + response = client.page_client_two_models_as_page_item.list_second_item() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py index 6f54d0d78c..a9372996d6 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/_client.py @@ -16,15 +16,15 @@ from ._configuration import PageClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import TwoModelsAsPageItemOperations, _PageClientOperationsMixin +from .operations import PageClientTwoModelsAsPageItemOperations, _PageClientOperationsMixin class PageClient(_PageClientOperationsMixin): """Illustrates bodies templated with Azure Core with paging support. - :ivar two_models_as_page_item: TwoModelsAsPageItemOperations operations - :vartype two_models_as_page_item: - specs.azure.core.page.operations.TwoModelsAsPageItemOperations + :ivar page_client_two_models_as_page_item: PageClientTwoModelsAsPageItemOperations operations + :vartype page_client_two_models_as_page_item: + specs.azure.core.page.operations.PageClientTwoModelsAsPageItemOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str :keyword api_version: The API version to use for this operation. Known values are @@ -61,7 +61,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.two_models_as_page_item = TwoModelsAsPageItemOperations( + self.page_client_two_models_as_page_item = PageClientTwoModelsAsPageItemOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py index cfc82cfd70..f6b77cb792 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/_client.py @@ -16,15 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import PageClientConfiguration -from .operations import TwoModelsAsPageItemOperations, _PageClientOperationsMixin +from .operations import PageClientTwoModelsAsPageItemOperations, _PageClientOperationsMixin class PageClient(_PageClientOperationsMixin): """Illustrates bodies templated with Azure Core with paging support. - :ivar two_models_as_page_item: TwoModelsAsPageItemOperations operations - :vartype two_models_as_page_item: - specs.azure.core.page.aio.operations.TwoModelsAsPageItemOperations + :ivar page_client_two_models_as_page_item: PageClientTwoModelsAsPageItemOperations operations + :vartype page_client_two_models_as_page_item: + specs.azure.core.page.aio.operations.PageClientTwoModelsAsPageItemOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str :keyword api_version: The API version to use for this operation. Known values are @@ -61,7 +61,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.two_models_as_page_item = TwoModelsAsPageItemOperations( + self.page_client_two_models_as_page_item = PageClientTwoModelsAsPageItemOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py index 775b850d5e..c4ccb3ae6b 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TwoModelsAsPageItemOperations # type: ignore +from ._operations import PageClientTwoModelsAsPageItemOperations # type: ignore from ._operations import _PageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TwoModelsAsPageItemOperations", + "PageClientTwoModelsAsPageItemOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py index 0d0940749c..c399496683 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/aio/operations/_operations.py @@ -32,13 +32,13 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( + build_page_client_two_models_as_page_item_list_first_item_request, + build_page_client_two_models_as_page_item_list_second_item_request, build_page_list_with_custom_page_model_request, build_page_list_with_page_request, build_page_list_with_parameters_request, build_page_with_parameterized_next_link_request, build_page_with_relative_next_link_request, - build_two_models_as_page_item_list_first_item_request, - build_two_models_as_page_item_list_second_item_request, ) from .._configuration import PageClientConfiguration @@ -47,14 +47,14 @@ JSON = MutableMapping[str, Any] -class TwoModelsAsPageItemOperations: +class PageClientTwoModelsAsPageItemOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.page.aio.PageClient`'s - :attr:`two_models_as_page_item` attribute. + :attr:`page_client_two_models_as_page_item` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -89,7 +89,7 @@ def list_first_item(self, **kwargs: Any) -> AsyncItemPaged["_models.FirstItem"]: def prepare_request(next_link=None): if not next_link: - _request = build_two_models_as_page_item_list_first_item_request( + _request = build_page_client_two_models_as_page_item_list_first_item_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -172,7 +172,7 @@ def list_second_item(self, **kwargs: Any) -> AsyncItemPaged["_models.SecondItem" def prepare_request(next_link=None): if not next_link: - _request = build_two_models_as_page_item_list_second_item_request( + _request = build_page_client_two_models_as_page_item_list_second_item_request( api_version=self._config.api_version, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py index 775b850d5e..c4ccb3ae6b 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TwoModelsAsPageItemOperations # type: ignore +from ._operations import PageClientTwoModelsAsPageItemOperations # type: ignore from ._operations import _PageClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TwoModelsAsPageItemOperations", + "PageClientTwoModelsAsPageItemOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py index e295609d87..9e199b86df 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-page/specs/azure/core/page/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_two_models_as_page_item_list_first_item_request( # pylint: disable=name-too-long +def build_page_client_two_models_as_page_item_list_first_item_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -61,7 +61,7 @@ def build_two_models_as_page_item_list_first_item_request( # pylint: disable=na return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_models_as_page_item_list_second_item_request( # pylint: disable=name-too-long +def build_page_client_two_models_as_page_item_list_second_item_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -182,14 +182,14 @@ def build_page_with_relative_next_link_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class TwoModelsAsPageItemOperations: +class PageClientTwoModelsAsPageItemOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.page.PageClient`'s - :attr:`two_models_as_page_item` attribute. + :attr:`page_client_two_models_as_page_item` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -224,7 +224,7 @@ def list_first_item(self, **kwargs: Any) -> ItemPaged["_models.FirstItem"]: def prepare_request(next_link=None): if not next_link: - _request = build_two_models_as_page_item_list_first_item_request( + _request = build_page_client_two_models_as_page_item_list_first_item_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -307,7 +307,7 @@ def list_second_item(self, **kwargs: Any) -> ItemPaged["_models.SecondItem"]: def prepare_request(next_link=None): if not next_link: - _request = build_two_models_as_page_item_list_second_item_request( + _request = build_page_client_two_models_as_page_item_list_second_item_request( api_version=self._config.api_version, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-core-scalar/apiview-properties.json index 48fb2eef11..d254544ced 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/apiview-properties.json @@ -2,15 +2,15 @@ "CrossLanguagePackageId": "_Specs_.Azure.Core.Scalar", "CrossLanguageDefinitionId": { "specs.azure.core.scalar.models.AzureLocationModel": "_Specs_.Azure.Core.Scalar.AzureLocationModel", - "specs.azure.core.scalar.operations.AzureLocationScalarOperations.get": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.get", - "specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations.get": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.get", - "specs.azure.core.scalar.operations.AzureLocationScalarOperations.put": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.put", - "specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations.put": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.put", - "specs.azure.core.scalar.operations.AzureLocationScalarOperations.post": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.post", - "specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations.post": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.post", - "specs.azure.core.scalar.operations.AzureLocationScalarOperations.header": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.header", - "specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations.header": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.header", - "specs.azure.core.scalar.operations.AzureLocationScalarOperations.query": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.query", - "specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations.query": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.query" + "specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations.get": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.get", + "specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations.get": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.get", + "specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations.put": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.put", + "specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations.put": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.put", + "specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations.post": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.post", + "specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations.post": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.post", + "specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations.header": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.header", + "specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations.header": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.header", + "specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations.query": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.query", + "specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations.query": "_Specs_.Azure.Core.Scalar.AzureLocationScalar.query" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations.py new file mode 100644 index 0000000000..672bc7fde0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientAzureLocationScalarOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_azure_location_scalar_get(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_azure_location_scalar.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_azure_location_scalar_put(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_azure_location_scalar.put( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_azure_location_scalar_post(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_azure_location_scalar.post( + body={"location": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_azure_location_scalar_header(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_azure_location_scalar.header( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_azure_location_scalar_query(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_azure_location_scalar.query( + region="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations_async.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations_async.py new file mode 100644 index 0000000000..7800f4a8f2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/generated_tests/test_scalar_scalar_client_azure_location_scalar_operations_async.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientAzureLocationScalarOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_azure_location_scalar_get(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_azure_location_scalar.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_azure_location_scalar_put(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_azure_location_scalar.put( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_azure_location_scalar_post(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_azure_location_scalar.post( + body={"location": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_azure_location_scalar_header(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_azure_location_scalar.header( + region="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_azure_location_scalar_query(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_azure_location_scalar.query( + region="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_client.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_client.py index ce90cf2486..95f5ca584e 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/_client.py @@ -16,15 +16,15 @@ from ._configuration import ScalarClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import AzureLocationScalarOperations +from .operations import ScalarClientAzureLocationScalarOperations class ScalarClient: # pylint: disable=client-accepts-api-version-keyword """ScalarClient. - :ivar azure_location_scalar: AzureLocationScalarOperations operations - :vartype azure_location_scalar: - specs.azure.core.scalar.operations.AzureLocationScalarOperations + :ivar scalar_client_azure_location_scalar: ScalarClientAzureLocationScalarOperations operations + :vartype scalar_client_azure_location_scalar: + specs.azure.core.scalar.operations.ScalarClientAzureLocationScalarOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.azure_location_scalar = AzureLocationScalarOperations( + self.scalar_client_azure_location_scalar = ScalarClientAzureLocationScalarOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/_client.py index 069a26f68e..4d6a3328a0 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/_client.py @@ -16,15 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ScalarClientConfiguration -from .operations import AzureLocationScalarOperations +from .operations import ScalarClientAzureLocationScalarOperations class ScalarClient: # pylint: disable=client-accepts-api-version-keyword """ScalarClient. - :ivar azure_location_scalar: AzureLocationScalarOperations operations - :vartype azure_location_scalar: - specs.azure.core.scalar.aio.operations.AzureLocationScalarOperations + :ivar scalar_client_azure_location_scalar: ScalarClientAzureLocationScalarOperations operations + :vartype scalar_client_azure_location_scalar: + specs.azure.core.scalar.aio.operations.ScalarClientAzureLocationScalarOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -57,7 +57,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.azure_location_scalar = AzureLocationScalarOperations( + self.scalar_client_azure_location_scalar = ScalarClientAzureLocationScalarOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/__init__.py index f029546c55..2eab5788ad 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AzureLocationScalarOperations # type: ignore +from ._operations import ScalarClientAzureLocationScalarOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AzureLocationScalarOperations", + "ScalarClientAzureLocationScalarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py index d72f83fb50..db066b6b92 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/aio/operations/_operations.py @@ -30,11 +30,11 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_azure_location_scalar_get_request, - build_azure_location_scalar_header_request, - build_azure_location_scalar_post_request, - build_azure_location_scalar_put_request, - build_azure_location_scalar_query_request, + build_scalar_client_azure_location_scalar_get_request, + build_scalar_client_azure_location_scalar_header_request, + build_scalar_client_azure_location_scalar_post_request, + build_scalar_client_azure_location_scalar_put_request, + build_scalar_client_azure_location_scalar_query_request, ) from .._configuration import ScalarClientConfiguration @@ -43,14 +43,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class AzureLocationScalarOperations: +class ScalarClientAzureLocationScalarOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.scalar.aio.ScalarClient`'s - :attr:`azure_location_scalar` attribute. + :attr:`scalar_client_azure_location_scalar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -81,7 +81,7 @@ async def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_get_request( + _request = build_scalar_client_azure_location_scalar_get_request( headers=_headers, params=_params, ) @@ -145,7 +145,7 @@ async def put(self, body: str, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_location_scalar_put_request( + _request = build_scalar_client_azure_location_scalar_put_request( content_type=content_type, content=_content, headers=_headers, @@ -251,7 +251,7 @@ async def post( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_location_scalar_post_request( + _request = build_scalar_client_azure_location_scalar_post_request( content_type=content_type, content=_content, headers=_headers, @@ -311,7 +311,7 @@ async def header(self, *, region: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_header_request( + _request = build_scalar_client_azure_location_scalar_header_request( region=region, headers=_headers, params=_params, @@ -358,7 +358,7 @@ async def query(self, *, region: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_query_request( + _request = build_scalar_client_azure_location_scalar_query_request( region=region, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/__init__.py index f029546c55..2eab5788ad 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AzureLocationScalarOperations # type: ignore +from ._operations import ScalarClientAzureLocationScalarOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AzureLocationScalarOperations", + "ScalarClientAzureLocationScalarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py index 31985d95a6..03350d0e2a 100644 --- a/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-core-scalar/specs/azure/core/scalar/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_azure_location_scalar_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_azure_location_scalar_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -53,7 +55,9 @@ def build_azure_location_scalar_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_azure_location_scalar_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_azure_location_scalar_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -66,7 +70,9 @@ def build_azure_location_scalar_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_azure_location_scalar_post_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_azure_location_scalar_post_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("content-type", None)) @@ -83,7 +89,7 @@ def build_azure_location_scalar_post_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_azure_location_scalar_header_request( # pylint: disable=name-too-long +def build_scalar_client_azure_location_scalar_header_request( # pylint: disable=name-too-long *, region: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -97,7 +103,7 @@ def build_azure_location_scalar_header_request( # pylint: disable=name-too-long return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_azure_location_scalar_query_request( # pylint: disable=name-too-long +def build_scalar_client_azure_location_scalar_query_request( # pylint: disable=name-too-long *, region: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -111,14 +117,14 @@ def build_azure_location_scalar_query_request( # pylint: disable=name-too-long return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -class AzureLocationScalarOperations: +class ScalarClientAzureLocationScalarOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.azure.core.scalar.ScalarClient`'s - :attr:`azure_location_scalar` attribute. + :attr:`scalar_client_azure_location_scalar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -149,7 +155,7 @@ def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_get_request( + _request = build_scalar_client_azure_location_scalar_get_request( headers=_headers, params=_params, ) @@ -213,7 +219,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_location_scalar_put_request( + _request = build_scalar_client_azure_location_scalar_put_request( content_type=content_type, content=_content, headers=_headers, @@ -317,7 +323,7 @@ def post( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_azure_location_scalar_post_request( + _request = build_scalar_client_azure_location_scalar_post_request( content_type=content_type, content=_content, headers=_headers, @@ -377,7 +383,7 @@ def header(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=inco cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_header_request( + _request = build_scalar_client_azure_location_scalar_header_request( region=region, headers=_headers, params=_params, @@ -424,7 +430,7 @@ def query(self, *, region: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_azure_location_scalar_query_request( + _request = build_scalar_client_azure_location_scalar_query_request( region=region, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/apiview-properties.json index ed77be5ba4..0826476156 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/apiview-properties.json @@ -19,15 +19,15 @@ "azure.resourcemanager.commonproperties.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", "azure.resourcemanager.commonproperties.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.resourcemanager.commonproperties.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", - "azure.resourcemanager.commonproperties.operations.ManagedIdentityOperations.get": "Azure.ResourceManager.CommonProperties.ManagedIdentity.get", - "azure.resourcemanager.commonproperties.aio.operations.ManagedIdentityOperations.get": "Azure.ResourceManager.CommonProperties.ManagedIdentity.get", - "azure.resourcemanager.commonproperties.operations.ManagedIdentityOperations.create_with_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.createWithSystemAssigned", - "azure.resourcemanager.commonproperties.aio.operations.ManagedIdentityOperations.create_with_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.createWithSystemAssigned", - "azure.resourcemanager.commonproperties.operations.ManagedIdentityOperations.update_with_user_assigned_and_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.updateWithUserAssignedAndSystemAssigned", - "azure.resourcemanager.commonproperties.aio.operations.ManagedIdentityOperations.update_with_user_assigned_and_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.updateWithUserAssignedAndSystemAssigned", - "azure.resourcemanager.commonproperties.operations.ErrorOperations.get_for_predefined_error": "Azure.ResourceManager.CommonProperties.Error.getForPredefinedError", - "azure.resourcemanager.commonproperties.aio.operations.ErrorOperations.get_for_predefined_error": "Azure.ResourceManager.CommonProperties.Error.getForPredefinedError", - "azure.resourcemanager.commonproperties.operations.ErrorOperations.create_for_user_defined_error": "Azure.ResourceManager.CommonProperties.Error.createForUserDefinedError", - "azure.resourcemanager.commonproperties.aio.operations.ErrorOperations.create_for_user_defined_error": "Azure.ResourceManager.CommonProperties.Error.createForUserDefinedError" + "azure.resourcemanager.commonproperties.operations.CommonPropertiesClientManagedIdentityOperations.get": "Azure.ResourceManager.CommonProperties.ManagedIdentity.get", + "azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientManagedIdentityOperations.get": "Azure.ResourceManager.CommonProperties.ManagedIdentity.get", + "azure.resourcemanager.commonproperties.operations.CommonPropertiesClientManagedIdentityOperations.create_with_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.createWithSystemAssigned", + "azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientManagedIdentityOperations.create_with_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.createWithSystemAssigned", + "azure.resourcemanager.commonproperties.operations.CommonPropertiesClientManagedIdentityOperations.update_with_user_assigned_and_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.updateWithUserAssignedAndSystemAssigned", + "azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientManagedIdentityOperations.update_with_user_assigned_and_system_assigned": "Azure.ResourceManager.CommonProperties.ManagedIdentity.updateWithUserAssignedAndSystemAssigned", + "azure.resourcemanager.commonproperties.operations.CommonPropertiesClientErrorOperations.get_for_predefined_error": "Azure.ResourceManager.CommonProperties.Error.getForPredefinedError", + "azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientErrorOperations.get_for_predefined_error": "Azure.ResourceManager.CommonProperties.Error.getForPredefinedError", + "azure.resourcemanager.commonproperties.operations.CommonPropertiesClientErrorOperations.create_for_user_defined_error": "Azure.ResourceManager.CommonProperties.Error.createForUserDefinedError", + "azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientErrorOperations.create_for_user_defined_error": "Azure.ResourceManager.CommonProperties.Error.createForUserDefinedError" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_client.py index 00274df6f9..391f905925 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/_client.py @@ -19,7 +19,7 @@ from ._configuration import CommonPropertiesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ErrorOperations, ManagedIdentityOperations +from .operations import CommonPropertiesClientErrorOperations, CommonPropertiesClientManagedIdentityOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,11 +29,13 @@ class CommonPropertiesClient: """Arm Managed Identity Provider management API. - :ivar managed_identity: ManagedIdentityOperations operations - :vartype managed_identity: - azure.resourcemanager.commonproperties.operations.ManagedIdentityOperations - :ivar error: ErrorOperations operations - :vartype error: azure.resourcemanager.commonproperties.operations.ErrorOperations + :ivar common_properties_client_managed_identity: + CommonPropertiesClientManagedIdentityOperations operations + :vartype common_properties_client_managed_identity: + azure.resourcemanager.commonproperties.operations.CommonPropertiesClientManagedIdentityOperations + :ivar common_properties_client_error: CommonPropertiesClientErrorOperations operations + :vartype common_properties_client_error: + azure.resourcemanager.commonproperties.operations.CommonPropertiesClientErrorOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -96,10 +98,12 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.managed_identity = ManagedIdentityOperations( + self.common_properties_client_managed_identity = CommonPropertiesClientManagedIdentityOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.common_properties_client_error = CommonPropertiesClientErrorOperations( self._client, self._config, self._serialize, self._deserialize ) - self.error = ErrorOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_client.py index 3e03cbea77..62d67a874e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CommonPropertiesClientConfiguration -from .operations import ErrorOperations, ManagedIdentityOperations +from .operations import CommonPropertiesClientErrorOperations, CommonPropertiesClientManagedIdentityOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,11 +29,13 @@ class CommonPropertiesClient: """Arm Managed Identity Provider management API. - :ivar managed_identity: ManagedIdentityOperations operations - :vartype managed_identity: - azure.resourcemanager.commonproperties.aio.operations.ManagedIdentityOperations - :ivar error: ErrorOperations operations - :vartype error: azure.resourcemanager.commonproperties.aio.operations.ErrorOperations + :ivar common_properties_client_managed_identity: + CommonPropertiesClientManagedIdentityOperations operations + :vartype common_properties_client_managed_identity: + azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientManagedIdentityOperations + :ivar common_properties_client_error: CommonPropertiesClientErrorOperations operations + :vartype common_properties_client_error: + azure.resourcemanager.commonproperties.aio.operations.CommonPropertiesClientErrorOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -98,10 +100,12 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.managed_identity = ManagedIdentityOperations( + self.common_properties_client_managed_identity = CommonPropertiesClientManagedIdentityOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.common_properties_client_error = CommonPropertiesClientErrorOperations( self._client, self._config, self._serialize, self._deserialize ) - self.error = ErrorOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/__init__.py index f406b6d443..5fa1043e33 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ManagedIdentityOperations # type: ignore -from ._operations import ErrorOperations # type: ignore +from ._operations import CommonPropertiesClientManagedIdentityOperations # type: ignore +from ._operations import CommonPropertiesClientErrorOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ManagedIdentityOperations", - "ErrorOperations", + "CommonPropertiesClientManagedIdentityOperations", + "CommonPropertiesClientErrorOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py index 71f27f84b6..fc4d4c9e42 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py @@ -31,11 +31,11 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_error_create_for_user_defined_error_request, - build_error_get_for_predefined_error_request, - build_managed_identity_create_with_system_assigned_request, - build_managed_identity_get_request, - build_managed_identity_update_with_user_assigned_and_system_assigned_request, + build_common_properties_client_error_create_for_user_defined_error_request, + build_common_properties_client_error_get_for_predefined_error_request, + build_common_properties_client_managed_identity_create_with_system_assigned_request, + build_common_properties_client_managed_identity_get_request, + build_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned_request, ) from .._configuration import CommonPropertiesClientConfiguration @@ -44,14 +44,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ManagedIdentityOperations: +class CommonPropertiesClientManagedIdentityOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.commonproperties.aio.CommonPropertiesClient`'s - :attr:`managed_identity` attribute. + :attr:`common_properties_client_managed_identity` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -90,7 +90,7 @@ async def get( cls: ClsType[_models.ManagedIdentityTrackedResource] = kwargs.pop("cls", None) - _request = build_managed_identity_get_request( + _request = build_common_properties_client_managed_identity_get_request( resource_group_name=resource_group_name, managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -262,7 +262,7 @@ async def create_with_system_assigned( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_identity_create_with_system_assigned_request( + _request = build_common_properties_client_managed_identity_create_with_system_assigned_request( resource_group_name=resource_group_name, managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -436,15 +436,17 @@ async def update_with_user_assigned_and_system_assigned( # pylint: disable=name else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_identity_update_with_user_assigned_and_system_assigned_request( - resource_group_name=resource_group_name, - managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, + _request = ( + build_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned_request( + resource_group_name=resource_group_name, + managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -482,14 +484,14 @@ async def update_with_user_assigned_and_system_assigned( # pylint: disable=name return deserialized # type: ignore -class ErrorOperations: +class CommonPropertiesClientErrorOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.commonproperties.aio.CommonPropertiesClient`'s - :attr:`error` attribute. + :attr:`common_properties_client_error` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -527,7 +529,7 @@ async def get_for_predefined_error( cls: ClsType[_models.ConfidentialResource] = kwargs.pop("cls", None) - _request = build_error_get_for_predefined_error_request( + _request = build_common_properties_client_error_get_for_predefined_error_request( resource_group_name=resource_group_name, confidential_resource_name=confidential_resource_name, subscription_id=self._config.subscription_id, @@ -695,7 +697,7 @@ async def create_for_user_defined_error( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_error_create_for_user_defined_error_request( + _request = build_common_properties_client_error_create_for_user_defined_error_request( resource_group_name=resource_group_name, confidential_resource_name=confidential_resource_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/__init__.py index f406b6d443..5fa1043e33 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ManagedIdentityOperations # type: ignore -from ._operations import ErrorOperations # type: ignore +from ._operations import CommonPropertiesClientManagedIdentityOperations # type: ignore +from ._operations import CommonPropertiesClientErrorOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ManagedIdentityOperations", - "ErrorOperations", + "CommonPropertiesClientManagedIdentityOperations", + "CommonPropertiesClientErrorOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py index 132e8df434..2faa3771c1 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py @@ -41,7 +41,7 @@ _SERIALIZER.client_side_validation = False -def build_managed_identity_get_request( +def build_common_properties_client_managed_identity_get_request( # pylint: disable=name-too-long resource_group_name: str, managed_identity_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -71,7 +71,7 @@ def build_managed_identity_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_identity_create_with_system_assigned_request( # pylint: disable=name-too-long +def build_common_properties_client_managed_identity_create_with_system_assigned_request( # pylint: disable=name-too-long resource_group_name: str, managed_identity_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -104,7 +104,7 @@ def build_managed_identity_create_with_system_assigned_request( # pylint: disab return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_identity_update_with_user_assigned_and_system_assigned_request( # pylint: disable=name-too-long +def build_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned_request( # pylint: disable=name-too-long resource_group_name: str, managed_identity_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -137,7 +137,7 @@ def build_managed_identity_update_with_user_assigned_and_system_assigned_request return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_error_get_for_predefined_error_request( # pylint: disable=name-too-long +def build_common_properties_client_error_get_for_predefined_error_request( # pylint: disable=name-too-long resource_group_name: str, confidential_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -165,7 +165,7 @@ def build_error_get_for_predefined_error_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_error_create_for_user_defined_error_request( # pylint: disable=name-too-long +def build_common_properties_client_error_create_for_user_defined_error_request( # pylint: disable=name-too-long resource_group_name: str, confidential_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -196,14 +196,14 @@ def build_error_create_for_user_defined_error_request( # pylint: disable=name-t return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -class ManagedIdentityOperations: +class CommonPropertiesClientManagedIdentityOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.commonproperties.CommonPropertiesClient`'s - :attr:`managed_identity` attribute. + :attr:`common_properties_client_managed_identity` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -242,7 +242,7 @@ def get( cls: ClsType[_models.ManagedIdentityTrackedResource] = kwargs.pop("cls", None) - _request = build_managed_identity_get_request( + _request = build_common_properties_client_managed_identity_get_request( resource_group_name=resource_group_name, managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -414,7 +414,7 @@ def create_with_system_assigned( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_identity_create_with_system_assigned_request( + _request = build_common_properties_client_managed_identity_create_with_system_assigned_request( resource_group_name=resource_group_name, managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -588,15 +588,17 @@ def update_with_user_assigned_and_system_assigned( # pylint: disable=name-too-l else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_identity_update_with_user_assigned_and_system_assigned_request( - resource_group_name=resource_group_name, - managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, + _request = ( + build_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned_request( + resource_group_name=resource_group_name, + managed_identity_tracked_resource_name=managed_identity_tracked_resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -634,14 +636,14 @@ def update_with_user_assigned_and_system_assigned( # pylint: disable=name-too-l return deserialized # type: ignore -class ErrorOperations: +class CommonPropertiesClientErrorOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.commonproperties.CommonPropertiesClient`'s - :attr:`error` attribute. + :attr:`common_properties_client_error` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -679,7 +681,7 @@ def get_for_predefined_error( cls: ClsType[_models.ConfidentialResource] = kwargs.pop("cls", None) - _request = build_error_get_for_predefined_error_request( + _request = build_common_properties_client_error_get_for_predefined_error_request( resource_group_name=resource_group_name, confidential_resource_name=confidential_resource_name, subscription_id=self._config.subscription_id, @@ -847,7 +849,7 @@ def create_for_user_defined_error( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_error_create_for_user_defined_error_request( + _request = build_common_properties_client_error_create_for_user_defined_error_request( resource_group_name=resource_group_name, confidential_resource_name=confidential_resource_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations.py new file mode 100644 index 0000000000..1be0156091 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.commonproperties import CommonPropertiesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCommonPropertiesCommonPropertiesClientErrorOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CommonPropertiesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_common_properties_client_error_get_for_predefined_error(self, resource_group): + response = self.client.common_properties_client_error.get_for_predefined_error( + resource_group_name=resource_group.name, + confidential_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_common_properties_client_error_create_for_user_defined_error(self, resource_group): + response = self.client.common_properties_client_error.create_for_user_defined_error( + resource_group_name=resource_group.name, + confidential_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "username": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations_async.py new file mode 100644 index 0000000000..9d4cc646f2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_error_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.commonproperties.aio import CommonPropertiesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCommonPropertiesCommonPropertiesClientErrorOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CommonPropertiesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_common_properties_client_error_get_for_predefined_error(self, resource_group): + response = await self.client.common_properties_client_error.get_for_predefined_error( + resource_group_name=resource_group.name, + confidential_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_common_properties_client_error_create_for_user_defined_error(self, resource_group): + response = await self.client.common_properties_client_error.create_for_user_defined_error( + resource_group_name=resource_group.name, + confidential_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "username": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations.py new file mode 100644 index 0000000000..fc1abfd391 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.commonproperties import CommonPropertiesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCommonPropertiesCommonPropertiesClientManagedIdentityOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CommonPropertiesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_common_properties_client_managed_identity_get(self, resource_group): + response = self.client.common_properties_client_managed_identity.get( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_common_properties_client_managed_identity_create_with_system_assigned(self, resource_group): + response = self.client.common_properties_client_managed_identity.create_with_system_assigned( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + resource={ + "location": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned( + self, resource_group + ): + response = self.client.common_properties_client_managed_identity.update_with_user_assigned_and_system_assigned( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + properties={ + "location": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations_async.py new file mode 100644 index 0000000000..6ba84d1846 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/generated_tests/test_common_properties_common_properties_client_managed_identity_operations_async.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.commonproperties.aio import CommonPropertiesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCommonPropertiesCommonPropertiesClientManagedIdentityOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CommonPropertiesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_common_properties_client_managed_identity_get(self, resource_group): + response = await self.client.common_properties_client_managed_identity.get( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_common_properties_client_managed_identity_create_with_system_assigned(self, resource_group): + response = await self.client.common_properties_client_managed_identity.create_with_system_assigned( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + resource={ + "location": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_common_properties_client_managed_identity_update_with_user_assigned_and_system_assigned( + self, resource_group + ): + response = ( + await self.client.common_properties_client_managed_identity.update_with_user_assigned_and_system_assigned( + resource_group_name=resource_group.name, + managed_identity_tracked_resource_name="str", + properties={ + "location": "str", + "id": "str", + "identity": { + "type": "str", + "principalId": "str", + "tenantId": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/apiview-properties.json index 7b9d97b844..53377f2ca8 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/apiview-properties.json @@ -5,7 +5,7 @@ "azure.resourcemanager.largeheader.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", "azure.resourcemanager.largeheader.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.resourcemanager.largeheader.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "azure.resourcemanager.largeheader.operations.LargeHeadersOperations.begin_two6_k": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k", - "azure.resourcemanager.largeheader.aio.operations.LargeHeadersOperations.begin_two6_k": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k" + "azure.resourcemanager.largeheader.operations.LargeHeaderClientLargeHeadersOperations.begin_two6_k": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k", + "azure.resourcemanager.largeheader.aio.operations.LargeHeaderClientLargeHeadersOperations.begin_two6_k": "Azure.ResourceManager.LargeHeader.LargeHeaders.two6k" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_client.py index e40123b636..ff141b03cf 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/_client.py @@ -19,7 +19,7 @@ from ._configuration import LargeHeaderClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import LargeHeadersOperations +from .operations import LargeHeaderClientLargeHeadersOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,8 +29,9 @@ class LargeHeaderClient: """Arm Resource Provider management API. - :ivar large_headers: LargeHeadersOperations operations - :vartype large_headers: azure.resourcemanager.largeheader.operations.LargeHeadersOperations + :ivar large_header_client_large_headers: LargeHeaderClientLargeHeadersOperations operations + :vartype large_header_client_large_headers: + azure.resourcemanager.largeheader.operations.LargeHeaderClientLargeHeadersOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -95,7 +96,9 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.large_headers = LargeHeadersOperations(self._client, self._config, self._serialize, self._deserialize) + self.large_header_client_large_headers = LargeHeaderClientLargeHeadersOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/_client.py index 4425422cd4..cc832eaffe 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import LargeHeaderClientConfiguration -from .operations import LargeHeadersOperations +from .operations import LargeHeaderClientLargeHeadersOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,8 +29,9 @@ class LargeHeaderClient: """Arm Resource Provider management API. - :ivar large_headers: LargeHeadersOperations operations - :vartype large_headers: azure.resourcemanager.largeheader.aio.operations.LargeHeadersOperations + :ivar large_header_client_large_headers: LargeHeaderClientLargeHeadersOperations operations + :vartype large_header_client_large_headers: + azure.resourcemanager.largeheader.aio.operations.LargeHeaderClientLargeHeadersOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -97,7 +98,9 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.large_headers = LargeHeadersOperations(self._client, self._config, self._serialize, self._deserialize) + self.large_header_client_large_headers = LargeHeaderClientLargeHeadersOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/__init__.py index a94c8fdfc4..59faa9226e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import LargeHeadersOperations # type: ignore +from ._operations import LargeHeaderClientLargeHeadersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "LargeHeadersOperations", + "LargeHeaderClientLargeHeadersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py index 9fbcc7a8e3..72f02c6cae 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py @@ -29,21 +29,21 @@ from ... import models as _models from ..._utils.model_base import _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_large_headers_two6_k_request +from ...operations._operations import build_large_header_client_large_headers_two6_k_request from .._configuration import LargeHeaderClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class LargeHeadersOperations: +class LargeHeaderClientLargeHeadersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.largeheader.aio.LargeHeaderClient`'s - :attr:`large_headers` attribute. + :attr:`large_header_client_large_headers` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,7 +69,7 @@ async def _two6_k_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_large_headers_two6_k_request( + _request = build_large_header_client_large_headers_two6_k_request( resource_group_name=resource_group_name, large_header_name=large_header_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/__init__.py index a94c8fdfc4..59faa9226e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import LargeHeadersOperations # type: ignore +from ._operations import LargeHeaderClientLargeHeadersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "LargeHeadersOperations", + "LargeHeaderClientLargeHeadersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py index 880ba8bf05..50ed2e1722 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_large_headers_two6_k_request( +def build_large_header_client_large_headers_two6_k_request( # pylint: disable=name-too-long resource_group_name: str, large_header_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -68,14 +68,14 @@ def build_large_headers_two6_k_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class LargeHeadersOperations: +class LargeHeaderClientLargeHeadersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.largeheader.LargeHeaderClient`'s - :attr:`large_headers` attribute. + :attr:`large_header_client_large_headers` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -99,7 +99,7 @@ def _two6_k_initial(self, resource_group_name: str, large_header_name: str, **kw cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_large_headers_two6_k_request( + _request = build_large_header_client_large_headers_two6_k_request( resource_group_name=resource_group_name, large_header_name=large_header_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations.py new file mode 100644 index 0000000000..d1c40e58c6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.largeheader import LargeHeaderClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestLargeHeaderLargeHeaderClientLargeHeadersOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(LargeHeaderClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_large_header_client_large_headers_begin_two6_k(self, resource_group): + response = self.client.large_header_client_large_headers.begin_two6_k( + resource_group_name=resource_group.name, + large_header_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations_async.py new file mode 100644 index 0000000000..c950e6bb76 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/generated_tests/test_large_header_large_header_client_large_headers_operations_async.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.largeheader.aio import LargeHeaderClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestLargeHeaderLargeHeaderClientLargeHeadersOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(LargeHeaderClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_large_header_client_large_headers_begin_two6_k(self, resource_group): + response = await ( + await self.client.large_header_client_large_headers.begin_two6_k( + resource_group_name=resource_group.name, + large_header_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/apiview-properties.json index 9bac47fd9a..2d29517e6e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/apiview-properties.json @@ -22,7 +22,7 @@ "azure.resourcemanager.methodsubscriptionid.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", "azure.resourcemanager.methodsubscriptionid.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", "azure.resourcemanager.methodsubscriptionid.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", - "azure.resourcemanager.methodsubscriptionid.operations.Operations.list": "Azure.ResourceManager.Operations.list", - "azure.resourcemanager.methodsubscriptionid.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list" + "azure.resourcemanager.methodsubscriptionid.operations.MethodSubscriptionIdClientOperationsOperations.list": "Azure.ResourceManager.Operations.list", + "azure.resourcemanager.methodsubscriptionid.aio.operations.MethodSubscriptionIdClientOperationsOperations.list": "Azure.ResourceManager.Operations.list" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/_client.py index 55a3ba0473..35ea694624 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,11 @@ from ._configuration import MethodSubscriptionIdClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import MixedSubscriptionPlacementOperations, Operations, TwoSubscriptionResourcesMethodLevelOperations +from .operations import ( + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations, + MethodSubscriptionIdClientOperationsOperations, + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations, +) if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,15 +34,18 @@ class MethodSubscriptionIdClient: """Test for ARM method level subscription ID parameter placement. - :ivar two_subscription_resources_method_level: TwoSubscriptionResourcesMethodLevelOperations + :ivar method_subscription_id_client_two_subscription_resources_method_level: + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations operations + :vartype method_subscription_id_client_two_subscription_resources_method_level: + azure.resourcemanager.methodsubscriptionid.operations.MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations + :ivar method_subscription_id_client_mixed_subscription_placement: + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations operations + :vartype method_subscription_id_client_mixed_subscription_placement: + azure.resourcemanager.methodsubscriptionid.operations.MethodSubscriptionIdClientMixedSubscriptionPlacementOperations + :ivar method_subscription_id_client_operations: MethodSubscriptionIdClientOperationsOperations operations - :vartype two_subscription_resources_method_level: - azure.resourcemanager.methodsubscriptionid.operations.TwoSubscriptionResourcesMethodLevelOperations - :ivar mixed_subscription_placement: MixedSubscriptionPlacementOperations operations - :vartype mixed_subscription_placement: - azure.resourcemanager.methodsubscriptionid.operations.MixedSubscriptionPlacementOperations - :ivar operations: Operations operations - :vartype operations: azure.resourcemanager.methodsubscriptionid.operations.Operations + :vartype method_subscription_id_client_operations: + azure.resourcemanager.methodsubscriptionid.operations.MethodSubscriptionIdClientOperationsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -100,13 +108,19 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.two_subscription_resources_method_level = TwoSubscriptionResourcesMethodLevelOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_two_subscription_resources_method_level = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.method_subscription_id_client_mixed_subscription_placement = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.mixed_subscription_placement = MixedSubscriptionPlacementOperations( + self.method_subscription_id_client_operations = MethodSubscriptionIdClientOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/_client.py index 62610570ac..12e8c46a09 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -19,7 +20,11 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MethodSubscriptionIdClientConfiguration -from .operations import MixedSubscriptionPlacementOperations, Operations, TwoSubscriptionResourcesMethodLevelOperations +from .operations import ( + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations, + MethodSubscriptionIdClientOperationsOperations, + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations, +) if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,15 +34,18 @@ class MethodSubscriptionIdClient: """Test for ARM method level subscription ID parameter placement. - :ivar two_subscription_resources_method_level: TwoSubscriptionResourcesMethodLevelOperations + :ivar method_subscription_id_client_two_subscription_resources_method_level: + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations operations + :vartype method_subscription_id_client_two_subscription_resources_method_level: + azure.resourcemanager.methodsubscriptionid.aio.operations.MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations + :ivar method_subscription_id_client_mixed_subscription_placement: + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations operations + :vartype method_subscription_id_client_mixed_subscription_placement: + azure.resourcemanager.methodsubscriptionid.aio.operations.MethodSubscriptionIdClientMixedSubscriptionPlacementOperations + :ivar method_subscription_id_client_operations: MethodSubscriptionIdClientOperationsOperations operations - :vartype two_subscription_resources_method_level: - azure.resourcemanager.methodsubscriptionid.aio.operations.TwoSubscriptionResourcesMethodLevelOperations - :ivar mixed_subscription_placement: MixedSubscriptionPlacementOperations operations - :vartype mixed_subscription_placement: - azure.resourcemanager.methodsubscriptionid.aio.operations.MixedSubscriptionPlacementOperations - :ivar operations: Operations operations - :vartype operations: azure.resourcemanager.methodsubscriptionid.aio.operations.Operations + :vartype method_subscription_id_client_operations: + azure.resourcemanager.methodsubscriptionid.aio.operations.MethodSubscriptionIdClientOperationsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -102,13 +110,19 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.two_subscription_resources_method_level = TwoSubscriptionResourcesMethodLevelOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_two_subscription_resources_method_level = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.method_subscription_id_client_mixed_subscription_placement = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.mixed_subscription_placement = MixedSubscriptionPlacementOperations( + self.method_subscription_id_client_operations = MethodSubscriptionIdClientOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/__init__.py index 90702ab636..a49855041f 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TwoSubscriptionResourcesMethodLevelOperations # type: ignore -from ._operations import MixedSubscriptionPlacementOperations # type: ignore -from ._operations import Operations # type: ignore +from ._operations import MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations # type: ignore +from ._operations import MethodSubscriptionIdClientMixedSubscriptionPlacementOperations # type: ignore +from ._operations import MethodSubscriptionIdClientOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TwoSubscriptionResourcesMethodLevelOperations", - "MixedSubscriptionPlacementOperations", - "Operations", + "MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations", + "MethodSubscriptionIdClientMixedSubscriptionPlacementOperations", + "MethodSubscriptionIdClientOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py index 04dff2924a..0cab130a60 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,19 +35,19 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_mixed_subscription_placement_resource_group_resource_operations_delete_request, - build_mixed_subscription_placement_resource_group_resource_operations_get_request, - build_mixed_subscription_placement_resource_group_resource_operations_put_request, - build_mixed_subscription_placement_subscription_resource_operations_delete_request, - build_mixed_subscription_placement_subscription_resource_operations_get_request, - build_mixed_subscription_placement_subscription_resource_operations_put_request, - build_operations_list_request, - build_two_subscription_resources_method_level_subscription_resource1_operations_delete_request, - build_two_subscription_resources_method_level_subscription_resource1_operations_get_request, - build_two_subscription_resources_method_level_subscription_resource1_operations_put_request, - build_two_subscription_resources_method_level_subscription_resource2_operations_delete_request, - build_two_subscription_resources_method_level_subscription_resource2_operations_get_request, - build_two_subscription_resources_method_level_subscription_resource2_operations_put_request, + build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete_request, + build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get_request, + build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put_request, + build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete_request, + build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get_request, + build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put_request, + build_method_subscription_id_client_operations_list_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get_request, + build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put_request, ) from .._configuration import MethodSubscriptionIdClientConfiguration @@ -57,14 +57,14 @@ List = list -class TwoSubscriptionResourcesMethodLevelOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`two_subscription_resources_method_level` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,26 +76,26 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.subscription_resource1_operations = ( - TwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations( + self.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations( self._client, self._config, self._serialize, self._deserialize ) ) - self.subscription_resource2_operations = ( - TwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations( + self.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations( self._client, self._config, self._serialize, self._deserialize ) ) -class MixedSubscriptionPlacementOperations: +class MethodSubscriptionIdClientMixedSubscriptionPlacementOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`mixed_subscription_placement` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -107,22 +107,26 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.subscription_resource_operations = MixedSubscriptionPlacementSubscriptionResourceOperationsOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementSubscriptionResourceOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.resource_group_resource_operations = MixedSubscriptionPlacementResourceGroupResourceOperationsOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementResourceGroupResourceOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) -class Operations: +class MethodSubscriptionIdClientOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`operations` attribute. + :attr:`method_subscription_id_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -159,7 +163,7 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_method_subscription_id_client_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -222,14 +226,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class TwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`subscription_resource1_operations` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -268,7 +272,7 @@ async def get( cls: ClsType[_models.SubscriptionResource1] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_get_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, api_version=self._config.api_version, @@ -431,7 +435,7 @@ async def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_put_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, content_type=content_type, @@ -500,7 +504,7 @@ async def delete(self, subscription_id: str, subscription_resource1_name: str, * cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, api_version=self._config.api_version, @@ -531,14 +535,14 @@ async def delete(self, subscription_id: str, subscription_resource1_name: str, * return cls(pipeline_response, None, {}) # type: ignore -class TwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`subscription_resource2_operations` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -577,7 +581,7 @@ async def get( cls: ClsType[_models.SubscriptionResource2] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_get_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, api_version=self._config.api_version, @@ -740,7 +744,7 @@ async def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_put_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, content_type=content_type, @@ -809,7 +813,7 @@ async def delete(self, subscription_id: str, subscription_resource2_name: str, * cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, api_version=self._config.api_version, @@ -840,14 +844,14 @@ async def delete(self, subscription_id: str, subscription_resource2_name: str, * return cls(pipeline_response, None, {}) # type: ignore -class MixedSubscriptionPlacementSubscriptionResourceOperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientMixedSubscriptionPlacementSubscriptionResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`subscription_resource_operations` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -886,7 +890,7 @@ async def get( cls: ClsType[_models.SubscriptionResource] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_subscription_resource_operations_get_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, api_version=self._config.api_version, @@ -1049,7 +1053,7 @@ async def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_subscription_placement_subscription_resource_operations_put_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, content_type=content_type, @@ -1118,7 +1122,7 @@ async def delete(self, subscription_id: str, subscription_resource_name: str, ** cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_subscription_resource_operations_delete_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, api_version=self._config.api_version, @@ -1149,14 +1153,14 @@ async def delete(self, subscription_id: str, subscription_resource_name: str, ** return cls(pipeline_response, None, {}) # type: ignore -class MixedSubscriptionPlacementResourceGroupResourceOperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientMixedSubscriptionPlacementResourceGroupResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.aio.MethodSubscriptionIdClient`'s - :attr:`resource_group_resource_operations` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1196,7 +1200,7 @@ async def get( cls: ClsType[_models.ResourceGroupResource] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_resource_group_resource_operations_get_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, @@ -1364,7 +1368,7 @@ async def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_subscription_placement_resource_group_resource_operations_put_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, @@ -1435,7 +1439,7 @@ async def delete(self, resource_group_name: str, resource_group_resource_name: s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_resource_group_resource_operations_delete_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/__init__.py index 90702ab636..a49855041f 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TwoSubscriptionResourcesMethodLevelOperations # type: ignore -from ._operations import MixedSubscriptionPlacementOperations # type: ignore -from ._operations import Operations # type: ignore +from ._operations import MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations # type: ignore +from ._operations import MethodSubscriptionIdClientMixedSubscriptionPlacementOperations # type: ignore +from ._operations import MethodSubscriptionIdClientOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TwoSubscriptionResourcesMethodLevelOperations", - "MixedSubscriptionPlacementOperations", - "Operations", + "MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations", + "MethodSubscriptionIdClientMixedSubscriptionPlacementOperations", + "MethodSubscriptionIdClientOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py index 97516dd188..0dbbda76de 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py @@ -44,7 +44,9 @@ _SERIALIZER.client_side_validation = False -def build_operations_list_request(**kwargs: Any) -> HttpRequest: +def build_method_subscription_id_client_operations_list_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -63,7 +65,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource1_operations_get_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource1_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -90,7 +92,7 @@ def build_two_subscription_resources_method_level_subscription_resource1_operati return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource1_operations_put_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource1_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -120,7 +122,7 @@ def build_two_subscription_resources_method_level_subscription_resource1_operati return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource1_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -141,7 +143,7 @@ def build_two_subscription_resources_method_level_subscription_resource1_operati return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource2_operations_get_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource2_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -168,7 +170,7 @@ def build_two_subscription_resources_method_level_subscription_resource2_operati return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource2_operations_put_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource2_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -198,7 +200,7 @@ def build_two_subscription_resources_method_level_subscription_resource2_operati return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource2_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -219,7 +221,7 @@ def build_two_subscription_resources_method_level_subscription_resource2_operati return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_mixed_subscription_placement_subscription_resource_operations_get_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -246,7 +248,7 @@ def build_mixed_subscription_placement_subscription_resource_operations_get_requ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_mixed_subscription_placement_subscription_resource_operations_put_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -276,7 +278,7 @@ def build_mixed_subscription_placement_subscription_resource_operations_put_requ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_mixed_subscription_placement_subscription_resource_operations_delete_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete_request( # pylint: disable=name-too-long subscription_id: str, subscription_resource_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -297,7 +299,7 @@ def build_mixed_subscription_placement_subscription_resource_operations_delete_r return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_mixed_subscription_placement_resource_group_resource_operations_get_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get_request( # pylint: disable=name-too-long resource_group_name: str, resource_group_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -327,7 +329,7 @@ def build_mixed_subscription_placement_resource_group_resource_operations_get_re return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_mixed_subscription_placement_resource_group_resource_operations_put_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put_request( # pylint: disable=name-too-long resource_group_name: str, resource_group_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -360,7 +362,7 @@ def build_mixed_subscription_placement_resource_group_resource_operations_put_re return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_mixed_subscription_placement_resource_group_resource_operations_delete_request( # pylint: disable=name-too-long +def build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete_request( # pylint: disable=name-too-long resource_group_name: str, resource_group_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -384,14 +386,14 @@ def build_mixed_subscription_placement_resource_group_resource_operations_delete return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -class TwoSubscriptionResourcesMethodLevelOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`two_subscription_resources_method_level` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -403,26 +405,26 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.subscription_resource1_operations = ( - TwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations( + self.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations( self._client, self._config, self._serialize, self._deserialize ) ) - self.subscription_resource2_operations = ( - TwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations( + self.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations = ( + MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations( self._client, self._config, self._serialize, self._deserialize ) ) -class MixedSubscriptionPlacementOperations: +class MethodSubscriptionIdClientMixedSubscriptionPlacementOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`mixed_subscription_placement` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -434,22 +436,26 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.subscription_resource_operations = MixedSubscriptionPlacementSubscriptionResourceOperationsOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementSubscriptionResourceOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.resource_group_resource_operations = MixedSubscriptionPlacementResourceGroupResourceOperationsOperations( - self._client, self._config, self._serialize, self._deserialize + self.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations = ( + MethodSubscriptionIdClientMixedSubscriptionPlacementResourceGroupResourceOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) -class Operations: +class MethodSubscriptionIdClientOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`operations` attribute. + :attr:`method_subscription_id_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -486,7 +492,7 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_method_subscription_id_client_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -549,14 +555,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class TwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource1OperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`subscription_resource1_operations` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -595,7 +601,7 @@ def get( cls: ClsType[_models.SubscriptionResource1] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_get_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, api_version=self._config.api_version, @@ -645,7 +651,7 @@ def put( resource: _models.SubscriptionResource1, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource1: """Create a SubscriptionResource1. @@ -671,7 +677,7 @@ def put( resource: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource1: """Create a SubscriptionResource1. @@ -697,7 +703,7 @@ def put( resource: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource1: """Create a SubscriptionResource1. @@ -721,7 +727,7 @@ def put( subscription_id: str, subscription_resource1_name: str, resource: Union[_models.SubscriptionResource1, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource1: """Create a SubscriptionResource1. @@ -758,7 +764,7 @@ def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_put_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, content_type=content_type, @@ -829,7 +835,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete_request( subscription_id=subscription_id, subscription_resource1_name=subscription_resource1_name, api_version=self._config.api_version, @@ -860,14 +866,14 @@ def delete( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class TwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelSubscriptionResource2OperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`subscription_resource2_operations` attribute. + :attr:`method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -906,7 +912,7 @@ def get( cls: ClsType[_models.SubscriptionResource2] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_get_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, api_version=self._config.api_version, @@ -956,7 +962,7 @@ def put( resource: _models.SubscriptionResource2, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource2: """Create a SubscriptionResource2. @@ -982,7 +988,7 @@ def put( resource: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource2: """Create a SubscriptionResource2. @@ -1008,7 +1014,7 @@ def put( resource: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource2: """Create a SubscriptionResource2. @@ -1032,7 +1038,7 @@ def put( subscription_id: str, subscription_resource2_name: str, resource: Union[_models.SubscriptionResource2, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource2: """Create a SubscriptionResource2. @@ -1069,7 +1075,7 @@ def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_put_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, content_type=content_type, @@ -1140,7 +1146,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( + _request = build_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete_request( subscription_id=subscription_id, subscription_resource2_name=subscription_resource2_name, api_version=self._config.api_version, @@ -1171,14 +1177,14 @@ def delete( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedSubscriptionPlacementSubscriptionResourceOperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientMixedSubscriptionPlacementSubscriptionResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`subscription_resource_operations` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1215,7 +1221,7 @@ def get(self, subscription_id: str, subscription_resource_name: str, **kwargs: A cls: ClsType[_models.SubscriptionResource] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_subscription_resource_operations_get_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, api_version=self._config.api_version, @@ -1265,7 +1271,7 @@ def put( resource: _models.SubscriptionResource, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource: """Create a SubscriptionResource. @@ -1291,7 +1297,7 @@ def put( resource: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource: """Create a SubscriptionResource. @@ -1317,7 +1323,7 @@ def put( resource: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource: """Create a SubscriptionResource. @@ -1341,7 +1347,7 @@ def put( subscription_id: str, subscription_resource_name: str, resource: Union[_models.SubscriptionResource, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> _models.SubscriptionResource: """Create a SubscriptionResource. @@ -1378,7 +1384,7 @@ def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_subscription_placement_subscription_resource_operations_put_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, content_type=content_type, @@ -1449,7 +1455,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_subscription_resource_operations_delete_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete_request( subscription_id=subscription_id, subscription_resource_name=subscription_resource_name, api_version=self._config.api_version, @@ -1480,14 +1486,14 @@ def delete( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedSubscriptionPlacementResourceGroupResourceOperationsOperations: # pylint: disable=name-too-long +class MethodSubscriptionIdClientMixedSubscriptionPlacementResourceGroupResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.methodsubscriptionid.MethodSubscriptionIdClient`'s - :attr:`resource_group_resource_operations` attribute. + :attr:`method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1527,7 +1533,7 @@ def get( cls: ClsType[_models.ResourceGroupResource] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_resource_group_resource_operations_get_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, @@ -1578,7 +1584,7 @@ def put( resource: _models.ResourceGroupResource, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ResourceGroupResource: """Create a ResourceGroupResource. @@ -1605,7 +1611,7 @@ def put( resource: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ResourceGroupResource: """Create a ResourceGroupResource. @@ -1632,7 +1638,7 @@ def put( resource: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ResourceGroupResource: """Create a ResourceGroupResource. @@ -1657,7 +1663,7 @@ def put( resource_group_name: str, resource_group_resource_name: str, resource: Union[_models.ResourceGroupResource, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> _models.ResourceGroupResource: """Create a ResourceGroupResource. @@ -1695,7 +1701,7 @@ def put( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_subscription_placement_resource_group_resource_operations_put_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, @@ -1768,7 +1774,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_mixed_subscription_placement_resource_group_resource_operations_delete_request( + _request = build_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete_request( resource_group_name=resource_group_name, resource_group_resource_name=resource_group_resource_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations.py new file mode 100644 index 0000000000..d433113ec5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations.py @@ -0,0 +1,128 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientMixedSubscriptionPlacementOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.get( + subscription_id="str", + subscription_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.put( + subscription_id="str", + subscription_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "subscriptionSetting": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.delete( + subscription_id="str", + subscription_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.get( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.put( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "resourceGroupSetting": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete( + self, resource_group + ): + response = self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.delete( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations_async.py new file mode 100644 index 0000000000..76a8436d05 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_mixed_subscription_placement_operations_async.py @@ -0,0 +1,131 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid.aio import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientMixedSubscriptionPlacementOperationsAsync( + AzureMgmtRecordedTestCase +): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_get( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.get( + subscription_id="str", + subscription_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_put( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.put( + subscription_id="str", + subscription_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "subscriptionSetting": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations_delete( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_subscription_resource_operations.delete( + subscription_id="str", + subscription_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_get( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.get( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_put( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.put( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "resourceGroupSetting": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_mixed_subscription_placement_method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations_delete( + self, resource_group + ): + response = await self.client.method_subscription_id_client_mixed_subscription_placement.method_subscription_id_client_mixed_subscription_placement_resource_group_resource_operations.delete( + resource_group_name=resource_group.name, + resource_group_resource_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations.py new file mode 100644 index 0000000000..a57aff7ce1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientOperationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_operations_list(self, resource_group): + response = self.client.method_subscription_id_client_operations.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations_async.py new file mode 100644 index 0000000000..e984aa55f0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_operations_operations_async.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid.aio import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientOperationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_operations_list(self, resource_group): + response = self.client.method_subscription_id_client_operations.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations.py new file mode 100644 index 0000000000..26741c1bcf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations.py @@ -0,0 +1,128 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperations( + AzureMgmtRecordedTestCase +): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.get( + subscription_id="str", + subscription_resource1_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.put( + subscription_id="str", + subscription_resource1_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.delete( + subscription_id="str", + subscription_resource1_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.get( + subscription_id="str", + subscription_resource2_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.put( + subscription_id="str", + subscription_resource2_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"configValue": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete( + self, resource_group + ): + response = self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.delete( + subscription_id="str", + subscription_resource2_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations_async.py new file mode 100644 index 0000000000..4e0f5e825b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/generated_tests/test_method_subscription_id_method_subscription_id_client_two_subscription_resources_method_level_operations_async.py @@ -0,0 +1,129 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.methodsubscriptionid.aio import MethodSubscriptionIdClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMethodSubscriptionIdMethodSubscriptionIdClientTwoSubscriptionResourcesMethodLevelOperationsAsync( + AzureMgmtRecordedTestCase +): + def setup_method(self, method): + self.client = self.create_mgmt_client(MethodSubscriptionIdClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_get( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.get( + subscription_id="str", + subscription_resource1_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_put( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.put( + subscription_id="str", + subscription_resource1_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations_delete( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource1_operations.delete( + subscription_id="str", + subscription_resource1_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_get( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.get( + subscription_id="str", + subscription_resource2_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_put( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.put( + subscription_id="str", + subscription_resource2_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"configValue": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_method_subscription_id_client_two_subscription_resources_method_level_method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations_delete( + self, resource_group + ): + response = await self.client.method_subscription_id_client_two_subscription_resources_method_level.method_subscription_id_client_two_subscription_resources_method_level_subscription_resource2_operations.delete( + subscription_id="str", + subscription_resource2_name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/apiview-properties.json index 38222fb455..60fea0ed4c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/apiview-properties.json @@ -13,13 +13,13 @@ "azure.resourcemanager.multiserviceolderversions.combined.models.VirtualMachineProperties": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachineProperties", "azure.resourcemanager.multiserviceolderversions.combined.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.resourcemanager.multiserviceolderversions.combined.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", - "azure.resourcemanager.multiserviceolderversions.combined.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.get", - "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.get", - "azure.resourcemanager.multiserviceolderversions.combined.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiserviceolderversions.combined.operations.DisksOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.get", - "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.DisksOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.get", - "azure.resourcemanager.multiserviceolderversions.combined.operations.DisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.createOrUpdate", - "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.DisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.createOrUpdate" + "azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.get", + "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.get", + "azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedDisksOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.get", + "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedDisksOperations.get": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.get", + "azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedDisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.createOrUpdate", + "azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedDisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceOlderVersions.ComputeDisk.Disks.createOrUpdate" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/_client.py index 80df58b465..86ead386ec 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/_client.py @@ -19,7 +19,7 @@ from ._configuration import CombinedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import DisksOperations, VirtualMachinesOperations +from .operations import CombinedDisksOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,12 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiserviceolderversions.combined.operations.VirtualMachinesOperations - :ivar disks: DisksOperations operations - :vartype disks: - azure.resourcemanager.multiserviceolderversions.combined.operations.DisksOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedVirtualMachinesOperations + :ivar combined_disks: CombinedDisksOperations operations + :vartype combined_disks: + azure.resourcemanager.multiserviceolderversions.combined.operations.CombinedDisksOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -95,10 +95,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.disks = DisksOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_disks = CombinedDisksOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/_client.py index d94f5e7422..f25a8d18b6 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CombinedClientConfiguration -from .operations import DisksOperations, VirtualMachinesOperations +from .operations import CombinedDisksOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,12 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiserviceolderversions.combined.aio.operations.VirtualMachinesOperations - :ivar disks: DisksOperations operations - :vartype disks: - azure.resourcemanager.multiserviceolderversions.combined.aio.operations.DisksOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedVirtualMachinesOperations + :ivar combined_disks: CombinedDisksOperations operations + :vartype combined_disks: + azure.resourcemanager.multiserviceolderversions.combined.aio.operations.CombinedDisksOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -97,10 +97,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.disks = DisksOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_disks = CombinedDisksOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/__init__.py index 58ec496772..a70c57e609 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import DisksOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedDisksOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "DisksOperations", + "CombinedVirtualMachinesOperations", + "CombinedDisksOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/_operations.py index 1d3f6e20c3..82fcc631df 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/aio/operations/_operations.py @@ -34,10 +34,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_disks_create_or_update_request, - build_disks_get_request, - build_virtual_machines_create_or_update_request, - build_virtual_machines_get_request, + build_combined_disks_create_or_update_request, + build_combined_disks_get_request, + build_combined_virtual_machines_create_or_update_request, + build_combined_virtual_machines_get_request, ) from .._configuration import CombinedClientConfiguration @@ -46,14 +46,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiserviceolderversions.combined.aio.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -90,7 +90,7 @@ async def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _m api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -162,7 +162,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -381,14 +381,14 @@ def get_long_running_output(pipeline_response): ) -class DisksOperations: +class CombinedDisksOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiserviceolderversions.combined.aio.CombinedClient`'s - :attr:`disks` attribute. + :attr:`combined_disks` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -425,7 +425,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-02")) cls: ClsType[_models.Disk] = kwargs.pop("cls", None) - _request = build_disks_get_request( + _request = build_combined_disks_get_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, @@ -493,7 +493,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_disks_create_or_update_request( + _request = build_combined_disks_create_or_update_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/__init__.py index 58ec496772..a70c57e609 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import DisksOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedDisksOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "DisksOperations", + "CombinedVirtualMachinesOperations", + "CombinedDisksOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/_operations.py index 36b0049695..49ff231b69 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/azure/resourcemanager/multiserviceolderversions/combined/operations/_operations.py @@ -43,7 +43,7 @@ _SERIALIZER.client_side_validation = False -def build_virtual_machines_get_request( +def build_combined_virtual_machines_get_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -71,7 +71,7 @@ def build_virtual_machines_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_machines_create_or_update_request( # pylint: disable=name-too-long +def build_combined_virtual_machines_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -102,7 +102,7 @@ def build_virtual_machines_create_or_update_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_disks_get_request( +def build_combined_disks_get_request( resource_group_name: str, disk_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -130,7 +130,7 @@ def build_disks_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_disks_create_or_update_request( +def build_combined_disks_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, disk_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -161,14 +161,14 @@ def build_disks_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiserviceolderversions.combined.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -205,7 +205,7 @@ def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _models. api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -277,7 +277,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -496,14 +496,14 @@ def get_long_running_output(pipeline_response): ) -class DisksOperations: +class CombinedDisksOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiserviceolderversions.combined.CombinedClient`'s - :attr:`disks` attribute. + :attr:`combined_disks` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -540,7 +540,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-02")) cls: ClsType[_models.Disk] = kwargs.pop("cls", None) - _request = build_disks_get_request( + _request = build_combined_disks_get_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, @@ -608,7 +608,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_disks_create_or_update_request( + _request = build_combined_disks_create_or_update_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations.py new file mode 100644 index 0000000000..b7a2a05e67 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiserviceolderversions.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedDisksOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_disks_get(self, resource_group): + response = self.client.combined_disks.get( + resource_group_name=resource_group.name, + disk_name="str", + api_version="2024-03-02", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_disks_begin_create_or_update(self, resource_group): + response = self.client.combined_disks.begin_create_or_update( + resource_group_name=resource_group.name, + disk_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"diskSizeGB": 0, "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-03-02", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations_async.py new file mode 100644 index 0000000000..d9ccfbec71 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_disks_operations_async.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiserviceolderversions.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedDisksOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_disks_get(self, resource_group): + response = await self.client.combined_disks.get( + resource_group_name=resource_group.name, + disk_name="str", + api_version="2024-03-02", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_disks_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_disks.begin_create_or_update( + resource_group_name=resource_group.name, + disk_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"diskSizeGB": 0, "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-03-02", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations.py new file mode 100644 index 0000000000..8c0dfd7c12 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiserviceolderversions.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_get(self, resource_group): + response = self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2024-11-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "size": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-11-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations_async.py new file mode 100644 index 0000000000..6a7f840b47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-older-versions/generated_tests/test_combined_combined_virtual_machines_operations_async.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiserviceolderversions.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_get(self, resource_group): + response = await self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2024-11-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str", "size": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2024-11-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/apiview-properties.json index 8b7f38966c..6d9066bee4 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/apiview-properties.json @@ -14,13 +14,13 @@ "azure.resourcemanager.multiservicesharedmodels.combined.models.VirtualMachineProperties": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachineProperties", "azure.resourcemanager.multiservicesharedmodels.combined.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.resourcemanager.multiservicesharedmodels.combined.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", - "azure.resourcemanager.multiservicesharedmodels.combined.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.get", - "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.get", - "azure.resourcemanager.multiservicesharedmodels.combined.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiservicesharedmodels.combined.operations.StorageAccountsOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.get", - "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.StorageAccountsOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.get", - "azure.resourcemanager.multiservicesharedmodels.combined.operations.StorageAccountsOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.createOrUpdate", - "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.StorageAccountsOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.createOrUpdate" + "azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.get", + "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.get", + "azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedStorageAccountsOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.get", + "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedStorageAccountsOperations.get": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.get", + "azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedStorageAccountsOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.createOrUpdate", + "azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedStorageAccountsOperations.begin_create_or_update": "Azure.ResourceManager.MultiServiceSharedModels.Storage.StorageAccounts.createOrUpdate" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/_client.py index 88ac2876a0..eb13a21ae3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/_client.py @@ -19,7 +19,7 @@ from ._configuration import CombinedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import StorageAccountsOperations, VirtualMachinesOperations +from .operations import CombinedStorageAccountsOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,12 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiservicesharedmodels.combined.operations.VirtualMachinesOperations - :ivar storage_accounts: StorageAccountsOperations operations - :vartype storage_accounts: - azure.resourcemanager.multiservicesharedmodels.combined.operations.StorageAccountsOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedVirtualMachinesOperations + :ivar combined_storage_accounts: CombinedStorageAccountsOperations operations + :vartype combined_storage_accounts: + azure.resourcemanager.multiservicesharedmodels.combined.operations.CombinedStorageAccountsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -95,10 +95,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.storage_accounts = StorageAccountsOperations( + self.combined_storage_accounts = CombinedStorageAccountsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/_client.py index 0cc8870c56..9659383359 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CombinedClientConfiguration -from .operations import StorageAccountsOperations, VirtualMachinesOperations +from .operations import CombinedStorageAccountsOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,12 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.VirtualMachinesOperations - :ivar storage_accounts: StorageAccountsOperations operations - :vartype storage_accounts: - azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.StorageAccountsOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedVirtualMachinesOperations + :ivar combined_storage_accounts: CombinedStorageAccountsOperations operations + :vartype combined_storage_accounts: + azure.resourcemanager.multiservicesharedmodels.combined.aio.operations.CombinedStorageAccountsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -97,10 +97,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.storage_accounts = StorageAccountsOperations( + self.combined_storage_accounts = CombinedStorageAccountsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/__init__.py index 79eea3b24b..08f96c711c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import StorageAccountsOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedStorageAccountsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "StorageAccountsOperations", + "CombinedVirtualMachinesOperations", + "CombinedStorageAccountsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/_operations.py index ebf8cc5d7d..bef50508d6 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/aio/operations/_operations.py @@ -34,10 +34,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_storage_accounts_create_or_update_request, - build_storage_accounts_get_request, - build_virtual_machines_create_or_update_request, - build_virtual_machines_get_request, + build_combined_storage_accounts_create_or_update_request, + build_combined_storage_accounts_get_request, + build_combined_virtual_machines_create_or_update_request, + build_combined_virtual_machines_get_request, ) from .._configuration import CombinedClientConfiguration @@ -46,14 +46,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservicesharedmodels.combined.aio.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -90,7 +90,7 @@ async def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _m api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -162,7 +162,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -381,14 +381,14 @@ def get_long_running_output(pipeline_response): ) -class StorageAccountsOperations: +class CombinedStorageAccountsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservicesharedmodels.combined.aio.CombinedClient`'s - :attr:`storage_accounts` attribute. + :attr:`combined_storage_accounts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -425,7 +425,7 @@ async def get(self, resource_group_name: str, account_name: str, **kwargs: Any) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01")) cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - _request = build_storage_accounts_get_request( + _request = build_combined_storage_accounts_get_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, @@ -497,7 +497,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_storage_accounts_create_or_update_request( + _request = build_combined_storage_accounts_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/__init__.py index 79eea3b24b..08f96c711c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import StorageAccountsOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedStorageAccountsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "StorageAccountsOperations", + "CombinedVirtualMachinesOperations", + "CombinedStorageAccountsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/_operations.py index 763c73cd1d..c592458f4b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/azure/resourcemanager/multiservicesharedmodels/combined/operations/_operations.py @@ -43,7 +43,7 @@ _SERIALIZER.client_side_validation = False -def build_virtual_machines_get_request( +def build_combined_virtual_machines_get_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -71,7 +71,7 @@ def build_virtual_machines_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_machines_create_or_update_request( # pylint: disable=name-too-long +def build_combined_virtual_machines_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -102,7 +102,7 @@ def build_virtual_machines_create_or_update_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_storage_accounts_get_request( +def build_combined_storage_accounts_get_request( # pylint: disable=name-too-long resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -130,7 +130,7 @@ def build_storage_accounts_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_storage_accounts_create_or_update_request( # pylint: disable=name-too-long +def build_combined_storage_accounts_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -161,14 +161,14 @@ def build_storage_accounts_create_or_update_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservicesharedmodels.combined.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -205,7 +205,7 @@ def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _models. api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -277,7 +277,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -496,14 +496,14 @@ def get_long_running_output(pipeline_response): ) -class StorageAccountsOperations: +class CombinedStorageAccountsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservicesharedmodels.combined.CombinedClient`'s - :attr:`storage_accounts` attribute. + :attr:`combined_storage_accounts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -540,7 +540,7 @@ def get(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _mo api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01")) cls: ClsType[_models.StorageAccount] = kwargs.pop("cls", None) - _request = build_storage_accounts_get_request( + _request = build_combined_storage_accounts_get_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, @@ -612,7 +612,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_storage_accounts_create_or_update_request( + _request = build_combined_storage_accounts_create_or_update_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations.py new file mode 100644 index 0000000000..7be0f11e49 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservicesharedmodels.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedStorageAccountsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_storage_accounts_get(self, resource_group): + response = self.client.combined_storage_accounts.get( + resource_group_name=resource_group.name, + account_name="str", + api_version="2025-02-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_storage_accounts_begin_create_or_update(self, resource_group): + response = self.client.combined_storage_accounts.begin_create_or_update( + resource_group_name=resource_group.name, + account_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "metadata": {"createdAt": "2020-02-20 00:00:00", "createdBy": "str", "tags": {"str": "str"}}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-02-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations_async.py new file mode 100644 index 0000000000..4accaa7ff8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_storage_accounts_operations_async.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservicesharedmodels.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedStorageAccountsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_storage_accounts_get(self, resource_group): + response = await self.client.combined_storage_accounts.get( + resource_group_name=resource_group.name, + account_name="str", + api_version="2025-02-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_storage_accounts_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_storage_accounts.begin_create_or_update( + resource_group_name=resource_group.name, + account_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "metadata": {"createdAt": "2020-02-20 00:00:00", "createdBy": "str", "tags": {"str": "str"}}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-02-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations.py new file mode 100644 index 0000000000..35d0751ca2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservicesharedmodels.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_get(self, resource_group): + response = self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2025-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "metadata": {"createdAt": "2020-02-20 00:00:00", "createdBy": "str", "tags": {"str": "str"}}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-05-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations_async.py new file mode 100644 index 0000000000..8265ca037e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service-shared-models/generated_tests/test_combined_combined_virtual_machines_operations_async.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservicesharedmodels.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_get(self, resource_group): + response = await self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2025-05-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": { + "metadata": {"createdAt": "2020-02-20 00:00:00", "createdBy": "str", "tags": {"str": "str"}}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-05-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/apiview-properties.json index eb04eac86e..c0d581ba2c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/apiview-properties.json @@ -13,13 +13,13 @@ "azure.resourcemanager.multiservice.combined.models.VirtualMachineProperties": "Azure.ResourceManager.MultiService.Compute.VirtualMachineProperties", "azure.resourcemanager.multiservice.combined.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.resourcemanager.multiservice.combined.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", - "azure.resourcemanager.multiservice.combined.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.get", - "azure.resourcemanager.multiservice.combined.aio.operations.VirtualMachinesOperations.get": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.get", - "azure.resourcemanager.multiservice.combined.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiservice.combined.aio.operations.VirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.createOrUpdate", - "azure.resourcemanager.multiservice.combined.operations.DisksOperations.get": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.get", - "azure.resourcemanager.multiservice.combined.aio.operations.DisksOperations.get": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.get", - "azure.resourcemanager.multiservice.combined.operations.DisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.createOrUpdate", - "azure.resourcemanager.multiservice.combined.aio.operations.DisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.createOrUpdate" + "azure.resourcemanager.multiservice.combined.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.get", + "azure.resourcemanager.multiservice.combined.aio.operations.CombinedVirtualMachinesOperations.get": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.get", + "azure.resourcemanager.multiservice.combined.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiservice.combined.aio.operations.CombinedVirtualMachinesOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.Compute.VirtualMachines.createOrUpdate", + "azure.resourcemanager.multiservice.combined.operations.CombinedDisksOperations.get": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.get", + "azure.resourcemanager.multiservice.combined.aio.operations.CombinedDisksOperations.get": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.get", + "azure.resourcemanager.multiservice.combined.operations.CombinedDisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.createOrUpdate", + "azure.resourcemanager.multiservice.combined.aio.operations.CombinedDisksOperations.begin_create_or_update": "Azure.ResourceManager.MultiService.ComputeDisk.Disks.createOrUpdate" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/_client.py index 20e90e9288..ca391fa6e6 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/_client.py @@ -19,7 +19,7 @@ from ._configuration import CombinedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import DisksOperations, VirtualMachinesOperations +from .operations import CombinedDisksOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,11 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiservice.combined.operations.VirtualMachinesOperations - :ivar disks: DisksOperations operations - :vartype disks: azure.resourcemanager.multiservice.combined.operations.DisksOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiservice.combined.operations.CombinedVirtualMachinesOperations + :ivar combined_disks: CombinedDisksOperations operations + :vartype combined_disks: + azure.resourcemanager.multiservice.combined.operations.CombinedDisksOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -94,10 +95,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.disks = DisksOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_disks = CombinedDisksOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/_client.py index 4c4c40bd0e..276de0774b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CombinedClientConfiguration -from .operations import DisksOperations, VirtualMachinesOperations +from .operations import CombinedDisksOperations, CombinedVirtualMachinesOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,11 +29,12 @@ class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar virtual_machines: VirtualMachinesOperations operations - :vartype virtual_machines: - azure.resourcemanager.multiservice.combined.aio.operations.VirtualMachinesOperations - :ivar disks: DisksOperations operations - :vartype disks: azure.resourcemanager.multiservice.combined.aio.operations.DisksOperations + :ivar combined_virtual_machines: CombinedVirtualMachinesOperations operations + :vartype combined_virtual_machines: + azure.resourcemanager.multiservice.combined.aio.operations.CombinedVirtualMachinesOperations + :ivar combined_disks: CombinedDisksOperations operations + :vartype combined_disks: + azure.resourcemanager.multiservice.combined.aio.operations.CombinedDisksOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -96,10 +97,10 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.virtual_machines = VirtualMachinesOperations( + self.combined_virtual_machines = CombinedVirtualMachinesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.disks = DisksOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_disks = CombinedDisksOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/__init__.py index 58ec496772..a70c57e609 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import DisksOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedDisksOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "DisksOperations", + "CombinedVirtualMachinesOperations", + "CombinedDisksOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/_operations.py index 10b702f1bc..f13765ce19 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/aio/operations/_operations.py @@ -33,10 +33,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_disks_create_or_update_request, - build_disks_get_request, - build_virtual_machines_create_or_update_request, - build_virtual_machines_get_request, + build_combined_disks_create_or_update_request, + build_combined_disks_get_request, + build_combined_virtual_machines_create_or_update_request, + build_combined_virtual_machines_get_request, ) from .._configuration import CombinedClientConfiguration @@ -45,14 +45,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservice.combined.aio.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -89,7 +89,7 @@ async def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _m api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -161,7 +161,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -380,14 +380,14 @@ def get_long_running_output(pipeline_response): ) -class DisksOperations: +class CombinedDisksOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservice.combined.aio.CombinedClient`'s - :attr:`disks` attribute. + :attr:`combined_disks` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -424,7 +424,7 @@ async def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-02")) cls: ClsType[_models.Disk] = kwargs.pop("cls", None) - _request = build_disks_get_request( + _request = build_combined_disks_get_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, @@ -492,7 +492,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_disks_create_or_update_request( + _request = build_combined_disks_create_or_update_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/__init__.py index 58ec496772..a70c57e609 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import VirtualMachinesOperations # type: ignore -from ._operations import DisksOperations # type: ignore +from ._operations import CombinedVirtualMachinesOperations # type: ignore +from ._operations import CombinedDisksOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "VirtualMachinesOperations", - "DisksOperations", + "CombinedVirtualMachinesOperations", + "CombinedDisksOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/_operations.py index 8f84cf2489..9de357652d 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/azure/resourcemanager/multiservice/combined/operations/_operations.py @@ -43,7 +43,7 @@ _SERIALIZER.client_side_validation = False -def build_virtual_machines_get_request( +def build_combined_virtual_machines_get_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -71,7 +71,7 @@ def build_virtual_machines_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_virtual_machines_create_or_update_request( # pylint: disable=name-too-long +def build_combined_virtual_machines_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, vm_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -102,7 +102,7 @@ def build_virtual_machines_create_or_update_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_disks_get_request( +def build_combined_disks_get_request( resource_group_name: str, disk_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -130,7 +130,7 @@ def build_disks_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_disks_create_or_update_request( +def build_combined_disks_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, disk_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -161,14 +161,14 @@ def build_disks_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -class VirtualMachinesOperations: +class CombinedVirtualMachinesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservice.combined.CombinedClient`'s - :attr:`virtual_machines` attribute. + :attr:`combined_virtual_machines` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -205,7 +205,7 @@ def get(self, resource_group_name: str, vm_name: str, **kwargs: Any) -> _models. api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-01")) cls: ClsType[_models.VirtualMachine] = kwargs.pop("cls", None) - _request = build_virtual_machines_get_request( + _request = build_combined_virtual_machines_get_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -277,7 +277,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_virtual_machines_create_or_update_request( + _request = build_combined_virtual_machines_create_or_update_request( resource_group_name=resource_group_name, vm_name=vm_name, subscription_id=self._config.subscription_id, @@ -496,14 +496,14 @@ def get_long_running_output(pipeline_response): ) -class DisksOperations: +class CombinedDisksOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.multiservice.combined.CombinedClient`'s - :attr:`disks` attribute. + :attr:`combined_disks` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -540,7 +540,7 @@ def get(self, resource_group_name: str, disk_name: str, **kwargs: Any) -> _model api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-01-02")) cls: ClsType[_models.Disk] = kwargs.pop("cls", None) - _request = build_disks_get_request( + _request = build_combined_disks_get_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, @@ -608,7 +608,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_disks_create_or_update_request( + _request = build_combined_disks_create_or_update_request( resource_group_name=resource_group_name, disk_name=disk_name, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations.py new file mode 100644 index 0000000000..153f0c3d5b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservice.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedDisksOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_disks_get(self, resource_group): + response = self.client.combined_disks.get( + resource_group_name=resource_group.name, + disk_name="str", + api_version="2025-01-02", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_disks_begin_create_or_update(self, resource_group): + response = self.client.combined_disks.begin_create_or_update( + resource_group_name=resource_group.name, + disk_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-01-02", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations_async.py new file mode 100644 index 0000000000..e9473ed2cc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_disks_operations_async.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservice.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedDisksOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_disks_get(self, resource_group): + response = await self.client.combined_disks.get( + resource_group_name=resource_group.name, + disk_name="str", + api_version="2025-01-02", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_disks_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_disks.begin_create_or_update( + resource_group_name=resource_group.name, + disk_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-01-02", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations.py new file mode 100644 index 0000000000..29582c447b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservice.combined import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_get(self, resource_group): + response = self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2025-04-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-04-01", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations_async.py new file mode 100644 index 0000000000..bd771855bd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-multi-service/generated_tests/test_combined_combined_virtual_machines_operations_async.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.multiservice.combined.aio import CombinedClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedVirtualMachinesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(CombinedClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_get(self, resource_group): + response = await self.client.combined_virtual_machines.get( + resource_group_name=resource_group.name, + vm_name="str", + api_version="2025-04-01", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_combined_virtual_machines_begin_create_or_update(self, resource_group): + response = await ( + await self.client.combined_virtual_machines.begin_create_or_update( + resource_group_name=resource_group.name, + vm_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-04-01", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/apiview-properties.json index bdd53c23a2..b18e30215d 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/apiview-properties.json @@ -5,9 +5,9 @@ "azure.resourcemanager.nonresource.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.resourcemanager.nonresource.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", "azure.resourcemanager.nonresource.models.NonResource": "Azure.ResourceManager.NonResource.NonResource", - "azure.resourcemanager.nonresource.operations.NonResourceOperationsOperations.get": "Azure.ResourceManager.NonResource.NonResourceOperations.get", - "azure.resourcemanager.nonresource.aio.operations.NonResourceOperationsOperations.get": "Azure.ResourceManager.NonResource.NonResourceOperations.get", - "azure.resourcemanager.nonresource.operations.NonResourceOperationsOperations.create": "Azure.ResourceManager.NonResource.NonResourceOperations.create", - "azure.resourcemanager.nonresource.aio.operations.NonResourceOperationsOperations.create": "Azure.ResourceManager.NonResource.NonResourceOperations.create" + "azure.resourcemanager.nonresource.operations.NonResourceClientNonResourceOperationsOperations.get": "Azure.ResourceManager.NonResource.NonResourceOperations.get", + "azure.resourcemanager.nonresource.aio.operations.NonResourceClientNonResourceOperationsOperations.get": "Azure.ResourceManager.NonResource.NonResourceOperations.get", + "azure.resourcemanager.nonresource.operations.NonResourceClientNonResourceOperationsOperations.create": "Azure.ResourceManager.NonResource.NonResourceOperations.create", + "azure.resourcemanager.nonresource.aio.operations.NonResourceClientNonResourceOperationsOperations.create": "Azure.ResourceManager.NonResource.NonResourceOperations.create" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/_client.py index 11c3b0c285..f646acda63 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/_client.py @@ -19,7 +19,7 @@ from ._configuration import NonResourceClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import NonResourceOperationsOperations +from .operations import NonResourceClientNonResourceOperationsOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,9 +29,10 @@ class NonResourceClient: """Arm Resource Provider management API. - :ivar non_resource_operations: NonResourceOperationsOperations operations - :vartype non_resource_operations: - azure.resourcemanager.nonresource.operations.NonResourceOperationsOperations + :ivar non_resource_client_non_resource_operations: + NonResourceClientNonResourceOperationsOperations operations + :vartype non_resource_client_non_resource_operations: + azure.resourcemanager.nonresource.operations.NonResourceClientNonResourceOperationsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -94,7 +95,7 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.non_resource_operations = NonResourceOperationsOperations( + self.non_resource_client_non_resource_operations = NonResourceClientNonResourceOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/_client.py index 7a070013bc..3c192e515b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/_client.py @@ -19,7 +19,7 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NonResourceClientConfiguration -from .operations import NonResourceOperationsOperations +from .operations import NonResourceClientNonResourceOperationsOperations if TYPE_CHECKING: from azure.core import AzureClouds @@ -29,9 +29,10 @@ class NonResourceClient: """Arm Resource Provider management API. - :ivar non_resource_operations: NonResourceOperationsOperations operations - :vartype non_resource_operations: - azure.resourcemanager.nonresource.aio.operations.NonResourceOperationsOperations + :ivar non_resource_client_non_resource_operations: + NonResourceClientNonResourceOperationsOperations operations + :vartype non_resource_client_non_resource_operations: + azure.resourcemanager.nonresource.aio.operations.NonResourceClientNonResourceOperationsOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -96,7 +97,7 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.non_resource_operations = NonResourceOperationsOperations( + self.non_resource_client_non_resource_operations = NonResourceClientNonResourceOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/__init__.py index eeee4ab17e..02cc4f9ca0 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NonResourceOperationsOperations # type: ignore +from ._operations import NonResourceClientNonResourceOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NonResourceOperationsOperations", + "NonResourceClientNonResourceOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py index f090a3ee87..e039148053 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py @@ -31,8 +31,8 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_non_resource_operations_create_request, - build_non_resource_operations_get_request, + build_non_resource_client_non_resource_operations_create_request, + build_non_resource_client_non_resource_operations_get_request, ) from .._configuration import NonResourceClientConfiguration @@ -41,14 +41,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class NonResourceOperationsOperations: +class NonResourceClientNonResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.nonresource.aio.NonResourceClient`'s - :attr:`non_resource_operations` attribute. + :attr:`non_resource_client_non_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -83,7 +83,7 @@ async def get(self, location: str, parameter: str, **kwargs: Any) -> _models.Non cls: ClsType[_models.NonResource] = kwargs.pop("cls", None) - _request = build_non_resource_operations_get_request( + _request = build_non_resource_client_non_resource_operations_get_request( location=location, parameter=parameter, subscription_id=self._config.subscription_id, @@ -230,7 +230,7 @@ async def create( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_non_resource_operations_create_request( + _request = build_non_resource_client_non_resource_operations_create_request( location=location, parameter=parameter, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/__init__.py index eeee4ab17e..02cc4f9ca0 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NonResourceOperationsOperations # type: ignore +from ._operations import NonResourceClientNonResourceOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NonResourceOperationsOperations", + "NonResourceClientNonResourceOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py index 9a28cb4198..7d14e1dd1b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py @@ -41,7 +41,7 @@ _SERIALIZER.client_side_validation = False -def build_non_resource_operations_get_request( # pylint: disable=name-too-long +def build_non_resource_client_non_resource_operations_get_request( # pylint: disable=name-too-long location: str, parameter: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -69,7 +69,7 @@ def build_non_resource_operations_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_non_resource_operations_create_request( # pylint: disable=name-too-long +def build_non_resource_client_non_resource_operations_create_request( # pylint: disable=name-too-long location: str, parameter: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -100,14 +100,14 @@ def build_non_resource_operations_create_request( # pylint: disable=name-too-lo return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -class NonResourceOperationsOperations: +class NonResourceClientNonResourceOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.nonresource.NonResourceClient`'s - :attr:`non_resource_operations` attribute. + :attr:`non_resource_client_non_resource_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -142,7 +142,7 @@ def get(self, location: str, parameter: str, **kwargs: Any) -> _models.NonResour cls: ClsType[_models.NonResource] = kwargs.pop("cls", None) - _request = build_non_resource_operations_get_request( + _request = build_non_resource_client_non_resource_operations_get_request( location=location, parameter=parameter, subscription_id=self._config.subscription_id, @@ -289,7 +289,7 @@ def create( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_non_resource_operations_create_request( + _request = build_non_resource_client_non_resource_operations_create_request( location=location, parameter=parameter, subscription_id=self._config.subscription_id, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations.py new file mode 100644 index 0000000000..c1fe12c5d0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.nonresource import NonResourceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNonResourceNonResourceClientNonResourceOperationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NonResourceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_non_resource_client_non_resource_operations_get(self, resource_group): + response = self.client.non_resource_client_non_resource_operations.get( + location="str", + parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_non_resource_client_non_resource_operations_create(self, resource_group): + response = self.client.non_resource_client_non_resource_operations.create( + location="str", + parameter="str", + body={"id": "str", "name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations_async.py new file mode 100644 index 0000000000..510ed2c33c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/generated_tests/test_non_resource_non_resource_client_non_resource_operations_operations_async.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.nonresource.aio import NonResourceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNonResourceNonResourceClientNonResourceOperationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(NonResourceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_non_resource_client_non_resource_operations_get(self, resource_group): + response = await self.client.non_resource_client_non_resource_operations.get( + location="str", + parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_non_resource_client_non_resource_operations_create(self, resource_group): + response = await self.client.non_resource_client_non_resource_operations.create( + location="str", + parameter="str", + body={"id": "str", "name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/apiview-properties.json index b7b5c0afd0..2104613680 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/apiview-properties.json @@ -27,29 +27,29 @@ "azure.resourcemanager.operationtemplates.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", "azure.resourcemanager.operationtemplates.models.CheckNameAvailabilityReason": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", "azure.resourcemanager.operationtemplates.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", - "azure.resourcemanager.operationtemplates.operations.Operations.list": "Azure.ResourceManager.Operations.list", - "azure.resourcemanager.operationtemplates.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list", - "azure.resourcemanager.operationtemplates.operations.CheckNameAvailabilityOperations.check_global": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkGlobal", - "azure.resourcemanager.operationtemplates.aio.operations.CheckNameAvailabilityOperations.check_global": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkGlobal", - "azure.resourcemanager.operationtemplates.operations.CheckNameAvailabilityOperations.check_local": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkLocal", - "azure.resourcemanager.operationtemplates.aio.operations.CheckNameAvailabilityOperations.check_local": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkLocal", - "azure.resourcemanager.operationtemplates.operations.LroOperations.begin_create_or_replace": "Azure.ResourceManager.OperationTemplates.Lro.createOrReplace", - "azure.resourcemanager.operationtemplates.aio.operations.LroOperations.begin_create_or_replace": "Azure.ResourceManager.OperationTemplates.Lro.createOrReplace", - "azure.resourcemanager.operationtemplates.operations.LroOperations.begin_export": "Azure.ResourceManager.OperationTemplates.Lro.export", - "azure.resourcemanager.operationtemplates.aio.operations.LroOperations.begin_export": "Azure.ResourceManager.OperationTemplates.Lro.export", - "azure.resourcemanager.operationtemplates.operations.LroOperations.begin_delete": "Azure.ResourceManager.OperationTemplates.Lro.delete", - "azure.resourcemanager.operationtemplates.aio.operations.LroOperations.begin_delete": "Azure.ResourceManager.OperationTemplates.Lro.delete", - "azure.resourcemanager.operationtemplates.operations.LroOperations.begin_export_array": "Azure.ResourceManager.OperationTemplates.Lro.exportArray", - "azure.resourcemanager.operationtemplates.aio.operations.LroOperations.begin_export_array": "Azure.ResourceManager.OperationTemplates.Lro.exportArray", - "azure.resourcemanager.operationtemplates.operations.LroPagingOperations.begin_post_paging_lro": "Azure.ResourceManager.OperationTemplates.LroPaging.postPagingLro", - "azure.resourcemanager.operationtemplates.aio.operations.LroPagingOperations.begin_post_paging_lro": "Azure.ResourceManager.OperationTemplates.LroPaging.postPagingLro", - "azure.resourcemanager.operationtemplates.operations.OptionalBodyOperations.get": "Azure.ResourceManager.OperationTemplates.OptionalBody.get", - "azure.resourcemanager.operationtemplates.aio.operations.OptionalBodyOperations.get": "Azure.ResourceManager.OperationTemplates.OptionalBody.get", - "azure.resourcemanager.operationtemplates.operations.OptionalBodyOperations.patch": "Azure.ResourceManager.OperationTemplates.OptionalBody.patch", - "azure.resourcemanager.operationtemplates.aio.operations.OptionalBodyOperations.patch": "Azure.ResourceManager.OperationTemplates.OptionalBody.patch", - "azure.resourcemanager.operationtemplates.operations.OptionalBodyOperations.post": "Azure.ResourceManager.OperationTemplates.OptionalBody.post", - "azure.resourcemanager.operationtemplates.aio.operations.OptionalBodyOperations.post": "Azure.ResourceManager.OperationTemplates.OptionalBody.post", - "azure.resourcemanager.operationtemplates.operations.OptionalBodyOperations.provider_post": "Azure.ResourceManager.OperationTemplates.OptionalBody.providerPost", - "azure.resourcemanager.operationtemplates.aio.operations.OptionalBodyOperations.provider_post": "Azure.ResourceManager.OperationTemplates.OptionalBody.providerPost" + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOperationsOperations.list": "Azure.ResourceManager.Operations.list", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOperationsOperations.list": "Azure.ResourceManager.Operations.list", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientCheckNameAvailabilityOperations.check_global": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkGlobal", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientCheckNameAvailabilityOperations.check_global": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkGlobal", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientCheckNameAvailabilityOperations.check_local": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkLocal", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientCheckNameAvailabilityOperations.check_local": "Azure.ResourceManager.OperationTemplates.CheckNameAvailability.checkLocal", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroOperations.begin_create_or_replace": "Azure.ResourceManager.OperationTemplates.Lro.createOrReplace", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroOperations.begin_create_or_replace": "Azure.ResourceManager.OperationTemplates.Lro.createOrReplace", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroOperations.begin_export": "Azure.ResourceManager.OperationTemplates.Lro.export", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroOperations.begin_export": "Azure.ResourceManager.OperationTemplates.Lro.export", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroOperations.begin_delete": "Azure.ResourceManager.OperationTemplates.Lro.delete", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroOperations.begin_delete": "Azure.ResourceManager.OperationTemplates.Lro.delete", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroOperations.begin_export_array": "Azure.ResourceManager.OperationTemplates.Lro.exportArray", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroOperations.begin_export_array": "Azure.ResourceManager.OperationTemplates.Lro.exportArray", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroPagingOperations.begin_post_paging_lro": "Azure.ResourceManager.OperationTemplates.LroPaging.postPagingLro", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroPagingOperations.begin_post_paging_lro": "Azure.ResourceManager.OperationTemplates.LroPaging.postPagingLro", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOptionalBodyOperations.get": "Azure.ResourceManager.OperationTemplates.OptionalBody.get", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOptionalBodyOperations.get": "Azure.ResourceManager.OperationTemplates.OptionalBody.get", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOptionalBodyOperations.patch": "Azure.ResourceManager.OperationTemplates.OptionalBody.patch", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOptionalBodyOperations.patch": "Azure.ResourceManager.OperationTemplates.OptionalBody.patch", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOptionalBodyOperations.post": "Azure.ResourceManager.OperationTemplates.OptionalBody.post", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOptionalBodyOperations.post": "Azure.ResourceManager.OperationTemplates.OptionalBody.post", + "azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOptionalBodyOperations.provider_post": "Azure.ResourceManager.OperationTemplates.OptionalBody.providerPost", + "azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOptionalBodyOperations.provider_post": "Azure.ResourceManager.OperationTemplates.OptionalBody.providerPost" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/_client.py index f6dd3f8aba..650e7e0d56 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/_client.py @@ -20,11 +20,11 @@ from ._configuration import OperationTemplatesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - CheckNameAvailabilityOperations, - LroOperations, - LroPagingOperations, - Operations, - OptionalBodyOperations, + OperationTemplatesClientCheckNameAvailabilityOperations, + OperationTemplatesClientLroOperations, + OperationTemplatesClientLroPagingOperations, + OperationTemplatesClientOperationsOperations, + OperationTemplatesClientOptionalBodyOperations, ) if TYPE_CHECKING: @@ -35,18 +35,25 @@ class OperationTemplatesClient: """Arm Resource Provider management API. - :ivar operations: Operations operations - :vartype operations: azure.resourcemanager.operationtemplates.operations.Operations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: - azure.resourcemanager.operationtemplates.operations.CheckNameAvailabilityOperations - :ivar lro: LroOperations operations - :vartype lro: azure.resourcemanager.operationtemplates.operations.LroOperations - :ivar lro_paging: LroPagingOperations operations - :vartype lro_paging: azure.resourcemanager.operationtemplates.operations.LroPagingOperations - :ivar optional_body: OptionalBodyOperations operations - :vartype optional_body: - azure.resourcemanager.operationtemplates.operations.OptionalBodyOperations + :ivar operation_templates_client_operations: OperationTemplatesClientOperationsOperations + operations + :vartype operation_templates_client_operations: + azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOperationsOperations + :ivar operation_templates_client_check_name_availability: + OperationTemplatesClientCheckNameAvailabilityOperations operations + :vartype operation_templates_client_check_name_availability: + azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientCheckNameAvailabilityOperations + :ivar operation_templates_client_lro: OperationTemplatesClientLroOperations operations + :vartype operation_templates_client_lro: + azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroOperations + :ivar operation_templates_client_lro_paging: OperationTemplatesClientLroPagingOperations + operations + :vartype operation_templates_client_lro_paging: + azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientLroPagingOperations + :ivar operation_templates_client_optional_body: OperationTemplatesClientOptionalBodyOperations + operations + :vartype operation_templates_client_optional_body: + azure.resourcemanager.operationtemplates.operations.OperationTemplatesClientOptionalBodyOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -111,13 +118,23 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( + self.operation_templates_client_operations = OperationTemplatesClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_check_name_availability = ( + OperationTemplatesClientCheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.operation_templates_client_lro = OperationTemplatesClientLroOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_lro_paging = OperationTemplatesClientLroPagingOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_optional_body = OperationTemplatesClientOptionalBodyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.lro = LroOperations(self._client, self._config, self._serialize, self._deserialize) - self.lro_paging = LroPagingOperations(self._client, self._config, self._serialize, self._deserialize) - self.optional_body = OptionalBodyOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/_client.py index 80a0e18208..28329c27de 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/_client.py @@ -20,11 +20,11 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OperationTemplatesClientConfiguration from .operations import ( - CheckNameAvailabilityOperations, - LroOperations, - LroPagingOperations, - Operations, - OptionalBodyOperations, + OperationTemplatesClientCheckNameAvailabilityOperations, + OperationTemplatesClientLroOperations, + OperationTemplatesClientLroPagingOperations, + OperationTemplatesClientOperationsOperations, + OperationTemplatesClientOptionalBodyOperations, ) if TYPE_CHECKING: @@ -35,19 +35,25 @@ class OperationTemplatesClient: """Arm Resource Provider management API. - :ivar operations: Operations operations - :vartype operations: azure.resourcemanager.operationtemplates.aio.operations.Operations - :ivar check_name_availability: CheckNameAvailabilityOperations operations - :vartype check_name_availability: - azure.resourcemanager.operationtemplates.aio.operations.CheckNameAvailabilityOperations - :ivar lro: LroOperations operations - :vartype lro: azure.resourcemanager.operationtemplates.aio.operations.LroOperations - :ivar lro_paging: LroPagingOperations operations - :vartype lro_paging: - azure.resourcemanager.operationtemplates.aio.operations.LroPagingOperations - :ivar optional_body: OptionalBodyOperations operations - :vartype optional_body: - azure.resourcemanager.operationtemplates.aio.operations.OptionalBodyOperations + :ivar operation_templates_client_operations: OperationTemplatesClientOperationsOperations + operations + :vartype operation_templates_client_operations: + azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOperationsOperations + :ivar operation_templates_client_check_name_availability: + OperationTemplatesClientCheckNameAvailabilityOperations operations + :vartype operation_templates_client_check_name_availability: + azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientCheckNameAvailabilityOperations + :ivar operation_templates_client_lro: OperationTemplatesClientLroOperations operations + :vartype operation_templates_client_lro: + azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroOperations + :ivar operation_templates_client_lro_paging: OperationTemplatesClientLroPagingOperations + operations + :vartype operation_templates_client_lro_paging: + azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientLroPagingOperations + :ivar operation_templates_client_optional_body: OperationTemplatesClientOptionalBodyOperations + operations + :vartype operation_templates_client_optional_body: + azure.resourcemanager.operationtemplates.aio.operations.OperationTemplatesClientOptionalBodyOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -114,13 +120,23 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.check_name_availability = CheckNameAvailabilityOperations( + self.operation_templates_client_operations = OperationTemplatesClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_check_name_availability = ( + OperationTemplatesClientCheckNameAvailabilityOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.operation_templates_client_lro = OperationTemplatesClientLroOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_lro_paging = OperationTemplatesClientLroPagingOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.operation_templates_client_optional_body = OperationTemplatesClientOptionalBodyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.lro = LroOperations(self._client, self._config, self._serialize, self._deserialize) - self.lro_paging = LroPagingOperations(self._client, self._config, self._serialize, self._deserialize) - self.optional_body = OptionalBodyOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/__init__.py index 3dab26ece1..c79e551f1b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/__init__.py @@ -12,22 +12,22 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Operations # type: ignore -from ._operations import CheckNameAvailabilityOperations # type: ignore -from ._operations import LroOperations # type: ignore -from ._operations import LroPagingOperations # type: ignore -from ._operations import OptionalBodyOperations # type: ignore +from ._operations import OperationTemplatesClientOperationsOperations # type: ignore +from ._operations import OperationTemplatesClientCheckNameAvailabilityOperations # type: ignore +from ._operations import OperationTemplatesClientLroOperations # type: ignore +from ._operations import OperationTemplatesClientLroPagingOperations # type: ignore +from ._operations import OperationTemplatesClientOptionalBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "CheckNameAvailabilityOperations", - "LroOperations", - "LroPagingOperations", - "OptionalBodyOperations", + "OperationTemplatesClientOperationsOperations", + "OperationTemplatesClientCheckNameAvailabilityOperations", + "OperationTemplatesClientLroOperations", + "OperationTemplatesClientLroPagingOperations", + "OperationTemplatesClientOptionalBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py index e1659313c4..702d941d22 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py @@ -37,18 +37,18 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_check_name_availability_check_global_request, - build_check_name_availability_check_local_request, - build_lro_create_or_replace_request, - build_lro_delete_request, - build_lro_export_array_request, - build_lro_export_request, - build_lro_paging_post_paging_lro_request, - build_operations_list_request, - build_optional_body_get_request, - build_optional_body_patch_request, - build_optional_body_post_request, - build_optional_body_provider_post_request, + build_operation_templates_client_check_name_availability_check_global_request, + build_operation_templates_client_check_name_availability_check_local_request, + build_operation_templates_client_lro_create_or_replace_request, + build_operation_templates_client_lro_delete_request, + build_operation_templates_client_lro_export_array_request, + build_operation_templates_client_lro_export_request, + build_operation_templates_client_lro_paging_post_paging_lro_request, + build_operation_templates_client_operations_list_request, + build_operation_templates_client_optional_body_get_request, + build_operation_templates_client_optional_body_patch_request, + build_operation_templates_client_optional_body_post_request, + build_operation_templates_client_optional_body_provider_post_request, ) from .._configuration import OperationTemplatesClientConfiguration @@ -58,14 +58,14 @@ List = list -class Operations: +class OperationTemplatesClientOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.aio.OperationTemplatesClient`'s - :attr:`operations` attribute. + :attr:`operation_templates_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -100,7 +100,7 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_operation_templates_client_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -163,14 +163,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class CheckNameAvailabilityOperations: +class OperationTemplatesClientCheckNameAvailabilityOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.aio.OperationTemplatesClient`'s - :attr:`check_name_availability` attribute. + :attr:`operation_templates_client_check_name_availability` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -267,7 +267,7 @@ async def check_global( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_check_name_availability_check_global_request( + _request = build_operation_templates_client_check_name_availability_check_global_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -410,7 +410,7 @@ async def check_local( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_check_name_availability_check_local_request( + _request = build_operation_templates_client_check_name_availability_check_local_request( location=location, subscription_id=self._config.subscription_id, content_type=content_type, @@ -455,14 +455,14 @@ async def check_local( return deserialized # type: ignore -class LroOperations: +class OperationTemplatesClientLroOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.aio.OperationTemplatesClient`'s - :attr:`lro` attribute. + :attr:`operation_templates_client_lro` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -496,7 +496,7 @@ async def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_create_or_replace_request( + _request = build_operation_templates_client_lro_create_or_replace_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -731,7 +731,7 @@ async def _export_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_export_request( + _request = build_operation_templates_client_lro_export_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -964,7 +964,7 @@ async def _delete_initial(self, resource_group_name: str, order_name: str, **kwa cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_lro_delete_request( + _request = build_operation_templates_client_lro_delete_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -1089,7 +1089,7 @@ async def _export_array_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_export_array_request( + _request = build_operation_templates_client_lro_export_array_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -1254,14 +1254,14 @@ def get_long_running_output(pipeline_response): ) -class LroPagingOperations: +class OperationTemplatesClientLroPagingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.aio.OperationTemplatesClient`'s - :attr:`lro_paging` attribute. + :attr:`operation_templates_client_lro_paging` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1287,7 +1287,7 @@ async def _post_paging_lro_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_lro_paging_post_paging_lro_request( + _request = build_operation_templates_client_lro_paging_post_paging_lro_request( resource_group_name=resource_group_name, product_name=product_name, subscription_id=self._config.subscription_id, @@ -1364,7 +1364,7 @@ async def begin_post_paging_lro( def prepare_request(next_link=None): if not next_link: - _request = build_lro_paging_post_paging_lro_request( + _request = build_operation_templates_client_lro_paging_post_paging_lro_request( resource_group_name=resource_group_name, product_name=product_name, subscription_id=self._config.subscription_id, @@ -1474,14 +1474,14 @@ async def internal_get_next(next_link=None): ) -class OptionalBodyOperations: +class OperationTemplatesClientOptionalBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.aio.OperationTemplatesClient`'s - :attr:`optional_body` attribute. + :attr:`operation_templates_client_optional_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1517,7 +1517,7 @@ async def get(self, resource_group_name: str, widget_name: str, **kwargs: Any) - cls: ClsType[_models.Widget] = kwargs.pop("cls", None) - _request = build_optional_body_get_request( + _request = build_operation_templates_client_optional_body_get_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -1688,7 +1688,7 @@ async def patch( else: _content = None - _request = build_optional_body_patch_request( + _request = build_operation_templates_client_optional_body_patch_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -1861,7 +1861,7 @@ async def post( else: _content = None - _request = build_optional_body_post_request( + _request = build_operation_templates_client_optional_body_post_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -1997,7 +1997,7 @@ async def provider_post( else: _content = None - _request = build_optional_body_provider_post_request( + _request = build_operation_templates_client_optional_body_provider_post_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/__init__.py index 3dab26ece1..c79e551f1b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/__init__.py @@ -12,22 +12,22 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Operations # type: ignore -from ._operations import CheckNameAvailabilityOperations # type: ignore -from ._operations import LroOperations # type: ignore -from ._operations import LroPagingOperations # type: ignore -from ._operations import OptionalBodyOperations # type: ignore +from ._operations import OperationTemplatesClientOperationsOperations # type: ignore +from ._operations import OperationTemplatesClientCheckNameAvailabilityOperations # type: ignore +from ._operations import OperationTemplatesClientLroOperations # type: ignore +from ._operations import OperationTemplatesClientLroPagingOperations # type: ignore +from ._operations import OperationTemplatesClientOptionalBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "CheckNameAvailabilityOperations", - "LroOperations", - "LroPagingOperations", - "OptionalBodyOperations", + "OperationTemplatesClientOperationsOperations", + "OperationTemplatesClientCheckNameAvailabilityOperations", + "OperationTemplatesClientLroOperations", + "OperationTemplatesClientLroPagingOperations", + "OperationTemplatesClientOptionalBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py index c6f9c024c0..a83e5ea6f3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py @@ -46,7 +46,9 @@ _SERIALIZER.client_side_validation = False -def build_operations_list_request(**kwargs: Any) -> HttpRequest: +def build_operation_templates_client_operations_list_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -65,7 +67,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_check_name_availability_check_global_request( # pylint: disable=name-too-long +def build_operation_templates_client_check_name_availability_check_global_request( # pylint: disable=name-too-long subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -94,7 +96,7 @@ def build_check_name_availability_check_global_request( # pylint: disable=name- return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_check_name_availability_check_local_request( # pylint: disable=name-too-long +def build_operation_templates_client_check_name_availability_check_local_request( # pylint: disable=name-too-long location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -124,7 +126,7 @@ def build_check_name_availability_check_local_request( # pylint: disable=name-t return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_lro_create_or_replace_request( +def build_operation_templates_client_lro_create_or_replace_request( # pylint: disable=name-too-long resource_group_name: str, order_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -155,7 +157,7 @@ def build_lro_create_or_replace_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_lro_export_request( +def build_operation_templates_client_lro_export_request( # pylint: disable=name-too-long resource_group_name: str, order_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -186,7 +188,7 @@ def build_lro_export_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_lro_delete_request( +def build_operation_templates_client_lro_delete_request( # pylint: disable=name-too-long resource_group_name: str, order_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -208,7 +210,9 @@ def build_lro_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_lro_export_array_request(subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_operation_templates_client_lro_export_array_request( # pylint: disable=name-too-long + subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -235,7 +239,7 @@ def build_lro_export_array_request(subscription_id: str, **kwargs: Any) -> HttpR return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_lro_paging_post_paging_lro_request( +def build_operation_templates_client_lro_paging_post_paging_lro_request( # pylint: disable=name-too-long resource_group_name: str, product_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -263,7 +267,7 @@ def build_lro_paging_post_paging_lro_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_optional_body_get_request( +def build_operation_templates_client_optional_body_get_request( # pylint: disable=name-too-long resource_group_name: str, widget_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -291,7 +295,7 @@ def build_optional_body_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_optional_body_patch_request( +def build_operation_templates_client_optional_body_patch_request( # pylint: disable=name-too-long resource_group_name: str, widget_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -322,7 +326,7 @@ def build_optional_body_patch_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_optional_body_post_request( +def build_operation_templates_client_optional_body_post_request( # pylint: disable=name-too-long resource_group_name: str, widget_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -353,7 +357,7 @@ def build_optional_body_post_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_optional_body_provider_post_request( # pylint: disable=name-too-long +def build_operation_templates_client_optional_body_provider_post_request( # pylint: disable=name-too-long subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -382,14 +386,14 @@ def build_optional_body_provider_post_request( # pylint: disable=name-too-long return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class Operations: +class OperationTemplatesClientOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.OperationTemplatesClient`'s - :attr:`operations` attribute. + :attr:`operation_templates_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -424,7 +428,7 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Operation"]: def prepare_request(next_link=None): if not next_link: - _request = build_operations_list_request( + _request = build_operation_templates_client_operations_list_request( api_version=self._config.api_version, headers=_headers, params=_params, @@ -487,14 +491,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class CheckNameAvailabilityOperations: +class OperationTemplatesClientCheckNameAvailabilityOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.OperationTemplatesClient`'s - :attr:`check_name_availability` attribute. + :attr:`operation_templates_client_check_name_availability` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -591,7 +595,7 @@ def check_global( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_check_name_availability_check_global_request( + _request = build_operation_templates_client_check_name_availability_check_global_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -641,7 +645,7 @@ def check_local( body: _models.CheckNameAvailabilityRequest, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.CheckNameAvailabilityResponse: """Implements local CheckNameAvailability operations. @@ -734,7 +738,7 @@ def check_local( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_check_name_availability_check_local_request( + _request = build_operation_templates_client_check_name_availability_check_local_request( location=location, subscription_id=self._config.subscription_id, content_type=content_type, @@ -779,14 +783,14 @@ def check_local( return deserialized # type: ignore -class LroOperations: +class OperationTemplatesClientLroOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.OperationTemplatesClient`'s - :attr:`lro` attribute. + :attr:`operation_templates_client_lro` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -820,7 +824,7 @@ def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_create_or_replace_request( + _request = build_operation_templates_client_lro_create_or_replace_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -876,7 +880,7 @@ def begin_create_or_replace( resource: _models.Order, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.Order]: """Create a Order. @@ -904,7 +908,7 @@ def begin_create_or_replace( resource: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.Order]: """Create a Order. @@ -932,7 +936,7 @@ def begin_create_or_replace( resource: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.Order]: """Create a Order. @@ -988,7 +992,7 @@ def begin_create_or_replace( cls=lambda x, y, z: x, headers=_headers, params=_params, - **kwargs + **kwargs, ) raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) @@ -1028,7 +1032,7 @@ def _export_initial( resource_group_name: str, order_name: str, body: Union[_models.ExportRequest, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -1051,7 +1055,7 @@ def _export_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_export_request( + _request = build_operation_templates_client_lro_export_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -1108,7 +1112,7 @@ def begin_export( body: _models.ExportRequest, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.ExportResult]: """A long-running resource action. @@ -1137,7 +1141,7 @@ def begin_export( body: JSON, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.ExportResult]: """A long-running resource action. @@ -1166,7 +1170,7 @@ def begin_export( body: IO[bytes], *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.ExportResult]: """A long-running resource action. @@ -1193,7 +1197,7 @@ def begin_export( resource_group_name: str, order_name: str, body: Union[_models.ExportRequest, JSON, IO[bytes]], - **kwargs: Any + **kwargs: Any, ) -> LROPoller[_models.ExportResult]: """A long-running resource action. @@ -1228,7 +1232,7 @@ def begin_export( cls=lambda x, y, z: x, headers=_headers, params=_params, - **kwargs + **kwargs, ) raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) @@ -1284,7 +1288,7 @@ def _delete_initial(self, resource_group_name: str, order_name: str, **kwargs: A cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_lro_delete_request( + _request = build_operation_templates_client_lro_delete_request( resource_group_name=resource_group_name, order_name=order_name, subscription_id=self._config.subscription_id, @@ -1355,7 +1359,7 @@ def begin_delete(self, resource_group_name: str, order_name: str, **kwargs: Any) cls=lambda x, y, z: x, headers=_headers, params=_params, - **kwargs + **kwargs, ) raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) @@ -1409,7 +1413,7 @@ def _export_array_initial( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lro_export_array_request( + _request = build_operation_templates_client_lro_export_array_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -1574,14 +1578,14 @@ def get_long_running_output(pipeline_response): ) -class LroPagingOperations: +class OperationTemplatesClientLroPagingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.OperationTemplatesClient`'s - :attr:`lro_paging` attribute. + :attr:`operation_templates_client_lro_paging` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1605,7 +1609,7 @@ def _post_paging_lro_initial(self, resource_group_name: str, product_name: str, cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_lro_paging_post_paging_lro_request( + _request = build_operation_templates_client_lro_paging_post_paging_lro_request( resource_group_name=resource_group_name, product_name=product_name, subscription_id=self._config.subscription_id, @@ -1682,7 +1686,7 @@ def begin_post_paging_lro( def prepare_request(next_link=None): if not next_link: - _request = build_lro_paging_post_paging_lro_request( + _request = build_operation_templates_client_lro_paging_post_paging_lro_request( resource_group_name=resource_group_name, product_name=product_name, subscription_id=self._config.subscription_id, @@ -1755,7 +1759,7 @@ def get_next(next_link=None): cls=lambda x, y, z: x, headers=_headers, params=_params, - **kwargs + **kwargs, ) raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) @@ -1792,14 +1796,14 @@ def internal_get_next(next_link=None): ) -class OptionalBodyOperations: +class OperationTemplatesClientOptionalBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.operationtemplates.OperationTemplatesClient`'s - :attr:`optional_body` attribute. + :attr:`operation_templates_client_optional_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1835,7 +1839,7 @@ def get(self, resource_group_name: str, widget_name: str, **kwargs: Any) -> _mod cls: ClsType[_models.Widget] = kwargs.pop("cls", None) - _request = build_optional_body_get_request( + _request = build_operation_templates_client_optional_body_get_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -1886,7 +1890,7 @@ def patch( properties: Optional[_models.Widget] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.Widget: """Update a Widget. @@ -1913,7 +1917,7 @@ def patch( properties: Optional[JSON] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.Widget: """Update a Widget. @@ -1940,7 +1944,7 @@ def patch( properties: Optional[IO[bytes]] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.Widget: """Update a Widget. @@ -1965,7 +1969,7 @@ def patch( resource_group_name: str, widget_name: str, properties: Optional[Union[_models.Widget, JSON, IO[bytes]]] = None, - **kwargs: Any + **kwargs: Any, ) -> _models.Widget: """Update a Widget. @@ -2006,7 +2010,7 @@ def patch( else: _content = None - _request = build_optional_body_patch_request( + _request = build_operation_templates_client_optional_body_patch_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -2059,7 +2063,7 @@ def post( body: Optional[_models.ActionRequest] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ActionResult: """A synchronous resource action. @@ -2086,7 +2090,7 @@ def post( body: Optional[JSON] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ActionResult: """A synchronous resource action. @@ -2113,7 +2117,7 @@ def post( body: Optional[IO[bytes]] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ActionResult: """A synchronous resource action. @@ -2138,7 +2142,7 @@ def post( resource_group_name: str, widget_name: str, body: Optional[Union[_models.ActionRequest, JSON, IO[bytes]]] = None, - **kwargs: Any + **kwargs: Any, ) -> _models.ActionResult: """A synchronous resource action. @@ -2179,7 +2183,7 @@ def post( else: _content = None - _request = build_optional_body_post_request( + _request = build_operation_templates_client_optional_body_post_request( resource_group_name=resource_group_name, widget_name=widget_name, subscription_id=self._config.subscription_id, @@ -2230,7 +2234,7 @@ def provider_post( body: Optional[_models.ChangeAllowanceRequest] = None, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models.ChangeAllowanceResult: """provider_post. @@ -2315,7 +2319,7 @@ def provider_post( else: _content = None - _request = build_optional_body_provider_post_request( + _request = build_operation_templates_client_optional_body_provider_post_request( subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations.py new file mode 100644 index 0000000000..5673e78a8e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientCheckNameAvailabilityOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_check_name_availability_check_global(self, resource_group): + response = self.client.operation_templates_client_check_name_availability.check_global( + body={"name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_check_name_availability_check_local(self, resource_group): + response = self.client.operation_templates_client_check_name_availability.check_local( + location="str", + body={"name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations_async.py new file mode 100644 index 0000000000..fa0573d1c8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_check_name_availability_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientCheckNameAvailabilityOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_check_name_availability_check_global(self, resource_group): + response = await self.client.operation_templates_client_check_name_availability.check_global( + body={"name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_check_name_availability_check_local(self, resource_group): + response = await self.client.operation_templates_client_check_name_availability.check_local( + location="str", + body={"name": "str", "type": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations.py new file mode 100644 index 0000000000..e65935f28d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientLroOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_lro_begin_create_or_replace(self, resource_group): + response = self.client.operation_templates_client_lro.begin_create_or_replace( + resource_group_name=resource_group.name, + order_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"amount": 0, "productId": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_lro_begin_export(self, resource_group): + response = self.client.operation_templates_client_lro.begin_export( + resource_group_name=resource_group.name, + order_name="str", + body={"format": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_lro_begin_delete(self, resource_group): + response = self.client.operation_templates_client_lro.begin_delete( + resource_group_name=resource_group.name, + order_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_lro_begin_export_array(self, resource_group): + response = self.client.operation_templates_client_lro.begin_export_array( + body={"format": "str"}, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations_async.py new file mode 100644 index 0000000000..8548311cb4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_operations_async.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientLroOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_lro_begin_create_or_replace(self, resource_group): + response = await ( + await self.client.operation_templates_client_lro.begin_create_or_replace( + resource_group_name=resource_group.name, + order_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"amount": 0, "productId": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_lro_begin_export(self, resource_group): + response = await ( + await self.client.operation_templates_client_lro.begin_export( + resource_group_name=resource_group.name, + order_name="str", + body={"format": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_lro_begin_delete(self, resource_group): + response = await ( + await self.client.operation_templates_client_lro.begin_delete( + resource_group_name=resource_group.name, + order_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_lro_begin_export_array(self, resource_group): + response = await ( + await self.client.operation_templates_client_lro.begin_export_array( + body={"format": "str"}, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations.py new file mode 100644 index 0000000000..dfb99569b6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientLroPagingOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_lro_paging_begin_post_paging_lro(self, resource_group): + response = self.client.operation_templates_client_lro_paging.begin_post_paging_lro( + resource_group_name=resource_group.name, + product_name="str", + ).result() # call '.result()' to poll until service return final result + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations_async.py new file mode 100644 index 0000000000..79ffff9ced --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_lro_paging_operations_async.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientLroPagingOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_lro_paging_begin_post_paging_lro(self, resource_group): + response = await ( + await self.client.operation_templates_client_lro_paging.begin_post_paging_lro( + resource_group_name=resource_group.name, + product_name="str", + ) + ).result() # call '.result()' to poll until service return final result + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations.py new file mode 100644 index 0000000000..40515c00e1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientOperationsOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_operations_list(self, resource_group): + response = self.client.operation_templates_client_operations.list() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations_async.py new file mode 100644 index 0000000000..6da0c5cbff --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_operations_operations_async.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientOperationsOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_operations_list(self, resource_group): + response = self.client.operation_templates_client_operations.list() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations.py new file mode 100644 index 0000000000..e855d9ca68 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientOptionalBodyOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_optional_body_get(self, resource_group): + response = self.client.operation_templates_client_optional_body.get( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_optional_body_patch(self, resource_group): + response = self.client.operation_templates_client_optional_body.patch( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_optional_body_post(self, resource_group): + response = self.client.operation_templates_client_optional_body.post( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_operation_templates_client_optional_body_provider_post(self, resource_group): + response = self.client.operation_templates_client_optional_body.provider_post() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations_async.py new file mode 100644 index 0000000000..9e2b34996a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/generated_tests/test_operation_templates_operation_templates_client_optional_body_operations_async.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.operationtemplates.aio import OperationTemplatesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOperationTemplatesOperationTemplatesClientOptionalBodyOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(OperationTemplatesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_optional_body_get(self, resource_group): + response = await self.client.operation_templates_client_optional_body.get( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_optional_body_patch(self, resource_group): + response = await self.client.operation_templates_client_optional_body.patch( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_optional_body_post(self, resource_group): + response = await self.client.operation_templates_client_optional_body.post( + resource_group_name=resource_group.name, + widget_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_operation_templates_client_optional_body_provider_post(self, resource_group): + response = await self.client.operation_templates_client_optional_body.provider_post() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/apiview-properties.json b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/apiview-properties.json index fc73bd0556..7eca12ac1a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/apiview-properties.json @@ -22,57 +22,57 @@ "azure.resourcemanager.resources.models.TopLevelTrackedResourceProperties": "Azure.ResourceManager.Resources.TopLevelTrackedResourceProperties", "azure.resourcemanager.resources.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.resourcemanager.resources.models.ProvisioningState": "Azure.ResourceManager.Resources.ProvisioningState", - "azure.resourcemanager.resources.operations.TopLevelOperations.get": "Azure.ResourceManager.Resources.TopLevel.get", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.get": "Azure.ResourceManager.Resources.TopLevel.get", - "azure.resourcemanager.resources.operations.TopLevelOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.TopLevel.createOrReplace", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.TopLevel.createOrReplace", - "azure.resourcemanager.resources.operations.TopLevelOperations.begin_update": "Azure.ResourceManager.Resources.TopLevel.update", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.begin_update": "Azure.ResourceManager.Resources.TopLevel.update", - "azure.resourcemanager.resources.operations.TopLevelOperations.begin_delete": "Azure.ResourceManager.Resources.TopLevel.delete", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.begin_delete": "Azure.ResourceManager.Resources.TopLevel.delete", - "azure.resourcemanager.resources.operations.TopLevelOperations.list_by_resource_group": "Azure.ResourceManager.Resources.TopLevel.listByResourceGroup", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.list_by_resource_group": "Azure.ResourceManager.Resources.TopLevel.listByResourceGroup", - "azure.resourcemanager.resources.operations.TopLevelOperations.list_by_subscription": "Azure.ResourceManager.Resources.TopLevel.listBySubscription", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.list_by_subscription": "Azure.ResourceManager.Resources.TopLevel.listBySubscription", - "azure.resourcemanager.resources.operations.TopLevelOperations.action_sync": "Azure.ResourceManager.Resources.TopLevel.actionSync", - "azure.resourcemanager.resources.aio.operations.TopLevelOperations.action_sync": "Azure.ResourceManager.Resources.TopLevel.actionSync", - "azure.resourcemanager.resources.operations.NestedOperations.get": "Azure.ResourceManager.Resources.Nested.get", - "azure.resourcemanager.resources.aio.operations.NestedOperations.get": "Azure.ResourceManager.Resources.Nested.get", - "azure.resourcemanager.resources.operations.NestedOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.Nested.createOrReplace", - "azure.resourcemanager.resources.aio.operations.NestedOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.Nested.createOrReplace", - "azure.resourcemanager.resources.operations.NestedOperations.begin_update": "Azure.ResourceManager.Resources.Nested.update", - "azure.resourcemanager.resources.aio.operations.NestedOperations.begin_update": "Azure.ResourceManager.Resources.Nested.update", - "azure.resourcemanager.resources.operations.NestedOperations.begin_delete": "Azure.ResourceManager.Resources.Nested.delete", - "azure.resourcemanager.resources.aio.operations.NestedOperations.begin_delete": "Azure.ResourceManager.Resources.Nested.delete", - "azure.resourcemanager.resources.operations.NestedOperations.list_by_top_level_tracked_resource": "Azure.ResourceManager.Resources.Nested.listByTopLevelTrackedResource", - "azure.resourcemanager.resources.aio.operations.NestedOperations.list_by_top_level_tracked_resource": "Azure.ResourceManager.Resources.Nested.listByTopLevelTrackedResource", - "azure.resourcemanager.resources.operations.SingletonOperations.get_by_resource_group": "Azure.ResourceManager.Resources.Singleton.getByResourceGroup", - "azure.resourcemanager.resources.aio.operations.SingletonOperations.get_by_resource_group": "Azure.ResourceManager.Resources.Singleton.getByResourceGroup", - "azure.resourcemanager.resources.operations.SingletonOperations.begin_create_or_update": "Azure.ResourceManager.Resources.Singleton.createOrUpdate", - "azure.resourcemanager.resources.aio.operations.SingletonOperations.begin_create_or_update": "Azure.ResourceManager.Resources.Singleton.createOrUpdate", - "azure.resourcemanager.resources.operations.SingletonOperations.update": "Azure.ResourceManager.Resources.Singleton.update", - "azure.resourcemanager.resources.aio.operations.SingletonOperations.update": "Azure.ResourceManager.Resources.Singleton.update", - "azure.resourcemanager.resources.operations.SingletonOperations.list_by_resource_group": "Azure.ResourceManager.Resources.Singleton.listByResourceGroup", - "azure.resourcemanager.resources.aio.operations.SingletonOperations.list_by_resource_group": "Azure.ResourceManager.Resources.Singleton.listByResourceGroup", - "azure.resourcemanager.resources.operations.ExtensionsResourcesOperations.get": "Azure.ResourceManager.Resources.ExtensionsResources.get", - "azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations.get": "Azure.ResourceManager.Resources.ExtensionsResources.get", - "azure.resourcemanager.resources.operations.ExtensionsResourcesOperations.begin_create_or_update": "Azure.ResourceManager.Resources.ExtensionsResources.createOrUpdate", - "azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations.begin_create_or_update": "Azure.ResourceManager.Resources.ExtensionsResources.createOrUpdate", - "azure.resourcemanager.resources.operations.ExtensionsResourcesOperations.update": "Azure.ResourceManager.Resources.ExtensionsResources.update", - "azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations.update": "Azure.ResourceManager.Resources.ExtensionsResources.update", - "azure.resourcemanager.resources.operations.ExtensionsResourcesOperations.delete": "Azure.ResourceManager.Resources.ExtensionsResources.delete", - "azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations.delete": "Azure.ResourceManager.Resources.ExtensionsResources.delete", - "azure.resourcemanager.resources.operations.ExtensionsResourcesOperations.list_by_scope": "Azure.ResourceManager.Resources.ExtensionsResources.listByScope", - "azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations.list_by_scope": "Azure.ResourceManager.Resources.ExtensionsResources.listByScope", - "azure.resourcemanager.resources.operations.LocationResourcesOperations.get": "Azure.ResourceManager.Resources.LocationResources.get", - "azure.resourcemanager.resources.aio.operations.LocationResourcesOperations.get": "Azure.ResourceManager.Resources.LocationResources.get", - "azure.resourcemanager.resources.operations.LocationResourcesOperations.create_or_update": "Azure.ResourceManager.Resources.LocationResources.createOrUpdate", - "azure.resourcemanager.resources.aio.operations.LocationResourcesOperations.create_or_update": "Azure.ResourceManager.Resources.LocationResources.createOrUpdate", - "azure.resourcemanager.resources.operations.LocationResourcesOperations.update": "Azure.ResourceManager.Resources.LocationResources.update", - "azure.resourcemanager.resources.aio.operations.LocationResourcesOperations.update": "Azure.ResourceManager.Resources.LocationResources.update", - "azure.resourcemanager.resources.operations.LocationResourcesOperations.delete": "Azure.ResourceManager.Resources.LocationResources.delete", - "azure.resourcemanager.resources.aio.operations.LocationResourcesOperations.delete": "Azure.ResourceManager.Resources.LocationResources.delete", - "azure.resourcemanager.resources.operations.LocationResourcesOperations.list_by_location": "Azure.ResourceManager.Resources.LocationResources.listByLocation", - "azure.resourcemanager.resources.aio.operations.LocationResourcesOperations.list_by_location": "Azure.ResourceManager.Resources.LocationResources.listByLocation" + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.get": "Azure.ResourceManager.Resources.TopLevel.get", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.get": "Azure.ResourceManager.Resources.TopLevel.get", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.TopLevel.createOrReplace", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.TopLevel.createOrReplace", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.begin_update": "Azure.ResourceManager.Resources.TopLevel.update", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.begin_update": "Azure.ResourceManager.Resources.TopLevel.update", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.begin_delete": "Azure.ResourceManager.Resources.TopLevel.delete", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.begin_delete": "Azure.ResourceManager.Resources.TopLevel.delete", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.list_by_resource_group": "Azure.ResourceManager.Resources.TopLevel.listByResourceGroup", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.list_by_resource_group": "Azure.ResourceManager.Resources.TopLevel.listByResourceGroup", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.list_by_subscription": "Azure.ResourceManager.Resources.TopLevel.listBySubscription", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.list_by_subscription": "Azure.ResourceManager.Resources.TopLevel.listBySubscription", + "azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations.action_sync": "Azure.ResourceManager.Resources.TopLevel.actionSync", + "azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations.action_sync": "Azure.ResourceManager.Resources.TopLevel.actionSync", + "azure.resourcemanager.resources.operations.ResourcesClientNestedOperations.get": "Azure.ResourceManager.Resources.Nested.get", + "azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations.get": "Azure.ResourceManager.Resources.Nested.get", + "azure.resourcemanager.resources.operations.ResourcesClientNestedOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.Nested.createOrReplace", + "azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations.begin_create_or_replace": "Azure.ResourceManager.Resources.Nested.createOrReplace", + "azure.resourcemanager.resources.operations.ResourcesClientNestedOperations.begin_update": "Azure.ResourceManager.Resources.Nested.update", + "azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations.begin_update": "Azure.ResourceManager.Resources.Nested.update", + "azure.resourcemanager.resources.operations.ResourcesClientNestedOperations.begin_delete": "Azure.ResourceManager.Resources.Nested.delete", + "azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations.begin_delete": "Azure.ResourceManager.Resources.Nested.delete", + "azure.resourcemanager.resources.operations.ResourcesClientNestedOperations.list_by_top_level_tracked_resource": "Azure.ResourceManager.Resources.Nested.listByTopLevelTrackedResource", + "azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations.list_by_top_level_tracked_resource": "Azure.ResourceManager.Resources.Nested.listByTopLevelTrackedResource", + "azure.resourcemanager.resources.operations.ResourcesClientSingletonOperations.get_by_resource_group": "Azure.ResourceManager.Resources.Singleton.getByResourceGroup", + "azure.resourcemanager.resources.aio.operations.ResourcesClientSingletonOperations.get_by_resource_group": "Azure.ResourceManager.Resources.Singleton.getByResourceGroup", + "azure.resourcemanager.resources.operations.ResourcesClientSingletonOperations.begin_create_or_update": "Azure.ResourceManager.Resources.Singleton.createOrUpdate", + "azure.resourcemanager.resources.aio.operations.ResourcesClientSingletonOperations.begin_create_or_update": "Azure.ResourceManager.Resources.Singleton.createOrUpdate", + "azure.resourcemanager.resources.operations.ResourcesClientSingletonOperations.update": "Azure.ResourceManager.Resources.Singleton.update", + "azure.resourcemanager.resources.aio.operations.ResourcesClientSingletonOperations.update": "Azure.ResourceManager.Resources.Singleton.update", + "azure.resourcemanager.resources.operations.ResourcesClientSingletonOperations.list_by_resource_group": "Azure.ResourceManager.Resources.Singleton.listByResourceGroup", + "azure.resourcemanager.resources.aio.operations.ResourcesClientSingletonOperations.list_by_resource_group": "Azure.ResourceManager.Resources.Singleton.listByResourceGroup", + "azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations.get": "Azure.ResourceManager.Resources.ExtensionsResources.get", + "azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations.get": "Azure.ResourceManager.Resources.ExtensionsResources.get", + "azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations.begin_create_or_update": "Azure.ResourceManager.Resources.ExtensionsResources.createOrUpdate", + "azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations.begin_create_or_update": "Azure.ResourceManager.Resources.ExtensionsResources.createOrUpdate", + "azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations.update": "Azure.ResourceManager.Resources.ExtensionsResources.update", + "azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations.update": "Azure.ResourceManager.Resources.ExtensionsResources.update", + "azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations.delete": "Azure.ResourceManager.Resources.ExtensionsResources.delete", + "azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations.delete": "Azure.ResourceManager.Resources.ExtensionsResources.delete", + "azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations.list_by_scope": "Azure.ResourceManager.Resources.ExtensionsResources.listByScope", + "azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations.list_by_scope": "Azure.ResourceManager.Resources.ExtensionsResources.listByScope", + "azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations.get": "Azure.ResourceManager.Resources.LocationResources.get", + "azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations.get": "Azure.ResourceManager.Resources.LocationResources.get", + "azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations.create_or_update": "Azure.ResourceManager.Resources.LocationResources.createOrUpdate", + "azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations.create_or_update": "Azure.ResourceManager.Resources.LocationResources.createOrUpdate", + "azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations.update": "Azure.ResourceManager.Resources.LocationResources.update", + "azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations.update": "Azure.ResourceManager.Resources.LocationResources.update", + "azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations.delete": "Azure.ResourceManager.Resources.LocationResources.delete", + "azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations.delete": "Azure.ResourceManager.Resources.LocationResources.delete", + "azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations.list_by_location": "Azure.ResourceManager.Resources.LocationResources.listByLocation", + "azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations.list_by_location": "Azure.ResourceManager.Resources.LocationResources.listByLocation" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/_client.py index e21fc265cb..9d7da27a96 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/_client.py @@ -20,11 +20,11 @@ from ._configuration import ResourcesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - ExtensionsResourcesOperations, - LocationResourcesOperations, - NestedOperations, - SingletonOperations, - TopLevelOperations, + ResourcesClientExtensionsResourcesOperations, + ResourcesClientLocationResourcesOperations, + ResourcesClientNestedOperations, + ResourcesClientSingletonOperations, + ResourcesClientTopLevelOperations, ) if TYPE_CHECKING: @@ -35,18 +35,23 @@ class ResourcesClient: """Arm Resource Provider management API. - :ivar top_level: TopLevelOperations operations - :vartype top_level: azure.resourcemanager.resources.operations.TopLevelOperations - :ivar nested: NestedOperations operations - :vartype nested: azure.resourcemanager.resources.operations.NestedOperations - :ivar singleton: SingletonOperations operations - :vartype singleton: azure.resourcemanager.resources.operations.SingletonOperations - :ivar extensions_resources: ExtensionsResourcesOperations operations - :vartype extensions_resources: - azure.resourcemanager.resources.operations.ExtensionsResourcesOperations - :ivar location_resources: LocationResourcesOperations operations - :vartype location_resources: - azure.resourcemanager.resources.operations.LocationResourcesOperations + :ivar resources_client_top_level: ResourcesClientTopLevelOperations operations + :vartype resources_client_top_level: + azure.resourcemanager.resources.operations.ResourcesClientTopLevelOperations + :ivar resources_client_nested: ResourcesClientNestedOperations operations + :vartype resources_client_nested: + azure.resourcemanager.resources.operations.ResourcesClientNestedOperations + :ivar resources_client_singleton: ResourcesClientSingletonOperations operations + :vartype resources_client_singleton: + azure.resourcemanager.resources.operations.ResourcesClientSingletonOperations + :ivar resources_client_extensions_resources: ResourcesClientExtensionsResourcesOperations + operations + :vartype resources_client_extensions_resources: + azure.resourcemanager.resources.operations.ResourcesClientExtensionsResourcesOperations + :ivar resources_client_location_resources: ResourcesClientLocationResourcesOperations + operations + :vartype resources_client_location_resources: + azure.resourcemanager.resources.operations.ResourcesClientLocationResourcesOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -111,13 +116,19 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.top_level = TopLevelOperations(self._client, self._config, self._serialize, self._deserialize) - self.nested = NestedOperations(self._client, self._config, self._serialize, self._deserialize) - self.singleton = SingletonOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensions_resources = ExtensionsResourcesOperations( + self.resources_client_top_level = ResourcesClientTopLevelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.location_resources = LocationResourcesOperations( + self.resources_client_nested = ResourcesClientNestedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_singleton = ResourcesClientSingletonOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_extensions_resources = ResourcesClientExtensionsResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_location_resources = ResourcesClientLocationResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/_client.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/_client.py index 212b49745c..e94bca00f6 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/_client.py @@ -20,11 +20,11 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ResourcesClientConfiguration from .operations import ( - ExtensionsResourcesOperations, - LocationResourcesOperations, - NestedOperations, - SingletonOperations, - TopLevelOperations, + ResourcesClientExtensionsResourcesOperations, + ResourcesClientLocationResourcesOperations, + ResourcesClientNestedOperations, + ResourcesClientSingletonOperations, + ResourcesClientTopLevelOperations, ) if TYPE_CHECKING: @@ -35,18 +35,23 @@ class ResourcesClient: """Arm Resource Provider management API. - :ivar top_level: TopLevelOperations operations - :vartype top_level: azure.resourcemanager.resources.aio.operations.TopLevelOperations - :ivar nested: NestedOperations operations - :vartype nested: azure.resourcemanager.resources.aio.operations.NestedOperations - :ivar singleton: SingletonOperations operations - :vartype singleton: azure.resourcemanager.resources.aio.operations.SingletonOperations - :ivar extensions_resources: ExtensionsResourcesOperations operations - :vartype extensions_resources: - azure.resourcemanager.resources.aio.operations.ExtensionsResourcesOperations - :ivar location_resources: LocationResourcesOperations operations - :vartype location_resources: - azure.resourcemanager.resources.aio.operations.LocationResourcesOperations + :ivar resources_client_top_level: ResourcesClientTopLevelOperations operations + :vartype resources_client_top_level: + azure.resourcemanager.resources.aio.operations.ResourcesClientTopLevelOperations + :ivar resources_client_nested: ResourcesClientNestedOperations operations + :vartype resources_client_nested: + azure.resourcemanager.resources.aio.operations.ResourcesClientNestedOperations + :ivar resources_client_singleton: ResourcesClientSingletonOperations operations + :vartype resources_client_singleton: + azure.resourcemanager.resources.aio.operations.ResourcesClientSingletonOperations + :ivar resources_client_extensions_resources: ResourcesClientExtensionsResourcesOperations + operations + :vartype resources_client_extensions_resources: + azure.resourcemanager.resources.aio.operations.ResourcesClientExtensionsResourcesOperations + :ivar resources_client_location_resources: ResourcesClientLocationResourcesOperations + operations + :vartype resources_client_location_resources: + azure.resourcemanager.resources.aio.operations.ResourcesClientLocationResourcesOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -113,13 +118,19 @@ def __init__( self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.top_level = TopLevelOperations(self._client, self._config, self._serialize, self._deserialize) - self.nested = NestedOperations(self._client, self._config, self._serialize, self._deserialize) - self.singleton = SingletonOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensions_resources = ExtensionsResourcesOperations( + self.resources_client_top_level = ResourcesClientTopLevelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.location_resources = LocationResourcesOperations( + self.resources_client_nested = ResourcesClientNestedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_singleton = ResourcesClientSingletonOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_extensions_resources = ResourcesClientExtensionsResourcesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.resources_client_location_resources = ResourcesClientLocationResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/__init__.py index a727dcdb4f..86be32c1c7 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/__init__.py @@ -12,22 +12,22 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TopLevelOperations # type: ignore -from ._operations import NestedOperations # type: ignore -from ._operations import SingletonOperations # type: ignore -from ._operations import ExtensionsResourcesOperations # type: ignore -from ._operations import LocationResourcesOperations # type: ignore +from ._operations import ResourcesClientTopLevelOperations # type: ignore +from ._operations import ResourcesClientNestedOperations # type: ignore +from ._operations import ResourcesClientSingletonOperations # type: ignore +from ._operations import ResourcesClientExtensionsResourcesOperations # type: ignore +from ._operations import ResourcesClientLocationResourcesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TopLevelOperations", - "NestedOperations", - "SingletonOperations", - "ExtensionsResourcesOperations", - "LocationResourcesOperations", + "ResourcesClientTopLevelOperations", + "ResourcesClientNestedOperations", + "ResourcesClientSingletonOperations", + "ResourcesClientExtensionsResourcesOperations", + "ResourcesClientLocationResourcesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py index 10eb6524e9..5071e849c6 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py @@ -37,32 +37,32 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_extensions_resources_create_or_update_request, - build_extensions_resources_delete_request, - build_extensions_resources_get_request, - build_extensions_resources_list_by_scope_request, - build_extensions_resources_update_request, - build_location_resources_create_or_update_request, - build_location_resources_delete_request, - build_location_resources_get_request, - build_location_resources_list_by_location_request, - build_location_resources_update_request, - build_nested_create_or_replace_request, - build_nested_delete_request, - build_nested_get_request, - build_nested_list_by_top_level_tracked_resource_request, - build_nested_update_request, - build_singleton_create_or_update_request, - build_singleton_get_by_resource_group_request, - build_singleton_list_by_resource_group_request, - build_singleton_update_request, - build_top_level_action_sync_request, - build_top_level_create_or_replace_request, - build_top_level_delete_request, - build_top_level_get_request, - build_top_level_list_by_resource_group_request, - build_top_level_list_by_subscription_request, - build_top_level_update_request, + build_resources_client_extensions_resources_create_or_update_request, + build_resources_client_extensions_resources_delete_request, + build_resources_client_extensions_resources_get_request, + build_resources_client_extensions_resources_list_by_scope_request, + build_resources_client_extensions_resources_update_request, + build_resources_client_location_resources_create_or_update_request, + build_resources_client_location_resources_delete_request, + build_resources_client_location_resources_get_request, + build_resources_client_location_resources_list_by_location_request, + build_resources_client_location_resources_update_request, + build_resources_client_nested_create_or_replace_request, + build_resources_client_nested_delete_request, + build_resources_client_nested_get_request, + build_resources_client_nested_list_by_top_level_tracked_resource_request, + build_resources_client_nested_update_request, + build_resources_client_singleton_create_or_update_request, + build_resources_client_singleton_get_by_resource_group_request, + build_resources_client_singleton_list_by_resource_group_request, + build_resources_client_singleton_update_request, + build_resources_client_top_level_action_sync_request, + build_resources_client_top_level_create_or_replace_request, + build_resources_client_top_level_delete_request, + build_resources_client_top_level_get_request, + build_resources_client_top_level_list_by_resource_group_request, + build_resources_client_top_level_list_by_subscription_request, + build_resources_client_top_level_update_request, ) from .._configuration import ResourcesClientConfiguration @@ -71,14 +71,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class TopLevelOperations: +class ResourcesClientTopLevelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.aio.ResourcesClient`'s - :attr:`top_level` attribute. + :attr:`resources_client_top_level` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -116,7 +116,7 @@ async def get( cls: ClsType[_models.TopLevelTrackedResource] = kwargs.pop("cls", None) - _request = build_top_level_get_request( + _request = build_resources_client_top_level_get_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -187,7 +187,7 @@ async def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_create_or_replace_request( + _request = build_resources_client_top_level_create_or_replace_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -427,7 +427,7 @@ async def _update_initial( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_update_request( + _request = build_resources_client_top_level_update_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -653,7 +653,7 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_top_level_delete_request( + _request = build_resources_client_top_level_delete_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -786,7 +786,7 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - _request = build_top_level_list_by_resource_group_request( + _request = build_resources_client_top_level_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -875,7 +875,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.TopLeve def prepare_request(next_link=None): if not next_link: - _request = build_top_level_list_by_subscription_request( + _request = build_resources_client_top_level_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -1062,7 +1062,7 @@ async def action_sync( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_action_sync_request( + _request = build_resources_client_top_level_action_sync_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1096,14 +1096,14 @@ async def action_sync( return cls(pipeline_response, None, {}) # type: ignore -class NestedOperations: +class ResourcesClientNestedOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.aio.ResourcesClient`'s - :attr:`nested` attribute. + :attr:`resources_client_nested` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1147,7 +1147,7 @@ async def get( cls: ClsType[_models.NestedProxyResource] = kwargs.pop("cls", None) - _request = build_nested_get_request( + _request = build_resources_client_nested_get_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -1220,7 +1220,7 @@ async def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nested_create_or_replace_request( + _request = build_resources_client_nested_create_or_replace_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -1475,7 +1475,7 @@ async def _update_initial( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nested_update_request( + _request = build_resources_client_nested_update_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -1719,7 +1719,7 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_nested_delete_request( + _request = build_resources_client_nested_delete_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -1862,7 +1862,7 @@ def list_by_top_level_tracked_resource( def prepare_request(next_link=None): if not next_link: - _request = build_nested_list_by_top_level_tracked_resource_request( + _request = build_resources_client_nested_list_by_top_level_tracked_resource_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1928,14 +1928,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class SingletonOperations: +class ResourcesClientSingletonOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.aio.ResourcesClient`'s - :attr:`singleton` attribute. + :attr:`resources_client_singleton` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1970,7 +1970,7 @@ async def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) - cls: ClsType[_models.SingletonTrackedResource] = kwargs.pop("cls", None) - _request = build_singleton_get_by_resource_group_request( + _request = build_resources_client_singleton_get_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -2039,7 +2039,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_singleton_create_or_update_request( + _request = build_resources_client_singleton_create_or_update_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, content_type=content_type, @@ -2334,7 +2334,7 @@ async def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_singleton_update_request( + _request = build_resources_client_singleton_update_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, content_type=content_type, @@ -2408,7 +2408,7 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - _request = build_singleton_list_by_resource_group_request( + _request = build_resources_client_singleton_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -2473,14 +2473,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class ExtensionsResourcesOperations: +class ResourcesClientExtensionsResourcesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.aio.ResourcesClient`'s - :attr:`extensions_resources` attribute. + :attr:`resources_client_extensions_resources` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2516,7 +2516,7 @@ async def get(self, resource_uri: str, extensions_resource_name: str, **kwargs: cls: ClsType[_models.ExtensionsResource] = kwargs.pop("cls", None) - _request = build_extensions_resources_get_request( + _request = build_resources_client_extensions_resources_get_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, api_version=self._config.api_version, @@ -2586,7 +2586,7 @@ async def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensions_resources_create_or_update_request( + _request = build_resources_client_extensions_resources_create_or_update_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, content_type=content_type, @@ -2921,7 +2921,7 @@ async def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensions_resources_update_request( + _request = build_resources_client_extensions_resources_update_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, content_type=content_type, @@ -2991,7 +2991,7 @@ async def delete(self, resource_uri: str, extensions_resource_name: str, **kwarg cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_extensions_resources_delete_request( + _request = build_resources_client_extensions_resources_delete_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, api_version=self._config.api_version, @@ -3049,7 +3049,7 @@ def list_by_scope(self, resource_uri: str, **kwargs: Any) -> AsyncItemPaged["_mo def prepare_request(next_link=None): if not next_link: - _request = build_extensions_resources_list_by_scope_request( + _request = build_resources_client_extensions_resources_list_by_scope_request( resource_uri=resource_uri, api_version=self._config.api_version, headers=_headers, @@ -3113,14 +3113,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class LocationResourcesOperations: +class ResourcesClientLocationResourcesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.aio.ResourcesClient`'s - :attr:`location_resources` attribute. + :attr:`resources_client_location_resources` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3155,7 +3155,7 @@ async def get(self, location: str, location_resource_name: str, **kwargs: Any) - cls: ClsType[_models.LocationResource] = kwargs.pop("cls", None) - _request = build_location_resources_get_request( + _request = build_resources_client_location_resources_get_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -3318,7 +3318,7 @@ async def create_or_update( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_location_resources_create_or_update_request( + _request = build_resources_client_location_resources_create_or_update_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -3483,7 +3483,7 @@ async def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_location_resources_update_request( + _request = build_resources_client_location_resources_update_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -3553,7 +3553,7 @@ async def delete(self, location: str, location_resource_name: str, **kwargs: Any cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_location_resources_delete_request( + _request = build_resources_client_location_resources_delete_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -3611,7 +3611,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> AsyncItemPaged["_mod def prepare_request(next_link=None): if not next_link: - _request = build_location_resources_list_by_location_request( + _request = build_resources_client_location_resources_list_by_location_request( location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/__init__.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/__init__.py index a727dcdb4f..86be32c1c7 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/__init__.py @@ -12,22 +12,22 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import TopLevelOperations # type: ignore -from ._operations import NestedOperations # type: ignore -from ._operations import SingletonOperations # type: ignore -from ._operations import ExtensionsResourcesOperations # type: ignore -from ._operations import LocationResourcesOperations # type: ignore +from ._operations import ResourcesClientTopLevelOperations # type: ignore +from ._operations import ResourcesClientNestedOperations # type: ignore +from ._operations import ResourcesClientSingletonOperations # type: ignore +from ._operations import ResourcesClientExtensionsResourcesOperations # type: ignore +from ._operations import ResourcesClientLocationResourcesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "TopLevelOperations", - "NestedOperations", - "SingletonOperations", - "ExtensionsResourcesOperations", - "LocationResourcesOperations", + "ResourcesClientTopLevelOperations", + "ResourcesClientNestedOperations", + "ResourcesClientSingletonOperations", + "ResourcesClientExtensionsResourcesOperations", + "ResourcesClientLocationResourcesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py index 49ac4aa326..0cfc11a612 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py @@ -45,7 +45,7 @@ _SERIALIZER.client_side_validation = False -def build_top_level_get_request( +def build_resources_client_top_level_get_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -75,7 +75,7 @@ def build_top_level_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_top_level_create_or_replace_request( # pylint: disable=name-too-long +def build_resources_client_top_level_create_or_replace_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -108,7 +108,7 @@ def build_top_level_create_or_replace_request( # pylint: disable=name-too-long return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_top_level_update_request( +def build_resources_client_top_level_update_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -141,7 +141,7 @@ def build_top_level_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_top_level_delete_request( +def build_resources_client_top_level_delete_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -165,7 +165,7 @@ def build_top_level_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_top_level_list_by_resource_group_request( # pylint: disable=name-too-long +def build_resources_client_top_level_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -192,7 +192,7 @@ def build_top_level_list_by_resource_group_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_top_level_list_by_subscription_request( # pylint: disable=name-too-long +def build_resources_client_top_level_list_by_subscription_request( # pylint: disable=name-too-long subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -218,7 +218,7 @@ def build_top_level_list_by_subscription_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_top_level_action_sync_request( +def build_resources_client_top_level_action_sync_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -248,7 +248,7 @@ def build_top_level_action_sync_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_nested_get_request( +def build_resources_client_nested_get_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, nexted_proxy_resource_name: str, @@ -283,7 +283,7 @@ def build_nested_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_nested_create_or_replace_request( +def build_resources_client_nested_create_or_replace_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, nexted_proxy_resource_name: str, @@ -321,7 +321,7 @@ def build_nested_create_or_replace_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_nested_update_request( +def build_resources_client_nested_update_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, nexted_proxy_resource_name: str, @@ -359,7 +359,7 @@ def build_nested_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_nested_delete_request( +def build_resources_client_nested_delete_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, nexted_proxy_resource_name: str, @@ -388,7 +388,7 @@ def build_nested_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_nested_list_by_top_level_tracked_resource_request( # pylint: disable=name-too-long +def build_resources_client_nested_list_by_top_level_tracked_resource_request( # pylint: disable=name-too-long resource_group_name: str, top_level_tracked_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -418,7 +418,7 @@ def build_nested_list_by_top_level_tracked_resource_request( # pylint: disable= return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_singleton_get_by_resource_group_request( # pylint: disable=name-too-long +def build_resources_client_singleton_get_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -445,7 +445,7 @@ def build_singleton_get_by_resource_group_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_singleton_create_or_update_request( +def build_resources_client_singleton_create_or_update_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -475,7 +475,9 @@ def build_singleton_create_or_update_request( return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_singleton_update_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: +def build_resources_client_singleton_update_request( # pylint: disable=name-too-long + resource_group_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -503,7 +505,7 @@ def build_singleton_update_request(resource_group_name: str, subscription_id: st return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_singleton_list_by_resource_group_request( # pylint: disable=name-too-long +def build_resources_client_singleton_list_by_resource_group_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -530,7 +532,7 @@ def build_singleton_list_by_resource_group_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_extensions_resources_get_request( +def build_resources_client_extensions_resources_get_request( # pylint: disable=name-too-long resource_uri: str, extensions_resource_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -557,7 +559,7 @@ def build_extensions_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_extensions_resources_create_or_update_request( # pylint: disable=name-too-long +def build_resources_client_extensions_resources_create_or_update_request( # pylint: disable=name-too-long resource_uri: str, extensions_resource_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -587,7 +589,7 @@ def build_extensions_resources_create_or_update_request( # pylint: disable=name return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_extensions_resources_update_request( # pylint: disable=name-too-long +def build_resources_client_extensions_resources_update_request( # pylint: disable=name-too-long resource_uri: str, extensions_resource_name: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -617,7 +619,7 @@ def build_extensions_resources_update_request( # pylint: disable=name-too-long return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_extensions_resources_delete_request( # pylint: disable=name-too-long +def build_resources_client_extensions_resources_delete_request( # pylint: disable=name-too-long resource_uri: str, extensions_resource_name: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -638,7 +640,7 @@ def build_extensions_resources_delete_request( # pylint: disable=name-too-long return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_extensions_resources_list_by_scope_request( # pylint: disable=name-too-long +def build_resources_client_extensions_resources_list_by_scope_request( # pylint: disable=name-too-long resource_uri: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -664,7 +666,7 @@ def build_extensions_resources_list_by_scope_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_location_resources_get_request( +def build_resources_client_location_resources_get_request( # pylint: disable=name-too-long location: str, location_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -692,7 +694,7 @@ def build_location_resources_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_location_resources_create_or_update_request( # pylint: disable=name-too-long +def build_resources_client_location_resources_create_or_update_request( # pylint: disable=name-too-long location: str, location_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -723,7 +725,7 @@ def build_location_resources_create_or_update_request( # pylint: disable=name-t return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_location_resources_update_request( +def build_resources_client_location_resources_update_request( # pylint: disable=name-too-long location: str, location_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -754,7 +756,7 @@ def build_location_resources_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_location_resources_delete_request( +def build_resources_client_location_resources_delete_request( # pylint: disable=name-too-long location: str, location_resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -776,7 +778,7 @@ def build_location_resources_delete_request( return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_location_resources_list_by_location_request( # pylint: disable=name-too-long +def build_resources_client_location_resources_list_by_location_request( # pylint: disable=name-too-long location: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -803,14 +805,14 @@ def build_location_resources_list_by_location_request( # pylint: disable=name-t return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class TopLevelOperations: +class ResourcesClientTopLevelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.ResourcesClient`'s - :attr:`top_level` attribute. + :attr:`resources_client_top_level` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -848,7 +850,7 @@ def get( cls: ClsType[_models.TopLevelTrackedResource] = kwargs.pop("cls", None) - _request = build_top_level_get_request( + _request = build_resources_client_top_level_get_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -919,7 +921,7 @@ def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_create_or_replace_request( + _request = build_resources_client_top_level_create_or_replace_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1159,7 +1161,7 @@ def _update_initial( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_update_request( + _request = build_resources_client_top_level_update_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1385,7 +1387,7 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_top_level_delete_request( + _request = build_resources_client_top_level_delete_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1518,7 +1520,7 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - _request = build_top_level_list_by_resource_group_request( + _request = build_resources_client_top_level_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -1607,7 +1609,7 @@ def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.TopLevelTrac def prepare_request(next_link=None): if not next_link: - _request = build_top_level_list_by_subscription_request( + _request = build_resources_client_top_level_list_by_subscription_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -1794,7 +1796,7 @@ def action_sync( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_top_level_action_sync_request( + _request = build_resources_client_top_level_action_sync_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -1828,14 +1830,14 @@ def action_sync( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NestedOperations: +class ResourcesClientNestedOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.ResourcesClient`'s - :attr:`nested` attribute. + :attr:`resources_client_nested` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1879,7 +1881,7 @@ def get( cls: ClsType[_models.NestedProxyResource] = kwargs.pop("cls", None) - _request = build_nested_get_request( + _request = build_resources_client_nested_get_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -1952,7 +1954,7 @@ def _create_or_replace_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nested_create_or_replace_request( + _request = build_resources_client_nested_create_or_replace_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -2207,7 +2209,7 @@ def _update_initial( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nested_update_request( + _request = build_resources_client_nested_update_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -2451,7 +2453,7 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_nested_delete_request( + _request = build_resources_client_nested_delete_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, nexted_proxy_resource_name=nexted_proxy_resource_name, @@ -2594,7 +2596,7 @@ def list_by_top_level_tracked_resource( def prepare_request(next_link=None): if not next_link: - _request = build_nested_list_by_top_level_tracked_resource_request( + _request = build_resources_client_nested_list_by_top_level_tracked_resource_request( resource_group_name=resource_group_name, top_level_tracked_resource_name=top_level_tracked_resource_name, subscription_id=self._config.subscription_id, @@ -2660,14 +2662,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class SingletonOperations: +class ResourcesClientSingletonOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.ResourcesClient`'s - :attr:`singleton` attribute. + :attr:`resources_client_singleton` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2702,7 +2704,7 @@ def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mod cls: ClsType[_models.SingletonTrackedResource] = kwargs.pop("cls", None) - _request = build_singleton_get_by_resource_group_request( + _request = build_resources_client_singleton_get_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -2771,7 +2773,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_singleton_create_or_update_request( + _request = build_resources_client_singleton_create_or_update_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, content_type=content_type, @@ -3066,7 +3068,7 @@ def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_singleton_update_request( + _request = build_resources_client_singleton_update_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, content_type=content_type, @@ -3140,7 +3142,7 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - _request = build_singleton_list_by_resource_group_request( + _request = build_resources_client_singleton_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -3205,14 +3207,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class ExtensionsResourcesOperations: +class ResourcesClientExtensionsResourcesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.ResourcesClient`'s - :attr:`extensions_resources` attribute. + :attr:`resources_client_extensions_resources` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3248,7 +3250,7 @@ def get(self, resource_uri: str, extensions_resource_name: str, **kwargs: Any) - cls: ClsType[_models.ExtensionsResource] = kwargs.pop("cls", None) - _request = build_extensions_resources_get_request( + _request = build_resources_client_extensions_resources_get_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, api_version=self._config.api_version, @@ -3318,7 +3320,7 @@ def _create_or_update_initial( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensions_resources_create_or_update_request( + _request = build_resources_client_extensions_resources_create_or_update_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, content_type=content_type, @@ -3653,7 +3655,7 @@ def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensions_resources_update_request( + _request = build_resources_client_extensions_resources_update_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, content_type=content_type, @@ -3725,7 +3727,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_extensions_resources_delete_request( + _request = build_resources_client_extensions_resources_delete_request( resource_uri=resource_uri, extensions_resource_name=extensions_resource_name, api_version=self._config.api_version, @@ -3783,7 +3785,7 @@ def list_by_scope(self, resource_uri: str, **kwargs: Any) -> ItemPaged["_models. def prepare_request(next_link=None): if not next_link: - _request = build_extensions_resources_list_by_scope_request( + _request = build_resources_client_extensions_resources_list_by_scope_request( resource_uri=resource_uri, api_version=self._config.api_version, headers=_headers, @@ -3847,14 +3849,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class LocationResourcesOperations: +class ResourcesClientLocationResourcesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.resourcemanager.resources.ResourcesClient`'s - :attr:`location_resources` attribute. + :attr:`resources_client_location_resources` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3889,7 +3891,7 @@ def get(self, location: str, location_resource_name: str, **kwargs: Any) -> _mod cls: ClsType[_models.LocationResource] = kwargs.pop("cls", None) - _request = build_location_resources_get_request( + _request = build_resources_client_location_resources_get_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -4052,7 +4054,7 @@ def create_or_update( else: _content = json.dumps(resource, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_location_resources_create_or_update_request( + _request = build_resources_client_location_resources_create_or_update_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -4217,7 +4219,7 @@ def update( else: _content = json.dumps(properties, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_location_resources_update_request( + _request = build_resources_client_location_resources_update_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -4289,7 +4291,7 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_location_resources_delete_request( + _request = build_resources_client_location_resources_delete_request( location=location, location_resource_name=location_resource_name, subscription_id=self._config.subscription_id, @@ -4346,7 +4348,7 @@ def list_by_location(self, location: str, **kwargs: Any) -> ItemPaged["_models.L def prepare_request(next_link=None): if not next_link: - _request = build_location_resources_list_by_location_request( + _request = build_resources_client_location_resources_list_by_location_request( location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations.py new file mode 100644 index 0000000000..e30d0cf945 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientExtensionsResourcesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_extensions_resources_get(self, resource_group): + response = self.client.resources_client_extensions_resources.get( + resource_uri="str", + extensions_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_extensions_resources_begin_create_or_update(self, resource_group): + response = self.client.resources_client_extensions_resources.begin_create_or_update( + resource_uri="str", + extensions_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_extensions_resources_update(self, resource_group): + response = self.client.resources_client_extensions_resources.update( + resource_uri="str", + extensions_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_extensions_resources_delete(self, resource_group): + response = self.client.resources_client_extensions_resources.delete( + resource_uri="str", + extensions_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_extensions_resources_list_by_scope(self, resource_group): + response = self.client.resources_client_extensions_resources.list_by_scope( + resource_uri="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations_async.py new file mode 100644 index 0000000000..9f667d82f7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_extensions_resources_operations_async.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources.aio import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientExtensionsResourcesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_extensions_resources_get(self, resource_group): + response = await self.client.resources_client_extensions_resources.get( + resource_uri="str", + extensions_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_extensions_resources_begin_create_or_update(self, resource_group): + response = await ( + await self.client.resources_client_extensions_resources.begin_create_or_update( + resource_uri="str", + extensions_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_extensions_resources_update(self, resource_group): + response = await self.client.resources_client_extensions_resources.update( + resource_uri="str", + extensions_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_extensions_resources_delete(self, resource_group): + response = await self.client.resources_client_extensions_resources.delete( + resource_uri="str", + extensions_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_extensions_resources_list_by_scope(self, resource_group): + response = self.client.resources_client_extensions_resources.list_by_scope( + resource_uri="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations.py new file mode 100644 index 0000000000..8ae7fe5ee4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientLocationResourcesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_location_resources_get(self, resource_group): + response = self.client.resources_client_location_resources.get( + location="str", + location_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_location_resources_create_or_update(self, resource_group): + response = self.client.resources_client_location_resources.create_or_update( + location="str", + location_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_location_resources_update(self, resource_group): + response = self.client.resources_client_location_resources.update( + location="str", + location_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_location_resources_delete(self, resource_group): + response = self.client.resources_client_location_resources.delete( + location="str", + location_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_location_resources_list_by_location(self, resource_group): + response = self.client.resources_client_location_resources.list_by_location( + location="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations_async.py new file mode 100644 index 0000000000..ba35367021 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_location_resources_operations_async.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources.aio import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientLocationResourcesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_location_resources_get(self, resource_group): + response = await self.client.resources_client_location_resources.get( + location="str", + location_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_location_resources_create_or_update(self, resource_group): + response = await self.client.resources_client_location_resources.create_or_update( + location="str", + location_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_location_resources_update(self, resource_group): + response = await self.client.resources_client_location_resources.update( + location="str", + location_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_location_resources_delete(self, resource_group): + response = await self.client.resources_client_location_resources.delete( + location="str", + location_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_location_resources_list_by_location(self, resource_group): + response = self.client.resources_client_location_resources.list_by_location( + location="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations.py new file mode 100644 index 0000000000..7d2ab3bfd3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientNestedOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_nested_get(self, resource_group): + response = self.client.resources_client_nested.get( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_nested_begin_create_or_replace(self, resource_group): + response = self.client.resources_client_nested.begin_create_or_replace( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_nested_begin_update(self, resource_group): + response = self.client.resources_client_nested.begin_update( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_nested_begin_delete(self, resource_group): + response = self.client.resources_client_nested.begin_delete( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_nested_list_by_top_level_tracked_resource(self, resource_group): + response = self.client.resources_client_nested.list_by_top_level_tracked_resource( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations_async.py new file mode 100644 index 0000000000..c6abc4b887 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_nested_operations_async.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources.aio import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientNestedOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_nested_get(self, resource_group): + response = await self.client.resources_client_nested.get( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_nested_begin_create_or_replace(self, resource_group): + response = await ( + await self.client.resources_client_nested.begin_create_or_replace( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + resource={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_nested_begin_update(self, resource_group): + response = await ( + await self.client.resources_client_nested.begin_update( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + properties={ + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_nested_begin_delete(self, resource_group): + response = await ( + await self.client.resources_client_nested.begin_delete( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + nexted_proxy_resource_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_nested_list_by_top_level_tracked_resource(self, resource_group): + response = self.client.resources_client_nested.list_by_top_level_tracked_resource( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations.py new file mode 100644 index 0000000000..d9c02af847 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientSingletonOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_singleton_get_by_resource_group(self, resource_group): + response = self.client.resources_client_singleton.get_by_resource_group( + resource_group_name=resource_group.name, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_singleton_begin_create_or_update(self, resource_group): + response = self.client.resources_client_singleton.begin_create_or_update( + resource_group_name=resource_group.name, + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_singleton_update(self, resource_group): + response = self.client.resources_client_singleton.update( + resource_group_name=resource_group.name, + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_singleton_list_by_resource_group(self, resource_group): + response = self.client.resources_client_singleton.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations_async.py new file mode 100644 index 0000000000..2ec2679ef5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_singleton_operations_async.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources.aio import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientSingletonOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_singleton_get_by_resource_group(self, resource_group): + response = await self.client.resources_client_singleton.get_by_resource_group( + resource_group_name=resource_group.name, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_singleton_begin_create_or_update(self, resource_group): + response = await ( + await self.client.resources_client_singleton.begin_create_or_update( + resource_group_name=resource_group.name, + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_singleton_update(self, resource_group): + response = await self.client.resources_client_singleton.update( + resource_group_name=resource_group.name, + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_singleton_list_by_resource_group(self, resource_group): + response = self.client.resources_client_singleton.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations.py new file mode 100644 index 0000000000..6373bd1b17 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientTopLevelOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_get(self, resource_group): + response = self.client.resources_client_top_level.get( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_begin_create_or_replace(self, resource_group): + response = self.client.resources_client_top_level.begin_create_or_replace( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_begin_update(self, resource_group): + response = self.client.resources_client_top_level.begin_update( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_begin_delete(self, resource_group): + response = self.client.resources_client_top_level.begin_delete( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_list_by_resource_group(self, resource_group): + response = self.client.resources_client_top_level.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_list_by_subscription(self, resource_group): + response = self.client.resources_client_top_level.list_by_subscription() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_resources_client_top_level_action_sync(self, resource_group): + response = self.client.resources_client_top_level.action_sync( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + body={"message": "str", "urgent": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations_async.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations_async.py new file mode 100644 index 0000000000..680e3a4cd5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/generated_tests/test_resources_resources_client_top_level_operations_async.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.resourcemanager.resources.aio import ResourcesClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestResourcesResourcesClientTopLevelOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ResourcesClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_get(self, resource_group): + response = await self.client.resources_client_top_level.get( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_begin_create_or_replace(self, resource_group): + response = await ( + await self.client.resources_client_top_level.begin_create_or_replace( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + resource={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_begin_update(self, resource_group): + response = await ( + await self.client.resources_client_top_level.begin_update( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + properties={ + "location": "str", + "id": "str", + "name": "str", + "properties": {"description": "str", "provisioningState": "str"}, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_begin_delete(self, resource_group): + response = await ( + await self.client.resources_client_top_level.begin_delete( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + ) + ).result() # call '.result()' to poll until service return final result + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_list_by_resource_group(self, resource_group): + response = self.client.resources_client_top_level.list_by_resource_group( + resource_group_name=resource_group.name, + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_list_by_subscription(self, resource_group): + response = self.client.resources_client_top_level.list_by_subscription() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_resources_client_top_level_action_sync(self, resource_group): + response = await self.client.resources_client_top_level.action_sync( + resource_group_name=resource_group.name, + top_level_tracked_resource_name="str", + body={"message": "str", "urgent": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/apiview-properties.json index 541521c0c3..e75cecea0a 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/apiview-properties.json @@ -5,9 +5,9 @@ "client.naming.enumconflict.secondnamespace.models.SecondModel": "Client.Naming.EnumConflict.SecondNamespace.SecondModel", "client.naming.enumconflict.models.Status": "Client.Naming.EnumConflict.FirstNamespace.Status", "client.naming.enumconflict.models.SecondStatus": "Client.Naming.EnumConflict.SecondNamespace.Status", - "client.naming.enumconflict.operations.FirstOperationsOperations.first": "Client.Naming.EnumConflict.FirstOperations.first", - "client.naming.enumconflict.aio.operations.FirstOperationsOperations.first": "Client.Naming.EnumConflict.FirstOperations.first", - "client.naming.enumconflict.operations.SecondOperationsOperations.second": "Client.Naming.EnumConflict.SecondOperations.second", - "client.naming.enumconflict.aio.operations.SecondOperationsOperations.second": "Client.Naming.EnumConflict.SecondOperations.second" + "client.naming.enumconflict.operations.EnumConflictClientFirstOperationsOperations.first": "Client.Naming.EnumConflict.FirstOperations.first", + "client.naming.enumconflict.aio.operations.EnumConflictClientFirstOperationsOperations.first": "Client.Naming.EnumConflict.FirstOperations.first", + "client.naming.enumconflict.operations.EnumConflictClientSecondOperationsOperations.second": "Client.Naming.EnumConflict.SecondOperations.second", + "client.naming.enumconflict.aio.operations.EnumConflictClientSecondOperationsOperations.second": "Client.Naming.EnumConflict.SecondOperations.second" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/_client.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/_client.py index fc921cfc2d..ccda08daed 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/_client.py @@ -16,16 +16,20 @@ from ._configuration import EnumConflictClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import FirstOperationsOperations, SecondOperationsOperations +from .operations import EnumConflictClientFirstOperationsOperations, EnumConflictClientSecondOperationsOperations class EnumConflictClient: # pylint: disable=client-accepts-api-version-keyword """Test for enum with same name in different namespace. - :ivar first_operations: FirstOperationsOperations operations - :vartype first_operations: client.naming.enumconflict.operations.FirstOperationsOperations - :ivar second_operations: SecondOperationsOperations operations - :vartype second_operations: client.naming.enumconflict.operations.SecondOperationsOperations + :ivar enum_conflict_client_first_operations: EnumConflictClientFirstOperationsOperations + operations + :vartype enum_conflict_client_first_operations: + client.naming.enumconflict.operations.EnumConflictClientFirstOperationsOperations + :ivar enum_conflict_client_second_operations: EnumConflictClientSecondOperationsOperations + operations + :vartype enum_conflict_client_second_operations: + client.naming.enumconflict.operations.EnumConflictClientSecondOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,10 +62,10 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.first_operations = FirstOperationsOperations( + self.enum_conflict_client_first_operations = EnumConflictClientFirstOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.second_operations = SecondOperationsOperations( + self.enum_conflict_client_second_operations = EnumConflictClientSecondOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/_client.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/_client.py index 715c2a0120..4a4d7a5fe4 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/_client.py @@ -16,17 +16,20 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import EnumConflictClientConfiguration -from .operations import FirstOperationsOperations, SecondOperationsOperations +from .operations import EnumConflictClientFirstOperationsOperations, EnumConflictClientSecondOperationsOperations class EnumConflictClient: # pylint: disable=client-accepts-api-version-keyword """Test for enum with same name in different namespace. - :ivar first_operations: FirstOperationsOperations operations - :vartype first_operations: client.naming.enumconflict.aio.operations.FirstOperationsOperations - :ivar second_operations: SecondOperationsOperations operations - :vartype second_operations: - client.naming.enumconflict.aio.operations.SecondOperationsOperations + :ivar enum_conflict_client_first_operations: EnumConflictClientFirstOperationsOperations + operations + :vartype enum_conflict_client_first_operations: + client.naming.enumconflict.aio.operations.EnumConflictClientFirstOperationsOperations + :ivar enum_conflict_client_second_operations: EnumConflictClientSecondOperationsOperations + operations + :vartype enum_conflict_client_second_operations: + client.naming.enumconflict.aio.operations.EnumConflictClientSecondOperationsOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -59,10 +62,10 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.first_operations = FirstOperationsOperations( + self.enum_conflict_client_first_operations = EnumConflictClientFirstOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.second_operations = SecondOperationsOperations( + self.enum_conflict_client_second_operations = EnumConflictClientSecondOperationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/__init__.py index 57ad4d96df..9dc7e36ef9 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FirstOperationsOperations # type: ignore -from ._operations import SecondOperationsOperations # type: ignore +from ._operations import EnumConflictClientFirstOperationsOperations # type: ignore +from ._operations import EnumConflictClientSecondOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FirstOperationsOperations", - "SecondOperationsOperations", + "EnumConflictClientFirstOperationsOperations", + "EnumConflictClientSecondOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/_operations.py index 4f91089d5e..c5be4997a0 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/_operations.py @@ -29,7 +29,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...firstnamespace import models as _firstnamespace_models3 -from ...operations._operations import build_first_operations_first_request, build_second_operations_second_request +from ...operations._operations import ( + build_enum_conflict_client_first_operations_first_request, + build_enum_conflict_client_second_operations_second_request, +) from ...secondnamespace import models as _secondnamespace_models3 from .._configuration import EnumConflictClientConfiguration @@ -38,14 +41,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FirstOperationsOperations: +class EnumConflictClientFirstOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.enumconflict.aio.EnumConflictClient`'s - :attr:`first_operations` attribute. + :attr:`enum_conflict_client_first_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -136,7 +139,7 @@ async def first( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_first_operations_first_request( + _request = build_enum_conflict_client_first_operations_first_request( content_type=content_type, content=_content, headers=_headers, @@ -174,14 +177,14 @@ async def first( return deserialized # type: ignore -class SecondOperationsOperations: +class EnumConflictClientSecondOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.enumconflict.aio.EnumConflictClient`'s - :attr:`second_operations` attribute. + :attr:`enum_conflict_client_second_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -272,7 +275,7 @@ async def second( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_second_operations_second_request( + _request = build_enum_conflict_client_second_operations_second_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/__init__.py index 57ad4d96df..9dc7e36ef9 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FirstOperationsOperations # type: ignore -from ._operations import SecondOperationsOperations # type: ignore +from ._operations import EnumConflictClientFirstOperationsOperations # type: ignore +from ._operations import EnumConflictClientSecondOperationsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FirstOperationsOperations", - "SecondOperationsOperations", + "EnumConflictClientFirstOperationsOperations", + "EnumConflictClientSecondOperationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/_operations.py index 9d6f141ca2..7e88a2d982 100644 --- a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/operations/_operations.py @@ -40,7 +40,9 @@ _SERIALIZER.client_side_validation = False -def build_first_operations_first_request(**kwargs: Any) -> HttpRequest: +def build_enum_conflict_client_first_operations_first_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -57,7 +59,9 @@ def build_first_operations_first_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_second_operations_second_request(**kwargs: Any) -> HttpRequest: +def build_enum_conflict_client_second_operations_second_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -74,14 +78,14 @@ def build_second_operations_second_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FirstOperationsOperations: +class EnumConflictClientFirstOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.enumconflict.EnumConflictClient`'s - :attr:`first_operations` attribute. + :attr:`enum_conflict_client_first_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -172,7 +176,7 @@ def first( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_first_operations_first_request( + _request = build_enum_conflict_client_first_operations_first_request( content_type=content_type, content=_content, headers=_headers, @@ -210,14 +214,14 @@ def first( return deserialized # type: ignore -class SecondOperationsOperations: +class EnumConflictClientSecondOperationsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.enumconflict.EnumConflictClient`'s - :attr:`second_operations` attribute. + :attr:`enum_conflict_client_second_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -308,7 +312,7 @@ def second( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_second_operations_second_request( + _request = build_enum_conflict_client_second_operations_second_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations.py new file mode 100644 index 0000000000..921574de47 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import EnumConflictClientTestBase, EnumConflictPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestEnumConflictEnumConflictClientFirstOperationsOperations(EnumConflictClientTestBase): + @EnumConflictPreparer() + @recorded_by_proxy + def test_enum_conflict_client_first_operations_first(self, enumconflict_endpoint): + client = self.create_client(endpoint=enumconflict_endpoint) + response = client.enum_conflict_client_first_operations.first( + body={"name": "str", "status": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations_async.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations_async.py new file mode 100644 index 0000000000..cc98e4546e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_first_operations_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import EnumConflictPreparer +from testpreparer_async import EnumConflictClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestEnumConflictEnumConflictClientFirstOperationsOperationsAsync(EnumConflictClientTestBaseAsync): + @EnumConflictPreparer() + @recorded_by_proxy_async + async def test_enum_conflict_client_first_operations_first(self, enumconflict_endpoint): + client = self.create_async_client(endpoint=enumconflict_endpoint) + response = await client.enum_conflict_client_first_operations.first( + body={"name": "str", "status": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations.py new file mode 100644 index 0000000000..bcb36efdb3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import EnumConflictClientTestBase, EnumConflictPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestEnumConflictEnumConflictClientSecondOperationsOperations(EnumConflictClientTestBase): + @EnumConflictPreparer() + @recorded_by_proxy + def test_enum_conflict_client_second_operations_second(self, enumconflict_endpoint): + client = self.create_client(endpoint=enumconflict_endpoint) + response = client.enum_conflict_client_second_operations.second( + body={"description": "str", "status": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations_async.py b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations_async.py new file mode 100644 index 0000000000..ee6ad9ffc4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming-enum-conflict/generated_tests/test_enum_conflict_enum_conflict_client_second_operations_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import EnumConflictPreparer +from testpreparer_async import EnumConflictClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestEnumConflictEnumConflictClientSecondOperationsOperationsAsync(EnumConflictClientTestBaseAsync): + @EnumConflictPreparer() + @recorded_by_proxy_async + async def test_enum_conflict_client_second_operations_second(self, enumconflict_endpoint): + client = self.create_async_client(endpoint=enumconflict_endpoint) + response = await client.enum_conflict_client_second_operations.second( + body={"description": "str", "status": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-naming/apiview-properties.json index 4a001f09f5..2d0f21b870 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-naming/apiview-properties.json @@ -8,14 +8,14 @@ "client.naming.main.models.PythonModel": "Client.Naming.Model.ModelWithLanguageClientName", "client.naming.main.models.ClientExtensibleEnum": "Client.Naming.UnionEnum.ServerExtensibleEnum", "client.naming.main.models.ExtensibleEnum": "Client.Naming.UnionEnum.ExtensibleEnum", - "client.naming.main.operations.ModelClientOperations.client": "Client.Naming.Model.client", - "client.naming.main.aio.operations.ModelClientOperations.client": "Client.Naming.Model.client", - "client.naming.main.operations.ModelClientOperations.language": "Client.Naming.Model.language", - "client.naming.main.aio.operations.ModelClientOperations.language": "Client.Naming.Model.language", - "client.naming.main.operations.UnionEnumOperations.union_enum_name": "Client.Naming.UnionEnum.unionEnumName", - "client.naming.main.aio.operations.UnionEnumOperations.union_enum_name": "Client.Naming.UnionEnum.unionEnumName", - "client.naming.main.operations.UnionEnumOperations.union_enum_member_name": "Client.Naming.UnionEnum.unionEnumMemberName", - "client.naming.main.aio.operations.UnionEnumOperations.union_enum_member_name": "Client.Naming.UnionEnum.unionEnumMemberName", + "client.naming.main.operations.NamingClientModelClientOperations.client": "Client.Naming.Model.client", + "client.naming.main.aio.operations.NamingClientModelClientOperations.client": "Client.Naming.Model.client", + "client.naming.main.operations.NamingClientModelClientOperations.language": "Client.Naming.Model.language", + "client.naming.main.aio.operations.NamingClientModelClientOperations.language": "Client.Naming.Model.language", + "client.naming.main.operations.NamingClientUnionEnumOperations.union_enum_name": "Client.Naming.UnionEnum.unionEnumName", + "client.naming.main.aio.operations.NamingClientUnionEnumOperations.union_enum_name": "Client.Naming.UnionEnum.unionEnumName", + "client.naming.main.operations.NamingClientUnionEnumOperations.union_enum_member_name": "Client.Naming.UnionEnum.unionEnumMemberName", + "client.naming.main.aio.operations.NamingClientUnionEnumOperations.union_enum_member_name": "Client.Naming.UnionEnum.unionEnumMemberName", "client.naming.main.NamingClient.client_name": "Client.Naming.operation", "client.naming.main.aio.NamingClient.client_name": "Client.Naming.operation", "client.naming.main.NamingClient.parameter": "Client.Naming.parameter", diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/_client.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/_client.py index 3846034d81..986af5e8d8 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/_client.py @@ -16,16 +16,18 @@ from ._configuration import NamingClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ModelClientOperations, UnionEnumOperations, _NamingClientOperationsMixin +from .operations import NamingClientModelClientOperations, NamingClientUnionEnumOperations, _NamingClientOperationsMixin class NamingClient(_NamingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Describe changing names of types in a client with ``@clientName``. - :ivar model_client: ModelClientOperations operations - :vartype model_client: client.naming.main.operations.ModelClientOperations - :ivar union_enum: UnionEnumOperations operations - :vartype union_enum: client.naming.main.operations.UnionEnumOperations + :ivar naming_client_model_client: NamingClientModelClientOperations operations + :vartype naming_client_model_client: + client.naming.main.operations.NamingClientModelClientOperations + :ivar naming_client_union_enum: NamingClientUnionEnumOperations operations + :vartype naming_client_union_enum: + client.naming.main.operations.NamingClientUnionEnumOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model_client = ModelClientOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_enum = UnionEnumOperations(self._client, self._config, self._serialize, self._deserialize) + self.naming_client_model_client = NamingClientModelClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.naming_client_union_enum = NamingClientUnionEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/_client.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/_client.py index ff0b2ee0dc..3a89b929c9 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/_client.py @@ -16,16 +16,18 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NamingClientConfiguration -from .operations import ModelClientOperations, UnionEnumOperations, _NamingClientOperationsMixin +from .operations import NamingClientModelClientOperations, NamingClientUnionEnumOperations, _NamingClientOperationsMixin class NamingClient(_NamingClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Describe changing names of types in a client with ``@clientName``. - :ivar model_client: ModelClientOperations operations - :vartype model_client: client.naming.main.aio.operations.ModelClientOperations - :ivar union_enum: UnionEnumOperations operations - :vartype union_enum: client.naming.main.aio.operations.UnionEnumOperations + :ivar naming_client_model_client: NamingClientModelClientOperations operations + :vartype naming_client_model_client: + client.naming.main.aio.operations.NamingClientModelClientOperations + :ivar naming_client_union_enum: NamingClientUnionEnumOperations operations + :vartype naming_client_union_enum: + client.naming.main.aio.operations.NamingClientUnionEnumOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model_client = ModelClientOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_enum = UnionEnumOperations(self._client, self._config, self._serialize, self._deserialize) + self.naming_client_model_client = NamingClientModelClientOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.naming_client_union_enum = NamingClientUnionEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/__init__.py index 6ca21ae8c9..ec8342bd10 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/__init__.py @@ -12,8 +12,8 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelClientOperations # type: ignore -from ._operations import UnionEnumOperations # type: ignore +from ._operations import NamingClientModelClientOperations # type: ignore +from ._operations import NamingClientUnionEnumOperations # type: ignore from ._operations import _NamingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -21,8 +21,8 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelClientOperations", - "UnionEnumOperations", + "NamingClientModelClientOperations", + "NamingClientUnionEnumOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/_operations.py index 11a7b525bb..71214d751f 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/aio/operations/_operations.py @@ -30,17 +30,17 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( - build_model_client_client_request, - build_model_client_language_request, + build_naming_client_model_client_client_request, + build_naming_client_model_client_language_request, build_naming_client_name_request, build_naming_client_request, + build_naming_client_union_enum_union_enum_member_name_request, + build_naming_client_union_enum_union_enum_name_request, build_naming_compatible_with_encoded_name_request, build_naming_language_request, build_naming_parameter_request, build_naming_request_request, build_naming_response_request, - build_union_enum_union_enum_member_name_request, - build_union_enum_union_enum_name_request, ) from .._configuration import NamingClientConfiguration @@ -49,14 +49,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelClientOperations: +class NamingClientModelClientOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.main.aio.NamingClient`'s - :attr:`model_client` attribute. + :attr:`naming_client_model_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -139,7 +139,7 @@ async def client(self, body: Union[_models.ClientModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_client_client_request( + _request = build_naming_client_model_client_client_request( content_type=content_type, content=_content, headers=_headers, @@ -239,7 +239,7 @@ async def language(self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_client_language_request( + _request = build_naming_client_model_client_language_request( content_type=content_type, content=_content, headers=_headers, @@ -265,14 +265,14 @@ async def language(self, body: Union[_models.PythonModel, JSON, IO[bytes]], **kw return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumOperations: +class NamingClientUnionEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.main.aio.NamingClient`'s - :attr:`union_enum` attribute. + :attr:`naming_client_union_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -308,7 +308,7 @@ async def union_enum_name(self, body: Union[str, _models.ClientExtensibleEnum], _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_union_enum_name_request( + _request = build_naming_client_union_enum_union_enum_name_request( content_type=content_type, content=_content, headers=_headers, @@ -359,7 +359,7 @@ async def union_enum_member_name(self, body: Union[str, _models.ExtensibleEnum], _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_union_enum_member_name_request( + _request = build_naming_client_union_enum_union_enum_member_name_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/__init__.py index 6ca21ae8c9..ec8342bd10 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/__init__.py @@ -12,8 +12,8 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelClientOperations # type: ignore -from ._operations import UnionEnumOperations # type: ignore +from ._operations import NamingClientModelClientOperations # type: ignore +from ._operations import NamingClientUnionEnumOperations # type: ignore from ._operations import _NamingClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -21,8 +21,8 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelClientOperations", - "UnionEnumOperations", + "NamingClientModelClientOperations", + "NamingClientUnionEnumOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/_operations.py index ec9fce42e9..b9df21a2e3 100644 --- a/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-naming/client/naming/main/operations/_operations.py @@ -39,7 +39,7 @@ _SERIALIZER.client_side_validation = False -def build_model_client_client_request(**kwargs: Any) -> HttpRequest: +def build_naming_client_model_client_client_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -53,7 +53,7 @@ def build_model_client_client_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_client_language_request(**kwargs: Any) -> HttpRequest: +def build_naming_client_model_client_language_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -67,7 +67,9 @@ def build_model_client_language_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_union_enum_union_enum_name_request(**kwargs: Any) -> HttpRequest: +def build_naming_client_union_enum_union_enum_name_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -80,7 +82,9 @@ def build_union_enum_union_enum_name_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_union_enum_union_enum_member_name_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_naming_client_union_enum_union_enum_member_name_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -173,14 +177,14 @@ def build_naming_response_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, **kwargs) -class ModelClientOperations: +class NamingClientModelClientOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.main.NamingClient`'s - :attr:`model_client` attribute. + :attr:`naming_client_model_client` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -265,7 +269,7 @@ def client( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_client_client_request( + _request = build_naming_client_model_client_client_request( content_type=content_type, content=_content, headers=_headers, @@ -365,7 +369,7 @@ def language( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_client_language_request( + _request = build_naming_client_model_client_language_request( content_type=content_type, content=_content, headers=_headers, @@ -391,14 +395,14 @@ def language( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumOperations: +class NamingClientUnionEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.naming.main.NamingClient`'s - :attr:`union_enum` attribute. + :attr:`naming_client_union_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -436,7 +440,7 @@ def union_enum_name( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_union_enum_name_request( + _request = build_naming_client_union_enum_union_enum_name_request( content_type=content_type, content=_content, headers=_headers, @@ -489,7 +493,7 @@ def union_enum_member_name( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_union_enum_member_name_request( + _request = build_naming_client_union_enum_union_enum_member_name_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations.py b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations.py new file mode 100644 index 0000000000..e3ee3e0816 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NamingClientTestBase, NamingPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamingNamingClientModelClientOperations(NamingClientTestBase): + @NamingPreparer() + @recorded_by_proxy + def test_naming_client_model_client_client(self, naming_endpoint): + client = self.create_client(endpoint=naming_endpoint) + response = client.naming_client_model_client.client( + body={"defaultName": bool}, + ) + + # please add some check logic here by yourself + # ... + + @NamingPreparer() + @recorded_by_proxy + def test_naming_client_model_client_language(self, naming_endpoint): + client = self.create_client(endpoint=naming_endpoint) + response = client.naming_client_model_client.language( + body={"defaultName": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations_async.py b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations_async.py new file mode 100644 index 0000000000..f7e9f3fdad --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_model_client_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NamingPreparer +from testpreparer_async import NamingClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamingNamingClientModelClientOperationsAsync(NamingClientTestBaseAsync): + @NamingPreparer() + @recorded_by_proxy_async + async def test_naming_client_model_client_client(self, naming_endpoint): + client = self.create_async_client(endpoint=naming_endpoint) + response = await client.naming_client_model_client.client( + body={"defaultName": bool}, + ) + + # please add some check logic here by yourself + # ... + + @NamingPreparer() + @recorded_by_proxy_async + async def test_naming_client_model_client_language(self, naming_endpoint): + client = self.create_async_client(endpoint=naming_endpoint) + response = await client.naming_client_model_client.language( + body={"defaultName": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations.py b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations.py new file mode 100644 index 0000000000..fd57f3b7c9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NamingClientTestBase, NamingPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamingNamingClientUnionEnumOperations(NamingClientTestBase): + @NamingPreparer() + @recorded_by_proxy + def test_naming_client_union_enum_union_enum_name(self, naming_endpoint): + client = self.create_client(endpoint=naming_endpoint) + response = client.naming_client_union_enum.union_enum_name( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @NamingPreparer() + @recorded_by_proxy + def test_naming_client_union_enum_union_enum_member_name(self, naming_endpoint): + client = self.create_client(endpoint=naming_endpoint) + response = client.naming_client_union_enum.union_enum_member_name( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations_async.py b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations_async.py new file mode 100644 index 0000000000..7bb4915be0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-naming/generated_tests/test_naming_naming_client_union_enum_operations_async.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NamingPreparer +from testpreparer_async import NamingClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNamingNamingClientUnionEnumOperationsAsync(NamingClientTestBaseAsync): + @NamingPreparer() + @recorded_by_proxy_async + async def test_naming_client_union_enum_union_enum_name(self, naming_endpoint): + client = self.create_async_client(endpoint=naming_endpoint) + response = await client.naming_client_union_enum.union_enum_name( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @NamingPreparer() + @recorded_by_proxy_async + async def test_naming_client_union_enum_union_enum_member_name(self, naming_endpoint): + client = self.create_async_client(endpoint=naming_endpoint) + response = await client.naming_client_union_enum.union_enum_member_name( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/apiview-properties.json index d24f257b76..58edf2e842 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/apiview-properties.json @@ -2,16 +2,16 @@ "CrossLanguagePackageId": "Client.Structure.Service", "CrossLanguageDefinitionId": { "client.structure.clientoperationgroup.models.ClientType": "Client.Structure.Service.ClientType", - "client.structure.clientoperationgroup.operations.Group3Operations.two": "Client.Structure.ClientOperationGroup.Group3.two", - "client.structure.clientoperationgroup.aio.operations.Group3Operations.two": "Client.Structure.ClientOperationGroup.Group3.two", - "client.structure.clientoperationgroup.operations.Group3Operations.three": "Client.Structure.ClientOperationGroup.Group3.three", - "client.structure.clientoperationgroup.aio.operations.Group3Operations.three": "Client.Structure.ClientOperationGroup.Group3.three", - "client.structure.clientoperationgroup.operations.Group4Operations.four": "Client.Structure.ClientOperationGroup.Group4.four", - "client.structure.clientoperationgroup.aio.operations.Group4Operations.four": "Client.Structure.ClientOperationGroup.Group4.four", + "client.structure.clientoperationgroup.operations.FirstClientGroup3Operations.two": "Client.Structure.ClientOperationGroup.Group3.two", + "client.structure.clientoperationgroup.aio.operations.FirstClientGroup3Operations.two": "Client.Structure.ClientOperationGroup.Group3.two", + "client.structure.clientoperationgroup.operations.FirstClientGroup3Operations.three": "Client.Structure.ClientOperationGroup.Group3.three", + "client.structure.clientoperationgroup.aio.operations.FirstClientGroup3Operations.three": "Client.Structure.ClientOperationGroup.Group3.three", + "client.structure.clientoperationgroup.operations.FirstClientGroup4Operations.four": "Client.Structure.ClientOperationGroup.Group4.four", + "client.structure.clientoperationgroup.aio.operations.FirstClientGroup4Operations.four": "Client.Structure.ClientOperationGroup.Group4.four", "client.structure.clientoperationgroup.FirstClient.one": "Client.Structure.ClientOperationGroup.one", "client.structure.clientoperationgroup.aio.FirstClient.one": "Client.Structure.ClientOperationGroup.one", - "client.structure.clientoperationgroup.operations.Group5Operations.six": "Client.Structure.AnotherClientOperationGroup.Group5.six", - "client.structure.clientoperationgroup.aio.operations.Group5Operations.six": "Client.Structure.AnotherClientOperationGroup.Group5.six", + "client.structure.clientoperationgroup.operations.SecondClientGroup5Operations.six": "Client.Structure.AnotherClientOperationGroup.Group5.six", + "client.structure.clientoperationgroup.aio.operations.SecondClientGroup5Operations.six": "Client.Structure.AnotherClientOperationGroup.Group5.six", "client.structure.clientoperationgroup.SecondClient.five": "Client.Structure.AnotherClientOperationGroup.five", "client.structure.clientoperationgroup.aio.SecondClient.five": "Client.Structure.AnotherClientOperationGroup.five" } diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/_client.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/_client.py index aad355f1ae..aa6e5e4bec 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/_client.py @@ -18,9 +18,9 @@ from ._configuration import FirstClientConfiguration, SecondClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - Group3Operations, - Group4Operations, - Group5Operations, + FirstClientGroup3Operations, + FirstClientGroup4Operations, + SecondClientGroup5Operations, _FirstClientOperationsMixin, _SecondClientOperationsMixin, ) @@ -29,10 +29,12 @@ class FirstClient(_FirstClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """FirstClient. - :ivar group3: Group3Operations operations - :vartype group3: client.structure.clientoperationgroup.operations.Group3Operations - :ivar group4: Group4Operations operations - :vartype group4: client.structure.clientoperationgroup.operations.Group4Operations + :ivar first_client_group3: FirstClientGroup3Operations operations + :vartype first_client_group3: + client.structure.clientoperationgroup.operations.FirstClientGroup3Operations + :ivar first_client_group4: FirstClientGroup4Operations operations + :vartype first_client_group4: + client.structure.clientoperationgroup.operations.FirstClientGroup4Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -70,8 +72,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group3 = Group3Operations(self._client, self._config, self._serialize, self._deserialize) - self.group4 = Group4Operations(self._client, self._config, self._serialize, self._deserialize) + self.first_client_group3 = FirstClientGroup3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.first_client_group4 = FirstClientGroup4Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. @@ -114,8 +120,9 @@ def __exit__(self, *exc_details: Any) -> None: class SecondClient(_SecondClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """SecondClient. - :ivar group5: Group5Operations operations - :vartype group5: client.structure.clientoperationgroup.operations.Group5Operations + :ivar second_client_group5: SecondClientGroup5Operations operations + :vartype second_client_group5: + client.structure.clientoperationgroup.operations.SecondClientGroup5Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -153,7 +160,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group5 = Group5Operations(self._client, self._config, self._serialize, self._deserialize) + self.second_client_group5 = SecondClientGroup5Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/_client.py index 0639d17095..abebf45ff6 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/_client.py @@ -18,9 +18,9 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import FirstClientConfiguration, SecondClientConfiguration from .operations import ( - Group3Operations, - Group4Operations, - Group5Operations, + FirstClientGroup3Operations, + FirstClientGroup4Operations, + SecondClientGroup5Operations, _FirstClientOperationsMixin, _SecondClientOperationsMixin, ) @@ -29,10 +29,12 @@ class FirstClient(_FirstClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """FirstClient. - :ivar group3: Group3Operations operations - :vartype group3: client.structure.clientoperationgroup.aio.operations.Group3Operations - :ivar group4: Group4Operations operations - :vartype group4: client.structure.clientoperationgroup.aio.operations.Group4Operations + :ivar first_client_group3: FirstClientGroup3Operations operations + :vartype first_client_group3: + client.structure.clientoperationgroup.aio.operations.FirstClientGroup3Operations + :ivar first_client_group4: FirstClientGroup4Operations operations + :vartype first_client_group4: + client.structure.clientoperationgroup.aio.operations.FirstClientGroup4Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -70,8 +72,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group3 = Group3Operations(self._client, self._config, self._serialize, self._deserialize) - self.group4 = Group4Operations(self._client, self._config, self._serialize, self._deserialize) + self.first_client_group3 = FirstClientGroup3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.first_client_group4 = FirstClientGroup4Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any @@ -116,8 +122,9 @@ async def __aexit__(self, *exc_details: Any) -> None: class SecondClient(_SecondClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """SecondClient. - :ivar group5: Group5Operations operations - :vartype group5: client.structure.clientoperationgroup.aio.operations.Group5Operations + :ivar second_client_group5: SecondClientGroup5Operations operations + :vartype second_client_group5: + client.structure.clientoperationgroup.aio.operations.SecondClientGroup5Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -155,7 +162,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group5 = Group5Operations(self._client, self._config, self._serialize, self._deserialize) + self.second_client_group5 = SecondClientGroup5Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/__init__.py index 32c92a682b..6603b1268f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/__init__.py @@ -12,10 +12,10 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Group3Operations # type: ignore -from ._operations import Group4Operations # type: ignore +from ._operations import FirstClientGroup3Operations # type: ignore +from ._operations import FirstClientGroup4Operations # type: ignore from ._operations import _FirstClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._operations import Group5Operations # type: ignore +from ._operations import SecondClientGroup5Operations # type: ignore from ._operations import _SecondClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -23,9 +23,9 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Group3Operations", - "Group4Operations", - "Group5Operations", + "FirstClientGroup3Operations", + "FirstClientGroup4Operations", + "SecondClientGroup5Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/_operations.py index 0a47813c74..7b7e92da78 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/aio/operations/_operations.py @@ -25,11 +25,11 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( + build_first_client_group3_three_request, + build_first_client_group3_two_request, + build_first_client_group4_four_request, build_first_one_request, - build_group3_three_request, - build_group3_two_request, - build_group4_four_request, - build_group5_six_request, + build_second_client_group5_six_request, build_second_five_request, ) from .._configuration import FirstClientConfiguration, SecondClientConfiguration @@ -38,14 +38,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class Group3Operations: +class FirstClientGroup3Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.aio.FirstClient`'s - :attr:`group3` attribute. + :attr:`first_client_group3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def two(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group3_two_request( + _request = build_first_client_group3_two_request( headers=_headers, params=_params, ) @@ -121,7 +121,7 @@ async def three(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group3_three_request( + _request = build_first_client_group3_three_request( headers=_headers, params=_params, ) @@ -146,14 +146,14 @@ async def three(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Group4Operations: +class FirstClientGroup4Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.aio.FirstClient`'s - :attr:`group4` attribute. + :attr:`first_client_group4` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -184,7 +184,7 @@ async def four(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group4_four_request( + _request = build_first_client_group4_four_request( headers=_headers, params=_params, ) @@ -259,14 +259,14 @@ async def one(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Group5Operations: +class SecondClientGroup5Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.aio.SecondClient`'s - :attr:`group5` attribute. + :attr:`second_client_group5` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -297,7 +297,7 @@ async def six(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group5_six_request( + _request = build_second_client_group5_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/__init__.py index 32c92a682b..6603b1268f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/__init__.py @@ -12,10 +12,10 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Group3Operations # type: ignore -from ._operations import Group4Operations # type: ignore +from ._operations import FirstClientGroup3Operations # type: ignore +from ._operations import FirstClientGroup4Operations # type: ignore from ._operations import _FirstClientOperationsMixin # type: ignore # pylint: disable=unused-import -from ._operations import Group5Operations # type: ignore +from ._operations import SecondClientGroup5Operations # type: ignore from ._operations import _SecondClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -23,9 +23,9 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Group3Operations", - "Group4Operations", - "Group5Operations", + "FirstClientGroup3Operations", + "FirstClientGroup4Operations", + "SecondClientGroup5Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/_operations.py index 8bc7d34d98..f7ce7b0264 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/client/structure/clientoperationgroup/operations/_operations.py @@ -32,21 +32,21 @@ _SERIALIZER.client_side_validation = False -def build_group3_two_request(**kwargs: Any) -> HttpRequest: +def build_first_client_group3_two_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/two" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group3_three_request(**kwargs: Any) -> HttpRequest: +def build_first_client_group3_three_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/three" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group4_four_request(**kwargs: Any) -> HttpRequest: +def build_first_client_group4_four_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/four" @@ -60,7 +60,7 @@ def build_first_one_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, **kwargs) -def build_group5_six_request(**kwargs: Any) -> HttpRequest: +def build_second_client_group5_six_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/six" @@ -74,14 +74,14 @@ def build_second_five_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, **kwargs) -class Group3Operations: +class FirstClientGroup3Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.FirstClient`'s - :attr:`group3` attribute. + :attr:`first_client_group3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,7 +112,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group3_two_request( + _request = build_first_client_group3_two_request( headers=_headers, params=_params, ) @@ -157,7 +157,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group3_three_request( + _request = build_first_client_group3_three_request( headers=_headers, params=_params, ) @@ -182,14 +182,14 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore -class Group4Operations: +class FirstClientGroup4Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.FirstClient`'s - :attr:`group4` attribute. + :attr:`first_client_group4` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -220,7 +220,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group4_four_request( + _request = build_first_client_group4_four_request( headers=_headers, params=_params, ) @@ -293,14 +293,14 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore -class Group5Operations: +class SecondClientGroup5Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.clientoperationgroup.SecondClient`'s - :attr:`group5` attribute. + :attr:`second_client_group5` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -331,7 +331,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group5_six_request( + _request = build_second_client_group5_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations.py new file mode 100644 index 0000000000..3f67e119cb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import FirstClientTestBase, FirstPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFirstFirstClientGroup3Operations(FirstClientTestBase): + @FirstPreparer() + @recorded_by_proxy + def test_first_client_group3_two(self, first_endpoint): + client = self.create_client(endpoint=first_endpoint) + response = client.first_client_group3.two() + + # please add some check logic here by yourself + # ... + + @FirstPreparer() + @recorded_by_proxy + def test_first_client_group3_three(self, first_endpoint): + client = self.create_client(endpoint=first_endpoint) + response = client.first_client_group3.three() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations_async.py new file mode 100644 index 0000000000..944eeb2918 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group3_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import FirstPreparer +from testpreparer_async import FirstClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFirstFirstClientGroup3OperationsAsync(FirstClientTestBaseAsync): + @FirstPreparer() + @recorded_by_proxy_async + async def test_first_client_group3_two(self, first_endpoint): + client = self.create_async_client(endpoint=first_endpoint) + response = await client.first_client_group3.two() + + # please add some check logic here by yourself + # ... + + @FirstPreparer() + @recorded_by_proxy_async + async def test_first_client_group3_three(self, first_endpoint): + client = self.create_async_client(endpoint=first_endpoint) + response = await client.first_client_group3.three() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations.py new file mode 100644 index 0000000000..abd64e5a22 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import FirstClientTestBase, FirstPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFirstFirstClientGroup4Operations(FirstClientTestBase): + @FirstPreparer() + @recorded_by_proxy + def test_first_client_group4_four(self, first_endpoint): + client = self.create_client(endpoint=first_endpoint) + response = client.first_client_group4.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations_async.py new file mode 100644 index 0000000000..05f1327261 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_first_first_client_group4_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import FirstPreparer +from testpreparer_async import FirstClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFirstFirstClientGroup4OperationsAsync(FirstClientTestBaseAsync): + @FirstPreparer() + @recorded_by_proxy_async + async def test_first_client_group4_four(self, first_endpoint): + client = self.create_async_client(endpoint=first_endpoint) + response = await client.first_client_group4.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations.py new file mode 100644 index 0000000000..d61b0b62a1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SecondClientTestBase, SecondPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSecondSecondClientGroup5Operations(SecondClientTestBase): + @SecondPreparer() + @recorded_by_proxy + def test_second_client_group5_six(self, second_endpoint): + client = self.create_client(endpoint=second_endpoint) + response = client.second_client_group5.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations_async.py new file mode 100644 index 0000000000..cad03b4f22 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-clientoperationgroup/generated_tests/test_second_second_client_group5_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SecondPreparer +from testpreparer_async import SecondClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSecondSecondClientGroup5OperationsAsync(SecondClientTestBaseAsync): + @SecondPreparer() + @recorded_by_proxy_async + async def test_second_client_group5_six(self, second_endpoint): + client = self.create_async_client(endpoint=second_endpoint) + response = await client.second_client_group5.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-structure-default/apiview-properties.json index af49e04eab..5f4ca5ec04 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-structure-default/apiview-properties.json @@ -2,16 +2,16 @@ "CrossLanguagePackageId": "Client.Structure.Service", "CrossLanguageDefinitionId": { "client.structure.service.models.ClientType": "Client.Structure.Service.ClientType", - "client.structure.service.operations.QuxOperations.eight": "Client.Structure.Service.Qux.eight", - "client.structure.service.aio.operations.QuxOperations.eight": "Client.Structure.Service.Qux.eight", - "client.structure.service.operations.FooOperations.three": "Client.Structure.Service.Foo.three", - "client.structure.service.aio.operations.FooOperations.three": "Client.Structure.Service.Foo.three", - "client.structure.service.operations.FooOperations.four": "Client.Structure.Service.Foo.four", - "client.structure.service.aio.operations.FooOperations.four": "Client.Structure.Service.Foo.four", - "client.structure.service.operations.BarOperations.five": "Client.Structure.Service.Bar.five", - "client.structure.service.aio.operations.BarOperations.five": "Client.Structure.Service.Bar.five", - "client.structure.service.operations.BarOperations.six": "Client.Structure.Service.Bar.six", - "client.structure.service.aio.operations.BarOperations.six": "Client.Structure.Service.Bar.six", + "client.structure.service.operations.ServiceClientQuxOperations.eight": "Client.Structure.Service.Qux.eight", + "client.structure.service.aio.operations.ServiceClientQuxOperations.eight": "Client.Structure.Service.Qux.eight", + "client.structure.service.operations.ServiceClientFooOperations.three": "Client.Structure.Service.Foo.three", + "client.structure.service.aio.operations.ServiceClientFooOperations.three": "Client.Structure.Service.Foo.three", + "client.structure.service.operations.ServiceClientFooOperations.four": "Client.Structure.Service.Foo.four", + "client.structure.service.aio.operations.ServiceClientFooOperations.four": "Client.Structure.Service.Foo.four", + "client.structure.service.operations.ServiceClientBarOperations.five": "Client.Structure.Service.Bar.five", + "client.structure.service.aio.operations.ServiceClientBarOperations.five": "Client.Structure.Service.Bar.five", + "client.structure.service.operations.ServiceClientBarOperations.six": "Client.Structure.Service.Bar.six", + "client.structure.service.aio.operations.ServiceClientBarOperations.six": "Client.Structure.Service.Bar.six", "client.structure.service.ServiceClient.one": "Client.Structure.Service.one", "client.structure.service.aio.ServiceClient.one": "Client.Structure.Service.one", "client.structure.service.ServiceClient.two": "Client.Structure.Service.two", diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py index a657b69cc8..9e8d43920e 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/_client.py @@ -17,7 +17,13 @@ from . import models as _models from ._configuration import ServiceClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import BarOperations, BazOperations, FooOperations, QuxOperations, _ServiceClientOperationsMixin +from .operations import ( + ServiceClientBarOperations, + ServiceClientBazOperations, + ServiceClientFooOperations, + ServiceClientQuxOperations, + _ServiceClientOperationsMixin, +) class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword @@ -31,14 +37,14 @@ class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-ac 5. have two clients with operations come from different interfaces 6. have two clients with a hierarchy relation. - :ivar baz: BazOperations operations - :vartype baz: client.structure.service.operations.BazOperations - :ivar qux: QuxOperations operations - :vartype qux: client.structure.service.operations.QuxOperations - :ivar foo: FooOperations operations - :vartype foo: client.structure.service.operations.FooOperations - :ivar bar: BarOperations operations - :vartype bar: client.structure.service.operations.BarOperations + :ivar service_client_baz: ServiceClientBazOperations operations + :vartype service_client_baz: client.structure.service.operations.ServiceClientBazOperations + :ivar service_client_qux: ServiceClientQuxOperations operations + :vartype service_client_qux: client.structure.service.operations.ServiceClientQuxOperations + :ivar service_client_foo: ServiceClientFooOperations operations + :vartype service_client_foo: client.structure.service.operations.ServiceClientFooOperations + :ivar service_client_bar: ServiceClientBarOperations operations + :vartype service_client_bar: client.structure.service.operations.ServiceClientBarOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -76,10 +82,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.baz = BazOperations(self._client, self._config, self._serialize, self._deserialize) - self.qux = QuxOperations(self._client, self._config, self._serialize, self._deserialize) - self.foo = FooOperations(self._client, self._config, self._serialize, self._deserialize) - self.bar = BarOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_baz = ServiceClientBazOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_qux = ServiceClientQuxOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_foo = ServiceClientFooOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_bar = ServiceClientBarOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py index e2f0cca115..74ba482d23 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/_client.py @@ -17,7 +17,13 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import ServiceClientConfiguration -from .operations import BarOperations, BazOperations, FooOperations, QuxOperations, _ServiceClientOperationsMixin +from .operations import ( + ServiceClientBarOperations, + ServiceClientBazOperations, + ServiceClientFooOperations, + ServiceClientQuxOperations, + _ServiceClientOperationsMixin, +) class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword @@ -31,14 +37,14 @@ class ServiceClient(_ServiceClientOperationsMixin): # pylint: disable=client-ac 5. have two clients with operations come from different interfaces 6. have two clients with a hierarchy relation. - :ivar baz: BazOperations operations - :vartype baz: client.structure.service.aio.operations.BazOperations - :ivar qux: QuxOperations operations - :vartype qux: client.structure.service.aio.operations.QuxOperations - :ivar foo: FooOperations operations - :vartype foo: client.structure.service.aio.operations.FooOperations - :ivar bar: BarOperations operations - :vartype bar: client.structure.service.aio.operations.BarOperations + :ivar service_client_baz: ServiceClientBazOperations operations + :vartype service_client_baz: client.structure.service.aio.operations.ServiceClientBazOperations + :ivar service_client_qux: ServiceClientQuxOperations operations + :vartype service_client_qux: client.structure.service.aio.operations.ServiceClientQuxOperations + :ivar service_client_foo: ServiceClientFooOperations operations + :vartype service_client_foo: client.structure.service.aio.operations.ServiceClientFooOperations + :ivar service_client_bar: ServiceClientBarOperations operations + :vartype service_client_bar: client.structure.service.aio.operations.ServiceClientBarOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -76,10 +82,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.baz = BazOperations(self._client, self._config, self._serialize, self._deserialize) - self.qux = QuxOperations(self._client, self._config, self._serialize, self._deserialize) - self.foo = FooOperations(self._client, self._config, self._serialize, self._deserialize) - self.bar = BarOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_baz = ServiceClientBazOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_qux = ServiceClientQuxOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_foo = ServiceClientFooOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.service_client_bar = ServiceClientBarOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py index 855187853b..15efc9a67b 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/__init__.py @@ -12,10 +12,10 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BazOperations # type: ignore -from ._operations import QuxOperations # type: ignore -from ._operations import FooOperations # type: ignore -from ._operations import BarOperations # type: ignore +from ._operations import ServiceClientBazOperations # type: ignore +from ._operations import ServiceClientQuxOperations # type: ignore +from ._operations import ServiceClientFooOperations # type: ignore +from ._operations import ServiceClientBarOperations # type: ignore from ._operations import _ServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -23,10 +23,10 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BazOperations", - "QuxOperations", - "FooOperations", - "BarOperations", + "ServiceClientBazOperations", + "ServiceClientQuxOperations", + "ServiceClientFooOperations", + "ServiceClientBarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py index 03a2469bea..506049af89 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/aio/operations/_operations.py @@ -25,13 +25,13 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( - build_bar_five_request, - build_bar_six_request, - build_baz_foo_seven_request, - build_foo_four_request, - build_foo_three_request, - build_qux_bar_nine_request, - build_qux_eight_request, + build_service_client_bar_five_request, + build_service_client_bar_six_request, + build_service_client_baz_foo_seven_request, + build_service_client_foo_four_request, + build_service_client_foo_three_request, + build_service_client_qux_bar_nine_request, + build_service_client_qux_eight_request, build_service_one_request, build_service_two_request, ) @@ -41,14 +41,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BazOperations: +class ServiceClientBazOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`baz` attribute. + :attr:`service_client_baz` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -58,17 +58,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.foo = BazFooOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_baz_foo = ServiceClientBazFooOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class QuxOperations: +class ServiceClientQuxOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`qux` attribute. + :attr:`service_client_qux` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -78,7 +80,9 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.bar = QuxBarOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_qux_bar = ServiceClientQuxBarOperations( + self._client, self._config, self._serialize, self._deserialize + ) @distributed_trace_async async def eight(self, **kwargs: Any) -> None: @@ -101,7 +105,7 @@ async def eight(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_qux_eight_request( + _request = build_service_client_qux_eight_request( headers=_headers, params=_params, ) @@ -126,14 +130,14 @@ async def eight(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class FooOperations: +class ServiceClientFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`foo` attribute. + :attr:`service_client_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -164,7 +168,7 @@ async def three(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_three_request( + _request = build_service_client_foo_three_request( headers=_headers, params=_params, ) @@ -209,7 +213,7 @@ async def four(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_four_request( + _request = build_service_client_foo_four_request( headers=_headers, params=_params, ) @@ -234,14 +238,14 @@ async def four(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BarOperations: +class ServiceClientBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`bar` attribute. + :attr:`service_client_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -272,7 +276,7 @@ async def five(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_five_request( + _request = build_service_client_bar_five_request( headers=_headers, params=_params, ) @@ -317,7 +321,7 @@ async def six(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_six_request( + _request = build_service_client_bar_six_request( headers=_headers, params=_params, ) @@ -437,14 +441,14 @@ async def two(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BazFooOperations: +class ServiceClientBazFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`foo` attribute. + :attr:`service_client_baz_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -475,7 +479,7 @@ async def seven(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_baz_foo_seven_request( + _request = build_service_client_baz_foo_seven_request( headers=_headers, params=_params, ) @@ -500,14 +504,14 @@ async def seven(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class QuxBarOperations: +class ServiceClientQuxBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.aio.ServiceClient`'s - :attr:`bar` attribute. + :attr:`service_client_qux_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -538,7 +542,7 @@ async def nine(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_qux_bar_nine_request( + _request = build_service_client_qux_bar_nine_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py index 855187853b..15efc9a67b 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/__init__.py @@ -12,10 +12,10 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BazOperations # type: ignore -from ._operations import QuxOperations # type: ignore -from ._operations import FooOperations # type: ignore -from ._operations import BarOperations # type: ignore +from ._operations import ServiceClientBazOperations # type: ignore +from ._operations import ServiceClientQuxOperations # type: ignore +from ._operations import ServiceClientFooOperations # type: ignore +from ._operations import ServiceClientBarOperations # type: ignore from ._operations import _ServiceClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -23,10 +23,10 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BazOperations", - "QuxOperations", - "FooOperations", - "BarOperations", + "ServiceClientBazOperations", + "ServiceClientQuxOperations", + "ServiceClientFooOperations", + "ServiceClientBarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py index 0a47937473..53d7623cf7 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-default/client/structure/service/operations/_operations.py @@ -32,35 +32,35 @@ _SERIALIZER.client_side_validation = False -def build_qux_eight_request(**kwargs: Any) -> HttpRequest: +def build_service_client_qux_eight_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/eight" return HttpRequest(method="POST", url=_url, **kwargs) -def build_foo_three_request(**kwargs: Any) -> HttpRequest: +def build_service_client_foo_three_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/three" return HttpRequest(method="POST", url=_url, **kwargs) -def build_foo_four_request(**kwargs: Any) -> HttpRequest: +def build_service_client_foo_four_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/four" return HttpRequest(method="POST", url=_url, **kwargs) -def build_bar_five_request(**kwargs: Any) -> HttpRequest: +def build_service_client_bar_five_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/five" return HttpRequest(method="POST", url=_url, **kwargs) -def build_bar_six_request(**kwargs: Any) -> HttpRequest: +def build_service_client_bar_six_request(**kwargs: Any) -> HttpRequest: # Construct URL _url = "/six" @@ -81,28 +81,28 @@ def build_service_two_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, **kwargs) -def build_baz_foo_seven_request(**kwargs: Any) -> HttpRequest: +def build_service_client_baz_foo_seven_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/seven" return HttpRequest(method="POST", url=_url, **kwargs) -def build_qux_bar_nine_request(**kwargs: Any) -> HttpRequest: +def build_service_client_qux_bar_nine_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/nine" return HttpRequest(method="POST", url=_url, **kwargs) -class BazOperations: +class ServiceClientBazOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`baz` attribute. + :attr:`service_client_baz` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,17 +112,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.foo = BazFooOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_baz_foo = ServiceClientBazFooOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class QuxOperations: +class ServiceClientQuxOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`qux` attribute. + :attr:`service_client_qux` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -132,7 +134,9 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.bar = QuxBarOperations(self._client, self._config, self._serialize, self._deserialize) + self.service_client_qux_bar = ServiceClientQuxBarOperations( + self._client, self._config, self._serialize, self._deserialize + ) @distributed_trace def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements @@ -155,7 +159,7 @@ def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_qux_eight_request( + _request = build_service_client_qux_eight_request( headers=_headers, params=_params, ) @@ -180,14 +184,14 @@ def eight(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore -class FooOperations: +class ServiceClientFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`foo` attribute. + :attr:`service_client_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -218,7 +222,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_three_request( + _request = build_service_client_foo_three_request( headers=_headers, params=_params, ) @@ -263,7 +267,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_four_request( + _request = build_service_client_foo_four_request( headers=_headers, params=_params, ) @@ -288,14 +292,14 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore -class BarOperations: +class ServiceClientBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`bar` attribute. + :attr:`service_client_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -326,7 +330,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_five_request( + _request = build_service_client_bar_five_request( headers=_headers, params=_params, ) @@ -371,7 +375,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_six_request( + _request = build_service_client_bar_six_request( headers=_headers, params=_params, ) @@ -491,14 +495,14 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta return cls(pipeline_response, None, {}) # type: ignore -class BazFooOperations: +class ServiceClientBazFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`foo` attribute. + :attr:`service_client_baz_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -529,7 +533,7 @@ def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_baz_foo_seven_request( + _request = build_service_client_baz_foo_seven_request( headers=_headers, params=_params, ) @@ -554,14 +558,14 @@ def seven(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s return cls(pipeline_response, None, {}) # type: ignore -class QuxBarOperations: +class ServiceClientQuxBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.service.ServiceClient`'s - :attr:`bar` attribute. + :attr:`service_client_qux_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -592,7 +596,7 @@ def nine(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_qux_bar_nine_request( + _request = build_service_client_qux_bar_nine_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations.py new file mode 100644 index 0000000000..8fa248193a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ServiceClientTestBase, ServicePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientBarOperations(ServiceClientTestBase): + @ServicePreparer() + @recorded_by_proxy + def test_service_client_bar_five(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_bar.five() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy + def test_service_client_bar_six(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_bar.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations_async.py new file mode 100644 index 0000000000..0ef9b9b82f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_bar_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ServicePreparer +from testpreparer_async import ServiceClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientBarOperationsAsync(ServiceClientTestBaseAsync): + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_bar_five(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_bar.five() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_bar_six(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_bar.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations.py new file mode 100644 index 0000000000..0bef1d98f8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ServiceClientTestBase, ServicePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientBazOperations(ServiceClientTestBase): + @ServicePreparer() + @recorded_by_proxy + def test_service_client_baz_service_client_baz_foo_seven(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_baz.service_client_baz_foo.seven() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations_async.py new file mode 100644 index 0000000000..e52031f692 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_baz_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ServicePreparer +from testpreparer_async import ServiceClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientBazOperationsAsync(ServiceClientTestBaseAsync): + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_baz_service_client_baz_foo_seven(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_baz.service_client_baz_foo.seven() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations.py new file mode 100644 index 0000000000..375887438c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ServiceClientTestBase, ServicePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientFooOperations(ServiceClientTestBase): + @ServicePreparer() + @recorded_by_proxy + def test_service_client_foo_three(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_foo.three() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy + def test_service_client_foo_four(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_foo.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations_async.py new file mode 100644 index 0000000000..c192283b4e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_foo_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ServicePreparer +from testpreparer_async import ServiceClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientFooOperationsAsync(ServiceClientTestBaseAsync): + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_foo_three(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_foo.three() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_foo_four(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_foo.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations.py new file mode 100644 index 0000000000..ac6a040152 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ServiceClientTestBase, ServicePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientQuxOperations(ServiceClientTestBase): + @ServicePreparer() + @recorded_by_proxy + def test_service_client_qux_eight(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_qux.eight() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy + def test_service_client_qux_service_client_qux_bar_nine(self, service_endpoint): + client = self.create_client(endpoint=service_endpoint) + response = client.service_client_qux.service_client_qux_bar.nine() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations_async.py new file mode 100644 index 0000000000..d8c588eefe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-default/generated_tests/test_service_service_client_qux_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ServicePreparer +from testpreparer_async import ServiceClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestServiceServiceClientQuxOperationsAsync(ServiceClientTestBaseAsync): + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_qux_eight(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_qux.eight() + + # please add some check logic here by yourself + # ... + + @ServicePreparer() + @recorded_by_proxy_async + async def test_service_client_qux_service_client_qux_bar_nine(self, service_endpoint): + client = self.create_async_client(endpoint=service_endpoint) + response = await client.service_client_qux.service_client_qux_bar.nine() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/apiview-properties.json index 95abbd25d3..754c056006 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/apiview-properties.json @@ -2,12 +2,12 @@ "CrossLanguagePackageId": "Client.Structure.Service", "CrossLanguageDefinitionId": { "client.structure.renamedoperation.models.ClientType": "Client.Structure.Service.ClientType", - "client.structure.renamedoperation.operations.GroupOperations.renamed_two": "Client.Structure.RenamedOperation.Group.renamedTwo", - "client.structure.renamedoperation.aio.operations.GroupOperations.renamed_two": "Client.Structure.RenamedOperation.Group.renamedTwo", - "client.structure.renamedoperation.operations.GroupOperations.renamed_four": "Client.Structure.RenamedOperation.Group.renamedFour", - "client.structure.renamedoperation.aio.operations.GroupOperations.renamed_four": "Client.Structure.RenamedOperation.Group.renamedFour", - "client.structure.renamedoperation.operations.GroupOperations.renamed_six": "Client.Structure.RenamedOperation.Group.renamedSix", - "client.structure.renamedoperation.aio.operations.GroupOperations.renamed_six": "Client.Structure.RenamedOperation.Group.renamedSix", + "client.structure.renamedoperation.operations.RenamedOperationClientGroupOperations.renamed_two": "Client.Structure.RenamedOperation.Group.renamedTwo", + "client.structure.renamedoperation.aio.operations.RenamedOperationClientGroupOperations.renamed_two": "Client.Structure.RenamedOperation.Group.renamedTwo", + "client.structure.renamedoperation.operations.RenamedOperationClientGroupOperations.renamed_four": "Client.Structure.RenamedOperation.Group.renamedFour", + "client.structure.renamedoperation.aio.operations.RenamedOperationClientGroupOperations.renamed_four": "Client.Structure.RenamedOperation.Group.renamedFour", + "client.structure.renamedoperation.operations.RenamedOperationClientGroupOperations.renamed_six": "Client.Structure.RenamedOperation.Group.renamedSix", + "client.structure.renamedoperation.aio.operations.RenamedOperationClientGroupOperations.renamed_six": "Client.Structure.RenamedOperation.Group.renamedSix", "client.structure.renamedoperation.RenamedOperationClient.renamed_one": "Client.Structure.RenamedOperation.renamedOne", "client.structure.renamedoperation.aio.RenamedOperationClient.renamed_one": "Client.Structure.RenamedOperation.renamedOne", "client.structure.renamedoperation.RenamedOperationClient.renamed_three": "Client.Structure.RenamedOperation.renamedThree", diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py index e82ad01b4e..5830141ab2 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/_client.py @@ -17,7 +17,7 @@ from . import models as _models from ._configuration import RenamedOperationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import GroupOperations, _RenamedOperationClientOperationsMixin +from .operations import RenamedOperationClientGroupOperations, _RenamedOperationClientOperationsMixin class RenamedOperationClient( @@ -25,8 +25,9 @@ class RenamedOperationClient( ): # pylint: disable=client-accepts-api-version-keyword """RenamedOperationClient. - :ivar group: GroupOperations operations - :vartype group: client.structure.renamedoperation.operations.GroupOperations + :ivar renamed_operation_client_group: RenamedOperationClientGroupOperations operations + :vartype renamed_operation_client_group: + client.structure.renamedoperation.operations.RenamedOperationClientGroupOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -64,7 +65,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_operation_client_group = RenamedOperationClientGroupOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py index 3b0a7f3ffa..d39af4f6ea 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/_client.py @@ -17,7 +17,7 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedOperationClientConfiguration -from .operations import GroupOperations, _RenamedOperationClientOperationsMixin +from .operations import RenamedOperationClientGroupOperations, _RenamedOperationClientOperationsMixin class RenamedOperationClient( @@ -25,8 +25,9 @@ class RenamedOperationClient( ): # pylint: disable=client-accepts-api-version-keyword """RenamedOperationClient. - :ivar group: GroupOperations operations - :vartype group: client.structure.renamedoperation.aio.operations.GroupOperations + :ivar renamed_operation_client_group: RenamedOperationClientGroupOperations operations + :vartype renamed_operation_client_group: + client.structure.renamedoperation.aio.operations.RenamedOperationClientGroupOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -64,7 +65,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group = GroupOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_operation_client_group = RenamedOperationClientGroupOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py index 9453f942d5..bcc97fabb1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import GroupOperations # type: ignore +from ._operations import RenamedOperationClientGroupOperations # type: ignore from ._operations import _RenamedOperationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "GroupOperations", + "RenamedOperationClientGroupOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py index e34813b8a4..146e910031 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/aio/operations/_operations.py @@ -25,9 +25,9 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( - build_group_renamed_four_request, - build_group_renamed_six_request, - build_group_renamed_two_request, + build_renamed_operation_client_group_renamed_four_request, + build_renamed_operation_client_group_renamed_six_request, + build_renamed_operation_client_group_renamed_two_request, build_renamed_operation_renamed_five_request, build_renamed_operation_renamed_one_request, build_renamed_operation_renamed_three_request, @@ -38,14 +38,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class GroupOperations: +class RenamedOperationClientGroupOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.renamedoperation.aio.RenamedOperationClient`'s - :attr:`group` attribute. + :attr:`renamed_operation_client_group` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def renamed_two(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_two_request( + _request = build_renamed_operation_client_group_renamed_two_request( headers=_headers, params=_params, ) @@ -121,7 +121,7 @@ async def renamed_four(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_four_request( + _request = build_renamed_operation_client_group_renamed_four_request( headers=_headers, params=_params, ) @@ -166,7 +166,7 @@ async def renamed_six(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_six_request( + _request = build_renamed_operation_client_group_renamed_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py index 9453f942d5..bcc97fabb1 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import GroupOperations # type: ignore +from ._operations import RenamedOperationClientGroupOperations # type: ignore from ._operations import _RenamedOperationClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "GroupOperations", + "RenamedOperationClientGroupOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py index 9e7316fb7e..f8fc99e14f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/client/structure/renamedoperation/operations/_operations.py @@ -32,21 +32,27 @@ _SERIALIZER.client_side_validation = False -def build_group_renamed_two_request(**kwargs: Any) -> HttpRequest: +def build_renamed_operation_client_group_renamed_two_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/two" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group_renamed_four_request(**kwargs: Any) -> HttpRequest: +def build_renamed_operation_client_group_renamed_four_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/four" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group_renamed_six_request(**kwargs: Any) -> HttpRequest: +def build_renamed_operation_client_group_renamed_six_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/six" @@ -74,14 +80,14 @@ def build_renamed_operation_renamed_five_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, **kwargs) -class GroupOperations: +class RenamedOperationClientGroupOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.renamedoperation.RenamedOperationClient`'s - :attr:`group` attribute. + :attr:`renamed_operation_client_group` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,7 +118,7 @@ def renamed_two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_two_request( + _request = build_renamed_operation_client_group_renamed_two_request( headers=_headers, params=_params, ) @@ -157,7 +163,7 @@ def renamed_four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_four_request( + _request = build_renamed_operation_client_group_renamed_four_request( headers=_headers, params=_params, ) @@ -202,7 +208,7 @@ def renamed_six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group_renamed_six_request( + _request = build_renamed_operation_client_group_renamed_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations.py new file mode 100644 index 0000000000..afc6f3944d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RenamedOperationClientTestBase, RenamedOperationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRenamedOperationRenamedOperationClientGroupOperations(RenamedOperationClientTestBase): + @RenamedOperationPreparer() + @recorded_by_proxy + def test_renamed_operation_client_group_renamed_two(self, renamedoperation_endpoint): + client = self.create_client(endpoint=renamedoperation_endpoint) + response = client.renamed_operation_client_group.renamed_two() + + # please add some check logic here by yourself + # ... + + @RenamedOperationPreparer() + @recorded_by_proxy + def test_renamed_operation_client_group_renamed_four(self, renamedoperation_endpoint): + client = self.create_client(endpoint=renamedoperation_endpoint) + response = client.renamed_operation_client_group.renamed_four() + + # please add some check logic here by yourself + # ... + + @RenamedOperationPreparer() + @recorded_by_proxy + def test_renamed_operation_client_group_renamed_six(self, renamedoperation_endpoint): + client = self.create_client(endpoint=renamedoperation_endpoint) + response = client.renamed_operation_client_group.renamed_six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations_async.py new file mode 100644 index 0000000000..3463e478f8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-renamedoperation/generated_tests/test_renamed_operation_renamed_operation_client_group_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RenamedOperationPreparer +from testpreparer_async import RenamedOperationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRenamedOperationRenamedOperationClientGroupOperationsAsync(RenamedOperationClientTestBaseAsync): + @RenamedOperationPreparer() + @recorded_by_proxy_async + async def test_renamed_operation_client_group_renamed_two(self, renamedoperation_endpoint): + client = self.create_async_client(endpoint=renamedoperation_endpoint) + response = await client.renamed_operation_client_group.renamed_two() + + # please add some check logic here by yourself + # ... + + @RenamedOperationPreparer() + @recorded_by_proxy_async + async def test_renamed_operation_client_group_renamed_four(self, renamedoperation_endpoint): + client = self.create_async_client(endpoint=renamedoperation_endpoint) + response = await client.renamed_operation_client_group.renamed_four() + + # please add some check logic here by yourself + # ... + + @RenamedOperationPreparer() + @recorded_by_proxy_async + async def test_renamed_operation_client_group_renamed_six(self, renamedoperation_endpoint): + client = self.create_async_client(endpoint=renamedoperation_endpoint) + response = await client.renamed_operation_client_group.renamed_six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/apiview-properties.json b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/apiview-properties.json index c261544580..8271e260a4 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/apiview-properties.json @@ -2,17 +2,17 @@ "CrossLanguagePackageId": "Client.Structure.Service", "CrossLanguageDefinitionId": { "client.structure.twooperationgroup.models.ClientType": "Client.Structure.Service.ClientType", - "client.structure.twooperationgroup.operations.Group1Operations.one": "Client.Structure.TwoOperationGroup.Group1.one", - "client.structure.twooperationgroup.aio.operations.Group1Operations.one": "Client.Structure.TwoOperationGroup.Group1.one", - "client.structure.twooperationgroup.operations.Group1Operations.three": "Client.Structure.TwoOperationGroup.Group1.three", - "client.structure.twooperationgroup.aio.operations.Group1Operations.three": "Client.Structure.TwoOperationGroup.Group1.three", - "client.structure.twooperationgroup.operations.Group1Operations.four": "Client.Structure.TwoOperationGroup.Group1.four", - "client.structure.twooperationgroup.aio.operations.Group1Operations.four": "Client.Structure.TwoOperationGroup.Group1.four", - "client.structure.twooperationgroup.operations.Group2Operations.two": "Client.Structure.TwoOperationGroup.Group2.two", - "client.structure.twooperationgroup.aio.operations.Group2Operations.two": "Client.Structure.TwoOperationGroup.Group2.two", - "client.structure.twooperationgroup.operations.Group2Operations.five": "Client.Structure.TwoOperationGroup.Group2.five", - "client.structure.twooperationgroup.aio.operations.Group2Operations.five": "Client.Structure.TwoOperationGroup.Group2.five", - "client.structure.twooperationgroup.operations.Group2Operations.six": "Client.Structure.TwoOperationGroup.Group2.six", - "client.structure.twooperationgroup.aio.operations.Group2Operations.six": "Client.Structure.TwoOperationGroup.Group2.six" + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup1Operations.one": "Client.Structure.TwoOperationGroup.Group1.one", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup1Operations.one": "Client.Structure.TwoOperationGroup.Group1.one", + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup1Operations.three": "Client.Structure.TwoOperationGroup.Group1.three", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup1Operations.three": "Client.Structure.TwoOperationGroup.Group1.three", + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup1Operations.four": "Client.Structure.TwoOperationGroup.Group1.four", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup1Operations.four": "Client.Structure.TwoOperationGroup.Group1.four", + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup2Operations.two": "Client.Structure.TwoOperationGroup.Group2.two", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup2Operations.two": "Client.Structure.TwoOperationGroup.Group2.two", + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup2Operations.five": "Client.Structure.TwoOperationGroup.Group2.five", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup2Operations.five": "Client.Structure.TwoOperationGroup.Group2.five", + "client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup2Operations.six": "Client.Structure.TwoOperationGroup.Group2.six", + "client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup2Operations.six": "Client.Structure.TwoOperationGroup.Group2.six" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_client.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_client.py index 70e2eca45c..0c6195595e 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/_client.py @@ -17,16 +17,18 @@ from . import models as _models from ._configuration import TwoOperationGroupClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import Group1Operations, Group2Operations +from .operations import TwoOperationGroupClientGroup1Operations, TwoOperationGroupClientGroup2Operations class TwoOperationGroupClient: # pylint: disable=client-accepts-api-version-keyword """TwoOperationGroupClient. - :ivar group1: Group1Operations operations - :vartype group1: client.structure.twooperationgroup.operations.Group1Operations - :ivar group2: Group2Operations operations - :vartype group2: client.structure.twooperationgroup.operations.Group2Operations + :ivar two_operation_group_client_group1: TwoOperationGroupClientGroup1Operations operations + :vartype two_operation_group_client_group1: + client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup1Operations + :ivar two_operation_group_client_group2: TwoOperationGroupClientGroup2Operations operations + :vartype two_operation_group_client_group2: + client.structure.twooperationgroup.operations.TwoOperationGroupClientGroup2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -64,8 +66,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group1 = Group1Operations(self._client, self._config, self._serialize, self._deserialize) - self.group2 = Group2Operations(self._client, self._config, self._serialize, self._deserialize) + self.two_operation_group_client_group1 = TwoOperationGroupClientGroup1Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.two_operation_group_client_group2 = TwoOperationGroupClientGroup2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_client.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_client.py index cc483e5523..12e56e1d82 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/_client.py @@ -17,16 +17,18 @@ from .. import models as _models from .._utils.serialization import Deserializer, Serializer from ._configuration import TwoOperationGroupClientConfiguration -from .operations import Group1Operations, Group2Operations +from .operations import TwoOperationGroupClientGroup1Operations, TwoOperationGroupClientGroup2Operations class TwoOperationGroupClient: # pylint: disable=client-accepts-api-version-keyword """TwoOperationGroupClient. - :ivar group1: Group1Operations operations - :vartype group1: client.structure.twooperationgroup.aio.operations.Group1Operations - :ivar group2: Group2Operations operations - :vartype group2: client.structure.twooperationgroup.aio.operations.Group2Operations + :ivar two_operation_group_client_group1: TwoOperationGroupClientGroup1Operations operations + :vartype two_operation_group_client_group1: + client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup1Operations + :ivar two_operation_group_client_group2: TwoOperationGroupClientGroup2Operations operations + :vartype two_operation_group_client_group2: + client.structure.twooperationgroup.aio.operations.TwoOperationGroupClientGroup2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -64,8 +66,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.group1 = Group1Operations(self._client, self._config, self._serialize, self._deserialize) - self.group2 = Group2Operations(self._client, self._config, self._serialize, self._deserialize) + self.two_operation_group_client_group1 = TwoOperationGroupClientGroup1Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.two_operation_group_client_group2 = TwoOperationGroupClientGroup2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/__init__.py index fc4b79369f..4705b42b14 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Group1Operations # type: ignore -from ._operations import Group2Operations # type: ignore +from ._operations import TwoOperationGroupClientGroup1Operations # type: ignore +from ._operations import TwoOperationGroupClientGroup2Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Group1Operations", - "Group2Operations", + "TwoOperationGroupClientGroup1Operations", + "TwoOperationGroupClientGroup2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py index 8a570b30e6..168ff4fd99 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/aio/operations/_operations.py @@ -23,12 +23,12 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_group1_four_request, - build_group1_one_request, - build_group1_three_request, - build_group2_five_request, - build_group2_six_request, - build_group2_two_request, + build_two_operation_group_client_group1_four_request, + build_two_operation_group_client_group1_one_request, + build_two_operation_group_client_group1_three_request, + build_two_operation_group_client_group2_five_request, + build_two_operation_group_client_group2_six_request, + build_two_operation_group_client_group2_two_request, ) from .._configuration import TwoOperationGroupClientConfiguration @@ -36,14 +36,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class Group1Operations: +class TwoOperationGroupClientGroup1Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.twooperationgroup.aio.TwoOperationGroupClient`'s - :attr:`group1` attribute. + :attr:`two_operation_group_client_group1` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -74,7 +74,7 @@ async def one(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_one_request( + _request = build_two_operation_group_client_group1_one_request( headers=_headers, params=_params, ) @@ -119,7 +119,7 @@ async def three(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_three_request( + _request = build_two_operation_group_client_group1_three_request( headers=_headers, params=_params, ) @@ -164,7 +164,7 @@ async def four(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_four_request( + _request = build_two_operation_group_client_group1_four_request( headers=_headers, params=_params, ) @@ -189,14 +189,14 @@ async def four(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Group2Operations: +class TwoOperationGroupClientGroup2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.twooperationgroup.aio.TwoOperationGroupClient`'s - :attr:`group2` attribute. + :attr:`two_operation_group_client_group2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -227,7 +227,7 @@ async def two(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_two_request( + _request = build_two_operation_group_client_group2_two_request( headers=_headers, params=_params, ) @@ -272,7 +272,7 @@ async def five(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_five_request( + _request = build_two_operation_group_client_group2_five_request( headers=_headers, params=_params, ) @@ -317,7 +317,7 @@ async def six(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_six_request( + _request = build_two_operation_group_client_group2_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/__init__.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/__init__.py index fc4b79369f..4705b42b14 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Group1Operations # type: ignore -from ._operations import Group2Operations # type: ignore +from ._operations import TwoOperationGroupClientGroup1Operations # type: ignore +from ._operations import TwoOperationGroupClientGroup2Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Group1Operations", - "Group2Operations", + "TwoOperationGroupClientGroup1Operations", + "TwoOperationGroupClientGroup2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py index 22bd86a2b5..5b5323883f 100644 --- a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/client/structure/twooperationgroup/operations/_operations.py @@ -31,56 +31,58 @@ _SERIALIZER.client_side_validation = False -def build_group1_one_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group1_one_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/one" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group1_three_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group1_three_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/three" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group1_four_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group1_four_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/four" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group2_two_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group2_two_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/two" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group2_five_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group2_five_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/five" return HttpRequest(method="POST", url=_url, **kwargs) -def build_group2_six_request(**kwargs: Any) -> HttpRequest: +def build_two_operation_group_client_group2_six_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/six" return HttpRequest(method="POST", url=_url, **kwargs) -class Group1Operations: +class TwoOperationGroupClientGroup1Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.twooperationgroup.TwoOperationGroupClient`'s - :attr:`group1` attribute. + :attr:`two_operation_group_client_group1` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -111,7 +113,7 @@ def one(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_one_request( + _request = build_two_operation_group_client_group1_one_request( headers=_headers, params=_params, ) @@ -156,7 +158,7 @@ def three(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_three_request( + _request = build_two_operation_group_client_group1_three_request( headers=_headers, params=_params, ) @@ -201,7 +203,7 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group1_four_request( + _request = build_two_operation_group_client_group1_four_request( headers=_headers, params=_params, ) @@ -226,14 +228,14 @@ def four(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore -class Group2Operations: +class TwoOperationGroupClientGroup2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~client.structure.twooperationgroup.TwoOperationGroupClient`'s - :attr:`group2` attribute. + :attr:`two_operation_group_client_group2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -264,7 +266,7 @@ def two(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_two_request( + _request = build_two_operation_group_client_group2_two_request( headers=_headers, params=_params, ) @@ -309,7 +311,7 @@ def five(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_five_request( + _request = build_two_operation_group_client_group2_five_request( headers=_headers, params=_params, ) @@ -354,7 +356,7 @@ def six(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-sta cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_group2_six_request( + _request = build_two_operation_group_client_group2_six_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations.py new file mode 100644 index 0000000000..f5d2b869d7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import TwoOperationGroupClientTestBase, TwoOperationGroupPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTwoOperationGroupTwoOperationGroupClientGroup1Operations(TwoOperationGroupClientTestBase): + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group1_one(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group1.one() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group1_three(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group1.three() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group1_four(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group1.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations_async.py new file mode 100644 index 0000000000..e32fdcf787 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group1_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import TwoOperationGroupPreparer +from testpreparer_async import TwoOperationGroupClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTwoOperationGroupTwoOperationGroupClientGroup1OperationsAsync(TwoOperationGroupClientTestBaseAsync): + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group1_one(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group1.one() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group1_three(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group1.three() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group1_four(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group1.four() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations.py new file mode 100644 index 0000000000..624e160639 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import TwoOperationGroupClientTestBase, TwoOperationGroupPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTwoOperationGroupTwoOperationGroupClientGroup2Operations(TwoOperationGroupClientTestBase): + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group2_two(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group2.two() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group2_five(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group2.five() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy + def test_two_operation_group_client_group2_six(self, twooperationgroup_endpoint): + client = self.create_client(endpoint=twooperationgroup_endpoint) + response = client.two_operation_group_client_group2.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations_async.py b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations_async.py new file mode 100644 index 0000000000..6a6fb1ba08 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/client-structure-twooperationgroup/generated_tests/test_two_operation_group_two_operation_group_client_group2_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import TwoOperationGroupPreparer +from testpreparer_async import TwoOperationGroupClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestTwoOperationGroupTwoOperationGroupClientGroup2OperationsAsync(TwoOperationGroupClientTestBaseAsync): + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group2_two(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group2.two() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group2_five(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group2.five() + + # please add some check logic here by yourself + # ... + + @TwoOperationGroupPreparer() + @recorded_by_proxy_async + async def test_two_operation_group_client_group2_six(self, twooperationgroup_endpoint): + client = self.create_async_client(endpoint=twooperationgroup_endpoint) + response = await client.two_operation_group_client_group2.six() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-array/apiview-properties.json b/packages/typespec-python/test/azure/generated/encode-array/apiview-properties.json index de0fda0f6d..42bdc48988 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/encode-array/apiview-properties.json @@ -15,29 +15,29 @@ "encode.array.models.SpaceDelimitedExtensibleEnumArrayProperty": "Encode.Array.SpaceDelimitedExtensibleEnumArrayProperty", "encode.array.models.Colors": "Encode.Array.Colors", "encode.array.models.ColorsExtensibleEnum": "Encode.Array.ColorsExtensibleEnum", - "encode.array.operations.PropertyOperations.comma_delimited": "Encode.Array.Property.commaDelimited", - "encode.array.aio.operations.PropertyOperations.comma_delimited": "Encode.Array.Property.commaDelimited", - "encode.array.operations.PropertyOperations.space_delimited": "Encode.Array.Property.spaceDelimited", - "encode.array.aio.operations.PropertyOperations.space_delimited": "Encode.Array.Property.spaceDelimited", - "encode.array.operations.PropertyOperations.pipe_delimited": "Encode.Array.Property.pipeDelimited", - "encode.array.aio.operations.PropertyOperations.pipe_delimited": "Encode.Array.Property.pipeDelimited", - "encode.array.operations.PropertyOperations.newline_delimited": "Encode.Array.Property.newlineDelimited", - "encode.array.aio.operations.PropertyOperations.newline_delimited": "Encode.Array.Property.newlineDelimited", - "encode.array.operations.PropertyOperations.enum_comma_delimited": "Encode.Array.Property.enumCommaDelimited", - "encode.array.aio.operations.PropertyOperations.enum_comma_delimited": "Encode.Array.Property.enumCommaDelimited", - "encode.array.operations.PropertyOperations.enum_space_delimited": "Encode.Array.Property.enumSpaceDelimited", - "encode.array.aio.operations.PropertyOperations.enum_space_delimited": "Encode.Array.Property.enumSpaceDelimited", - "encode.array.operations.PropertyOperations.enum_pipe_delimited": "Encode.Array.Property.enumPipeDelimited", - "encode.array.aio.operations.PropertyOperations.enum_pipe_delimited": "Encode.Array.Property.enumPipeDelimited", - "encode.array.operations.PropertyOperations.enum_newline_delimited": "Encode.Array.Property.enumNewlineDelimited", - "encode.array.aio.operations.PropertyOperations.enum_newline_delimited": "Encode.Array.Property.enumNewlineDelimited", - "encode.array.operations.PropertyOperations.extensible_enum_comma_delimited": "Encode.Array.Property.extensibleEnumCommaDelimited", - "encode.array.aio.operations.PropertyOperations.extensible_enum_comma_delimited": "Encode.Array.Property.extensibleEnumCommaDelimited", - "encode.array.operations.PropertyOperations.extensible_enum_space_delimited": "Encode.Array.Property.extensibleEnumSpaceDelimited", - "encode.array.aio.operations.PropertyOperations.extensible_enum_space_delimited": "Encode.Array.Property.extensibleEnumSpaceDelimited", - "encode.array.operations.PropertyOperations.extensible_enum_pipe_delimited": "Encode.Array.Property.extensibleEnumPipeDelimited", - "encode.array.aio.operations.PropertyOperations.extensible_enum_pipe_delimited": "Encode.Array.Property.extensibleEnumPipeDelimited", - "encode.array.operations.PropertyOperations.extensible_enum_newline_delimited": "Encode.Array.Property.extensibleEnumNewlineDelimited", - "encode.array.aio.operations.PropertyOperations.extensible_enum_newline_delimited": "Encode.Array.Property.extensibleEnumNewlineDelimited" + "encode.array.operations.ArrayClientPropertyOperations.comma_delimited": "Encode.Array.Property.commaDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.comma_delimited": "Encode.Array.Property.commaDelimited", + "encode.array.operations.ArrayClientPropertyOperations.space_delimited": "Encode.Array.Property.spaceDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.space_delimited": "Encode.Array.Property.spaceDelimited", + "encode.array.operations.ArrayClientPropertyOperations.pipe_delimited": "Encode.Array.Property.pipeDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.pipe_delimited": "Encode.Array.Property.pipeDelimited", + "encode.array.operations.ArrayClientPropertyOperations.newline_delimited": "Encode.Array.Property.newlineDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.newline_delimited": "Encode.Array.Property.newlineDelimited", + "encode.array.operations.ArrayClientPropertyOperations.enum_comma_delimited": "Encode.Array.Property.enumCommaDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.enum_comma_delimited": "Encode.Array.Property.enumCommaDelimited", + "encode.array.operations.ArrayClientPropertyOperations.enum_space_delimited": "Encode.Array.Property.enumSpaceDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.enum_space_delimited": "Encode.Array.Property.enumSpaceDelimited", + "encode.array.operations.ArrayClientPropertyOperations.enum_pipe_delimited": "Encode.Array.Property.enumPipeDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.enum_pipe_delimited": "Encode.Array.Property.enumPipeDelimited", + "encode.array.operations.ArrayClientPropertyOperations.enum_newline_delimited": "Encode.Array.Property.enumNewlineDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.enum_newline_delimited": "Encode.Array.Property.enumNewlineDelimited", + "encode.array.operations.ArrayClientPropertyOperations.extensible_enum_comma_delimited": "Encode.Array.Property.extensibleEnumCommaDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.extensible_enum_comma_delimited": "Encode.Array.Property.extensibleEnumCommaDelimited", + "encode.array.operations.ArrayClientPropertyOperations.extensible_enum_space_delimited": "Encode.Array.Property.extensibleEnumSpaceDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.extensible_enum_space_delimited": "Encode.Array.Property.extensibleEnumSpaceDelimited", + "encode.array.operations.ArrayClientPropertyOperations.extensible_enum_pipe_delimited": "Encode.Array.Property.extensibleEnumPipeDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.extensible_enum_pipe_delimited": "Encode.Array.Property.extensibleEnumPipeDelimited", + "encode.array.operations.ArrayClientPropertyOperations.extensible_enum_newline_delimited": "Encode.Array.Property.extensibleEnumNewlineDelimited", + "encode.array.aio.operations.ArrayClientPropertyOperations.extensible_enum_newline_delimited": "Encode.Array.Property.extensibleEnumNewlineDelimited" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/_client.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/_client.py index 67be983dad..efd64f5afb 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/_client.py @@ -16,14 +16,14 @@ from ._configuration import ArrayClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .property.operations import PropertyOperations +from .property.operations import ArrayClientPropertyOperations class ArrayClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on array. - :ivar property: PropertyOperations operations - :vartype property: encode.array.operations.PropertyOperations + :ivar array_client_property: ArrayClientPropertyOperations operations + :vartype array_client_property: encode.array.operations.ArrayClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.array_client_property = ArrayClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/aio/_client.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/aio/_client.py index daefc42540..4c7674db39 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/aio/_client.py @@ -15,15 +15,15 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..property.aio.operations import PropertyOperations +from ..property.aio.operations import ArrayClientPropertyOperations from ._configuration import ArrayClientConfiguration class ArrayClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on array. - :ivar property: PropertyOperations operations - :vartype property: encode.array.aio.operations.PropertyOperations + :ivar array_client_property: ArrayClientPropertyOperations operations + :vartype array_client_property: encode.array.aio.operations.ArrayClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.array_client_property = ArrayClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/__init__.py index 22f1107401..07c1aae116 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import ArrayClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "ArrayClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/_operations.py index 85536486b7..210c5813ac 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/aio/operations/_operations.py @@ -32,18 +32,18 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import ArrayClientConfiguration from ...operations._operations import ( - build_property_comma_delimited_request, - build_property_enum_comma_delimited_request, - build_property_enum_newline_delimited_request, - build_property_enum_pipe_delimited_request, - build_property_enum_space_delimited_request, - build_property_extensible_enum_comma_delimited_request, - build_property_extensible_enum_newline_delimited_request, - build_property_extensible_enum_pipe_delimited_request, - build_property_extensible_enum_space_delimited_request, - build_property_newline_delimited_request, - build_property_pipe_delimited_request, - build_property_space_delimited_request, + build_array_client_property_comma_delimited_request, + build_array_client_property_enum_comma_delimited_request, + build_array_client_property_enum_newline_delimited_request, + build_array_client_property_enum_pipe_delimited_request, + build_array_client_property_enum_space_delimited_request, + build_array_client_property_extensible_enum_comma_delimited_request, + build_array_client_property_extensible_enum_newline_delimited_request, + build_array_client_property_extensible_enum_pipe_delimited_request, + build_array_client_property_extensible_enum_space_delimited_request, + build_array_client_property_newline_delimited_request, + build_array_client_property_pipe_delimited_request, + build_array_client_property_space_delimited_request, ) JSON = MutableMapping[str, Any] @@ -51,14 +51,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class ArrayClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.array.aio.ArrayClient`'s - :attr:`property` attribute. + :attr:`array_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -154,7 +154,7 @@ async def comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_comma_delimited_request( + _request = build_array_client_property_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -277,7 +277,7 @@ async def space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_space_delimited_request( + _request = build_array_client_property_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -400,7 +400,7 @@ async def pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_pipe_delimited_request( + _request = build_array_client_property_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -523,7 +523,7 @@ async def newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_newline_delimited_request( + _request = build_array_client_property_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -646,7 +646,7 @@ async def enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_comma_delimited_request( + _request = build_array_client_property_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -769,7 +769,7 @@ async def enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_space_delimited_request( + _request = build_array_client_property_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -892,7 +892,7 @@ async def enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_pipe_delimited_request( + _request = build_array_client_property_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1015,7 +1015,7 @@ async def enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_newline_delimited_request( + _request = build_array_client_property_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1142,7 +1142,7 @@ async def extensible_enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_comma_delimited_request( + _request = build_array_client_property_extensible_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1269,7 +1269,7 @@ async def extensible_enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_space_delimited_request( + _request = build_array_client_property_extensible_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1396,7 +1396,7 @@ async def extensible_enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_pipe_delimited_request( + _request = build_array_client_property_extensible_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1524,7 +1524,7 @@ async def extensible_enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_newline_delimited_request( + _request = build_array_client_property_extensible_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/__init__.py index 22f1107401..07c1aae116 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import ArrayClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "ArrayClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/_operations.py index b3d7b4d15f..42207829d8 100644 --- a/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-array/encode/array/property/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -57,7 +57,7 @@ def build_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_space_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_space_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -74,7 +74,7 @@ def build_property_space_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -91,7 +91,9 @@ def build_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_newline_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_newline_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -108,7 +110,9 @@ def build_property_newline_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_comma_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_comma_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -125,7 +129,9 @@ def build_property_enum_comma_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_space_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_space_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -142,7 +148,9 @@ def build_property_enum_space_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_pipe_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -159,7 +167,9 @@ def build_property_enum_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_newline_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_newline_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -176,7 +186,7 @@ def build_property_enum_newline_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_comma_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_comma_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -195,7 +205,7 @@ def build_property_extensible_enum_comma_delimited_request( # pylint: disable=n return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_space_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_space_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -214,7 +224,7 @@ def build_property_extensible_enum_space_delimited_request( # pylint: disable=n return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_pipe_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_pipe_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -233,7 +243,7 @@ def build_property_extensible_enum_pipe_delimited_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_newline_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_newline_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -252,14 +262,14 @@ def build_property_extensible_enum_newline_delimited_request( # pylint: disable return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class ArrayClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.array.ArrayClient`'s - :attr:`property` attribute. + :attr:`array_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -355,7 +365,7 @@ def comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_comma_delimited_request( + _request = build_array_client_property_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -478,7 +488,7 @@ def space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_space_delimited_request( + _request = build_array_client_property_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -601,7 +611,7 @@ def pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_pipe_delimited_request( + _request = build_array_client_property_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -724,7 +734,7 @@ def newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_newline_delimited_request( + _request = build_array_client_property_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -847,7 +857,7 @@ def enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_comma_delimited_request( + _request = build_array_client_property_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -970,7 +980,7 @@ def enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_space_delimited_request( + _request = build_array_client_property_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1093,7 +1103,7 @@ def enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_pipe_delimited_request( + _request = build_array_client_property_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1216,7 +1226,7 @@ def enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_newline_delimited_request( + _request = build_array_client_property_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1343,7 +1353,7 @@ def extensible_enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_comma_delimited_request( + _request = build_array_client_property_extensible_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1470,7 +1480,7 @@ def extensible_enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_space_delimited_request( + _request = build_array_client_property_extensible_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1597,7 +1607,7 @@ def extensible_enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_pipe_delimited_request( + _request = build_array_client_property_extensible_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1725,7 +1735,7 @@ def extensible_enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_newline_delimited_request( + _request = build_array_client_property_extensible_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations.py b/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations.py new file mode 100644 index 0000000000..3ea6f50e34 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations.py @@ -0,0 +1,145 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientPropertyOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_comma_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_space_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_pipe_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_newline_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_enum_comma_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.enum_comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_enum_space_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.enum_space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_enum_pipe_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.enum_pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_enum_newline_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.enum_newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_extensible_enum_comma_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.extensible_enum_comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_extensible_enum_space_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.extensible_enum_space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_extensible_enum_pipe_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.extensible_enum_pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_property_extensible_enum_newline_delimited(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_property.extensible_enum_newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations_async.py new file mode 100644 index 0000000000..7d0b5a977a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-array/generated_tests/test_array_array_client_property_operations_async.py @@ -0,0 +1,146 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientPropertyOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_comma_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_space_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_pipe_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_newline_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_enum_comma_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.enum_comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_enum_space_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.enum_space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_enum_pipe_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.enum_pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_enum_newline_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.enum_newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_extensible_enum_comma_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.extensible_enum_comma_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_extensible_enum_space_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.extensible_enum_space_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_extensible_enum_pipe_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.extensible_enum_pipe_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_property_extensible_enum_newline_delimited(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_property.extensible_enum_newline_delimited( + body={"value": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/apiview-properties.json b/packages/typespec-python/test/azure/generated/encode-bytes/apiview-properties.json index c5a77761fd..2043566cc7 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/encode-bytes/apiview-properties.json @@ -5,49 +5,49 @@ "encode.bytes.models.Base64urlArrayBytesProperty": "Encode.Bytes.Base64urlArrayBytesProperty", "encode.bytes.models.Base64urlBytesProperty": "Encode.Bytes.Base64urlBytesProperty", "encode.bytes.models.DefaultBytesProperty": "Encode.Bytes.DefaultBytesProperty", - "encode.bytes.operations.QueryOperations.default": "Encode.Bytes.Query.default", - "encode.bytes.aio.operations.QueryOperations.default": "Encode.Bytes.Query.default", - "encode.bytes.operations.QueryOperations.base64": "Encode.Bytes.Query.base64", - "encode.bytes.aio.operations.QueryOperations.base64": "Encode.Bytes.Query.base64", - "encode.bytes.operations.QueryOperations.base64_url": "Encode.Bytes.Query.base64url", - "encode.bytes.aio.operations.QueryOperations.base64_url": "Encode.Bytes.Query.base64url", - "encode.bytes.operations.QueryOperations.base64_url_array": "Encode.Bytes.Query.base64urlArray", - "encode.bytes.aio.operations.QueryOperations.base64_url_array": "Encode.Bytes.Query.base64urlArray", - "encode.bytes.operations.PropertyOperations.default": "Encode.Bytes.Property.default", - "encode.bytes.aio.operations.PropertyOperations.default": "Encode.Bytes.Property.default", - "encode.bytes.operations.PropertyOperations.base64": "Encode.Bytes.Property.base64", - "encode.bytes.aio.operations.PropertyOperations.base64": "Encode.Bytes.Property.base64", - "encode.bytes.operations.PropertyOperations.base64_url": "Encode.Bytes.Property.base64url", - "encode.bytes.aio.operations.PropertyOperations.base64_url": "Encode.Bytes.Property.base64url", - "encode.bytes.operations.PropertyOperations.base64_url_array": "Encode.Bytes.Property.base64urlArray", - "encode.bytes.aio.operations.PropertyOperations.base64_url_array": "Encode.Bytes.Property.base64urlArray", - "encode.bytes.operations.HeaderOperations.default": "Encode.Bytes.Header.default", - "encode.bytes.aio.operations.HeaderOperations.default": "Encode.Bytes.Header.default", - "encode.bytes.operations.HeaderOperations.base64": "Encode.Bytes.Header.base64", - "encode.bytes.aio.operations.HeaderOperations.base64": "Encode.Bytes.Header.base64", - "encode.bytes.operations.HeaderOperations.base64_url": "Encode.Bytes.Header.base64url", - "encode.bytes.aio.operations.HeaderOperations.base64_url": "Encode.Bytes.Header.base64url", - "encode.bytes.operations.HeaderOperations.base64_url_array": "Encode.Bytes.Header.base64urlArray", - "encode.bytes.aio.operations.HeaderOperations.base64_url_array": "Encode.Bytes.Header.base64urlArray", - "encode.bytes.operations.RequestBodyOperations.default": "Encode.Bytes.RequestBody.default", - "encode.bytes.aio.operations.RequestBodyOperations.default": "Encode.Bytes.RequestBody.default", - "encode.bytes.operations.RequestBodyOperations.octet_stream": "Encode.Bytes.RequestBody.octetStream", - "encode.bytes.aio.operations.RequestBodyOperations.octet_stream": "Encode.Bytes.RequestBody.octetStream", - "encode.bytes.operations.RequestBodyOperations.custom_content_type": "Encode.Bytes.RequestBody.customContentType", - "encode.bytes.aio.operations.RequestBodyOperations.custom_content_type": "Encode.Bytes.RequestBody.customContentType", - "encode.bytes.operations.RequestBodyOperations.base64": "Encode.Bytes.RequestBody.base64", - "encode.bytes.aio.operations.RequestBodyOperations.base64": "Encode.Bytes.RequestBody.base64", - "encode.bytes.operations.RequestBodyOperations.base64_url": "Encode.Bytes.RequestBody.base64url", - "encode.bytes.aio.operations.RequestBodyOperations.base64_url": "Encode.Bytes.RequestBody.base64url", - "encode.bytes.operations.ResponseBodyOperations.default": "Encode.Bytes.ResponseBody.default", - "encode.bytes.aio.operations.ResponseBodyOperations.default": "Encode.Bytes.ResponseBody.default", - "encode.bytes.operations.ResponseBodyOperations.octet_stream": "Encode.Bytes.ResponseBody.octetStream", - "encode.bytes.aio.operations.ResponseBodyOperations.octet_stream": "Encode.Bytes.ResponseBody.octetStream", - "encode.bytes.operations.ResponseBodyOperations.custom_content_type": "Encode.Bytes.ResponseBody.customContentType", - "encode.bytes.aio.operations.ResponseBodyOperations.custom_content_type": "Encode.Bytes.ResponseBody.customContentType", - "encode.bytes.operations.ResponseBodyOperations.base64": "Encode.Bytes.ResponseBody.base64", - "encode.bytes.aio.operations.ResponseBodyOperations.base64": "Encode.Bytes.ResponseBody.base64", - "encode.bytes.operations.ResponseBodyOperations.base64_url": "Encode.Bytes.ResponseBody.base64url", - "encode.bytes.aio.operations.ResponseBodyOperations.base64_url": "Encode.Bytes.ResponseBody.base64url" + "encode.bytes.operations.BytesClientQueryOperations.default": "Encode.Bytes.Query.default", + "encode.bytes.aio.operations.BytesClientQueryOperations.default": "Encode.Bytes.Query.default", + "encode.bytes.operations.BytesClientQueryOperations.base64": "Encode.Bytes.Query.base64", + "encode.bytes.aio.operations.BytesClientQueryOperations.base64": "Encode.Bytes.Query.base64", + "encode.bytes.operations.BytesClientQueryOperations.base64_url": "Encode.Bytes.Query.base64url", + "encode.bytes.aio.operations.BytesClientQueryOperations.base64_url": "Encode.Bytes.Query.base64url", + "encode.bytes.operations.BytesClientQueryOperations.base64_url_array": "Encode.Bytes.Query.base64urlArray", + "encode.bytes.aio.operations.BytesClientQueryOperations.base64_url_array": "Encode.Bytes.Query.base64urlArray", + "encode.bytes.operations.BytesClientPropertyOperations.default": "Encode.Bytes.Property.default", + "encode.bytes.aio.operations.BytesClientPropertyOperations.default": "Encode.Bytes.Property.default", + "encode.bytes.operations.BytesClientPropertyOperations.base64": "Encode.Bytes.Property.base64", + "encode.bytes.aio.operations.BytesClientPropertyOperations.base64": "Encode.Bytes.Property.base64", + "encode.bytes.operations.BytesClientPropertyOperations.base64_url": "Encode.Bytes.Property.base64url", + "encode.bytes.aio.operations.BytesClientPropertyOperations.base64_url": "Encode.Bytes.Property.base64url", + "encode.bytes.operations.BytesClientPropertyOperations.base64_url_array": "Encode.Bytes.Property.base64urlArray", + "encode.bytes.aio.operations.BytesClientPropertyOperations.base64_url_array": "Encode.Bytes.Property.base64urlArray", + "encode.bytes.operations.BytesClientHeaderOperations.default": "Encode.Bytes.Header.default", + "encode.bytes.aio.operations.BytesClientHeaderOperations.default": "Encode.Bytes.Header.default", + "encode.bytes.operations.BytesClientHeaderOperations.base64": "Encode.Bytes.Header.base64", + "encode.bytes.aio.operations.BytesClientHeaderOperations.base64": "Encode.Bytes.Header.base64", + "encode.bytes.operations.BytesClientHeaderOperations.base64_url": "Encode.Bytes.Header.base64url", + "encode.bytes.aio.operations.BytesClientHeaderOperations.base64_url": "Encode.Bytes.Header.base64url", + "encode.bytes.operations.BytesClientHeaderOperations.base64_url_array": "Encode.Bytes.Header.base64urlArray", + "encode.bytes.aio.operations.BytesClientHeaderOperations.base64_url_array": "Encode.Bytes.Header.base64urlArray", + "encode.bytes.operations.BytesClientRequestBodyOperations.default": "Encode.Bytes.RequestBody.default", + "encode.bytes.aio.operations.BytesClientRequestBodyOperations.default": "Encode.Bytes.RequestBody.default", + "encode.bytes.operations.BytesClientRequestBodyOperations.octet_stream": "Encode.Bytes.RequestBody.octetStream", + "encode.bytes.aio.operations.BytesClientRequestBodyOperations.octet_stream": "Encode.Bytes.RequestBody.octetStream", + "encode.bytes.operations.BytesClientRequestBodyOperations.custom_content_type": "Encode.Bytes.RequestBody.customContentType", + "encode.bytes.aio.operations.BytesClientRequestBodyOperations.custom_content_type": "Encode.Bytes.RequestBody.customContentType", + "encode.bytes.operations.BytesClientRequestBodyOperations.base64": "Encode.Bytes.RequestBody.base64", + "encode.bytes.aio.operations.BytesClientRequestBodyOperations.base64": "Encode.Bytes.RequestBody.base64", + "encode.bytes.operations.BytesClientRequestBodyOperations.base64_url": "Encode.Bytes.RequestBody.base64url", + "encode.bytes.aio.operations.BytesClientRequestBodyOperations.base64_url": "Encode.Bytes.RequestBody.base64url", + "encode.bytes.operations.BytesClientResponseBodyOperations.default": "Encode.Bytes.ResponseBody.default", + "encode.bytes.aio.operations.BytesClientResponseBodyOperations.default": "Encode.Bytes.ResponseBody.default", + "encode.bytes.operations.BytesClientResponseBodyOperations.octet_stream": "Encode.Bytes.ResponseBody.octetStream", + "encode.bytes.aio.operations.BytesClientResponseBodyOperations.octet_stream": "Encode.Bytes.ResponseBody.octetStream", + "encode.bytes.operations.BytesClientResponseBodyOperations.custom_content_type": "Encode.Bytes.ResponseBody.customContentType", + "encode.bytes.aio.operations.BytesClientResponseBodyOperations.custom_content_type": "Encode.Bytes.ResponseBody.customContentType", + "encode.bytes.operations.BytesClientResponseBodyOperations.base64": "Encode.Bytes.ResponseBody.base64", + "encode.bytes.aio.operations.BytesClientResponseBodyOperations.base64": "Encode.Bytes.ResponseBody.base64", + "encode.bytes.operations.BytesClientResponseBodyOperations.base64_url": "Encode.Bytes.ResponseBody.base64url", + "encode.bytes.aio.operations.BytesClientResponseBodyOperations.base64_url": "Encode.Bytes.ResponseBody.base64url" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_client.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_client.py index 804a4e5fb2..d6621c3629 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/_client.py @@ -16,26 +16,26 @@ from ._configuration import BytesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .property.operations import PropertyOperations -from .query.operations import QueryOperations -from .requestbody.operations import RequestBodyOperations -from .responsebody.operations import ResponseBodyOperations +from .header.operations import BytesClientHeaderOperations +from .property.operations import BytesClientPropertyOperations +from .query.operations import BytesClientQueryOperations +from .requestbody.operations import BytesClientRequestBodyOperations +from .responsebody.operations import BytesClientResponseBodyOperations class BytesClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on bytes. - :ivar query: QueryOperations operations - :vartype query: encode.bytes.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.bytes.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.bytes.operations.HeaderOperations - :ivar request_body: RequestBodyOperations operations - :vartype request_body: encode.bytes.operations.RequestBodyOperations - :ivar response_body: ResponseBodyOperations operations - :vartype response_body: encode.bytes.operations.ResponseBodyOperations + :ivar bytes_client_query: BytesClientQueryOperations operations + :vartype bytes_client_query: encode.bytes.operations.BytesClientQueryOperations + :ivar bytes_client_property: BytesClientPropertyOperations operations + :vartype bytes_client_property: encode.bytes.operations.BytesClientPropertyOperations + :ivar bytes_client_header: BytesClientHeaderOperations operations + :vartype bytes_client_header: encode.bytes.operations.BytesClientHeaderOperations + :ivar bytes_client_request_body: BytesClientRequestBodyOperations operations + :vartype bytes_client_request_body: encode.bytes.operations.BytesClientRequestBodyOperations + :ivar bytes_client_response_body: BytesClientResponseBodyOperations operations + :vartype bytes_client_response_body: encode.bytes.operations.BytesClientResponseBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -68,11 +68,21 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.request_body = RequestBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_body = ResponseBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.bytes_client_query = BytesClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_property = BytesClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_header = BytesClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_request_body = BytesClientRequestBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_response_body = BytesClientResponseBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/_client.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/_client.py index a5417e1463..ba7b6a9550 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/aio/_client.py @@ -15,27 +15,29 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..property.aio.operations import PropertyOperations -from ..query.aio.operations import QueryOperations -from ..requestbody.aio.operations import RequestBodyOperations -from ..responsebody.aio.operations import ResponseBodyOperations +from ..header.aio.operations import BytesClientHeaderOperations +from ..property.aio.operations import BytesClientPropertyOperations +from ..query.aio.operations import BytesClientQueryOperations +from ..requestbody.aio.operations import BytesClientRequestBodyOperations +from ..responsebody.aio.operations import BytesClientResponseBodyOperations from ._configuration import BytesClientConfiguration class BytesClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on bytes. - :ivar query: QueryOperations operations - :vartype query: encode.bytes.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.bytes.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.bytes.aio.operations.HeaderOperations - :ivar request_body: RequestBodyOperations operations - :vartype request_body: encode.bytes.aio.operations.RequestBodyOperations - :ivar response_body: ResponseBodyOperations operations - :vartype response_body: encode.bytes.aio.operations.ResponseBodyOperations + :ivar bytes_client_query: BytesClientQueryOperations operations + :vartype bytes_client_query: encode.bytes.aio.operations.BytesClientQueryOperations + :ivar bytes_client_property: BytesClientPropertyOperations operations + :vartype bytes_client_property: encode.bytes.aio.operations.BytesClientPropertyOperations + :ivar bytes_client_header: BytesClientHeaderOperations operations + :vartype bytes_client_header: encode.bytes.aio.operations.BytesClientHeaderOperations + :ivar bytes_client_request_body: BytesClientRequestBodyOperations operations + :vartype bytes_client_request_body: + encode.bytes.aio.operations.BytesClientRequestBodyOperations + :ivar bytes_client_response_body: BytesClientResponseBodyOperations operations + :vartype bytes_client_response_body: + encode.bytes.aio.operations.BytesClientResponseBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -68,11 +70,21 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.request_body = RequestBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_body = ResponseBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.bytes_client_query = BytesClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_property = BytesClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_header = BytesClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_request_body = BytesClientRequestBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_response_body = BytesClientResponseBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py index 1ab30f6026..25129df60d 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import BytesClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "BytesClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py index 3062b7e500..40d6379f0c 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py @@ -24,24 +24,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_header_base64_request, - build_header_base64_url_array_request, - build_header_base64_url_request, - build_header_default_request, + build_bytes_client_header_base64_request, + build_bytes_client_header_base64_url_array_request, + build_bytes_client_header_base64_url_request, + build_bytes_client_header_default_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class BytesClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`header` attribute. + :attr:`bytes_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -74,7 +74,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_bytes_client_header_default_request( value=value, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_request( + _request = build_bytes_client_header_base64_request( value=value, headers=_headers, params=_params, @@ -168,7 +168,7 @@ async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_request( + _request = build_bytes_client_header_base64_url_request( value=value, headers=_headers, params=_params, @@ -215,7 +215,7 @@ async def base64_url_array(self, *, value: list[bytes], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_array_request( + _request = build_bytes_client_header_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/__init__.py index 1ab30f6026..25129df60d 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import BytesClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "BytesClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/_operations.py index b0e341ce9b..3fc6ce956c 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/header/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_header_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_default_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -44,7 +46,7 @@ def build_header_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -56,7 +58,9 @@ def build_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_url_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -68,7 +72,9 @@ def build_header_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_url_array_request(*, value: list[bytes], **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_url_array_request( # pylint: disable=name-too-long + *, value: list[bytes], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -80,14 +86,14 @@ def build_header_base64_url_array_request(*, value: list[bytes], **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class BytesClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`header` attribute. + :attr:`bytes_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -120,7 +126,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_bytes_client_header_default_request( value=value, headers=_headers, params=_params, @@ -167,7 +173,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_request( + _request = build_bytes_client_header_base64_request( value=value, headers=_headers, params=_params, @@ -214,7 +220,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_request( + _request = build_bytes_client_header_base64_url_request( value=value, headers=_headers, params=_params, @@ -263,7 +269,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_array_request( + _request = build_bytes_client_header_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py index 22f1107401..bbcece393d 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import BytesClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "BytesClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py index 43d681e7cc..3f3ae78584 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py @@ -31,10 +31,10 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_property_base64_request, - build_property_base64_url_array_request, - build_property_base64_url_request, - build_property_default_request, + build_bytes_client_property_base64_request, + build_bytes_client_property_base64_url_array_request, + build_bytes_client_property_base64_url_request, + build_bytes_client_property_default_request, ) JSON = MutableMapping[str, Any] @@ -42,14 +42,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class BytesClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`property` attribute. + :attr:`bytes_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -140,7 +140,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_bytes_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -258,7 +258,7 @@ async def base64( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_request( + _request = build_bytes_client_property_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -376,7 +376,7 @@ async def base64_url( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_request( + _request = build_bytes_client_property_base64_url_request( content_type=content_type, content=_content, headers=_headers, @@ -499,7 +499,7 @@ async def base64_url_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_array_request( + _request = build_bytes_client_property_base64_url_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/__init__.py index 22f1107401..bbcece393d 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import BytesClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "BytesClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/_operations.py index 7cfc81f97a..f702b193fa 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/property/operations/_operations.py @@ -39,7 +39,7 @@ _SERIALIZER.client_side_validation = False -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -56,7 +56,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -73,7 +73,7 @@ def build_property_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +90,7 @@ def build_property_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -107,14 +107,14 @@ def build_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class BytesClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`property` attribute. + :attr:`bytes_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -205,7 +205,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_bytes_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -323,7 +323,7 @@ def base64( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_request( + _request = build_bytes_client_property_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -441,7 +441,7 @@ def base64_url( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_request( + _request = build_bytes_client_property_base64_url_request( content_type=content_type, content=_content, headers=_headers, @@ -564,7 +564,7 @@ def base64_url_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_array_request( + _request = build_bytes_client_property_base64_url_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py index 97d3de4f9b..e9d20acca0 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import BytesClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "BytesClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py index e9e5b8e6fa..b639d52944 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py @@ -24,24 +24,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_query_base64_request, - build_query_base64_url_array_request, - build_query_base64_url_request, - build_query_default_request, + build_bytes_client_query_base64_request, + build_bytes_client_query_base64_url_array_request, + build_bytes_client_query_base64_url_request, + build_bytes_client_query_default_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class BytesClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`query` attribute. + :attr:`bytes_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -74,7 +74,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_bytes_client_query_default_request( value=value, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_request( + _request = build_bytes_client_query_base64_request( value=value, headers=_headers, params=_params, @@ -168,7 +168,7 @@ async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_request( + _request = build_bytes_client_query_base64_url_request( value=value, headers=_headers, params=_params, @@ -215,7 +215,7 @@ async def base64_url_array(self, *, value: list[bytes], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_array_request( + _request = build_bytes_client_query_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/__init__.py index 97d3de4f9b..e9d20acca0 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import BytesClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "BytesClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/_operations.py index c07f3ff4a5..faf8f7485b 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/query/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -44,7 +44,7 @@ def build_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -56,7 +56,9 @@ def build_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_url_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -68,7 +70,9 @@ def build_query_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_url_array_request(*, value: list[bytes], **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_url_array_request( # pylint: disable=name-too-long + *, value: list[bytes], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -80,14 +84,14 @@ def build_query_base64_url_array_request(*, value: list[bytes], **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class BytesClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`query` attribute. + :attr:`bytes_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -120,7 +124,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_bytes_client_query_default_request( value=value, headers=_headers, params=_params, @@ -167,7 +171,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_request( + _request = build_bytes_client_query_base64_request( value=value, headers=_headers, params=_params, @@ -214,7 +218,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_request( + _request = build_bytes_client_query_base64_url_request( value=value, headers=_headers, params=_params, @@ -263,7 +267,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_array_request( + _request = build_bytes_client_query_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py index 4b425cb03d..282548ee2c 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import RequestBodyOperations # type: ignore +from ._operations import BytesClientRequestBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "RequestBodyOperations", + "BytesClientRequestBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py index 1c8f98d8c6..6ce9a1c82e 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py @@ -27,25 +27,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_request_body_base64_request, - build_request_body_base64_url_request, - build_request_body_custom_content_type_request, - build_request_body_default_request, - build_request_body_octet_stream_request, + build_bytes_client_request_body_base64_request, + build_bytes_client_request_body_base64_url_request, + build_bytes_client_request_body_custom_content_type_request, + build_bytes_client_request_body_default_request, + build_bytes_client_request_body_octet_stream_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class RequestBodyOperations: +class BytesClientRequestBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`request_body` attribute. + :attr:`bytes_client_request_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -81,7 +81,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_default_request( + _request = build_bytes_client_request_body_default_request( content_type=content_type, content=_content, headers=_headers, @@ -132,7 +132,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_octet_stream_request( + _request = build_bytes_client_request_body_octet_stream_request( content_type=content_type, content=_content, headers=_headers, @@ -183,7 +183,7 @@ async def custom_content_type(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_custom_content_type_request( + _request = build_bytes_client_request_body_custom_content_type_request( content_type=content_type, content=_content, headers=_headers, @@ -234,7 +234,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64") # type: ignore - _request = build_request_body_base64_request( + _request = build_bytes_client_request_body_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -285,7 +285,7 @@ async def base64_url(self, value: bytes, **kwargs: Any) -> None: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64url") # type: ignore - _request = build_request_body_base64_url_request( + _request = build_bytes_client_request_body_base64_url_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py index 4b425cb03d..282548ee2c 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import RequestBodyOperations # type: ignore +from ._operations import BytesClientRequestBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "RequestBodyOperations", + "BytesClientRequestBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py index 60a6c9f815..6a66687773 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_request_body_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -47,7 +47,7 @@ def build_request_body_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -60,7 +60,9 @@ def build_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_custom_content_type_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_bytes_client_request_body_custom_content_type_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -73,7 +75,7 @@ def build_request_body_custom_content_type_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -86,7 +88,7 @@ def build_request_body_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -99,14 +101,14 @@ def build_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class RequestBodyOperations: +class BytesClientRequestBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`request_body` attribute. + :attr:`bytes_client_request_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -142,7 +144,7 @@ def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incon _content = value - _request = build_request_body_default_request( + _request = build_bytes_client_request_body_default_request( content_type=content_type, content=_content, headers=_headers, @@ -193,7 +195,7 @@ def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= _content = value - _request = build_request_body_octet_stream_request( + _request = build_bytes_client_request_body_octet_stream_request( content_type=content_type, content=_content, headers=_headers, @@ -246,7 +248,7 @@ def custom_content_type( # pylint: disable=inconsistent-return-statements _content = value - _request = build_request_body_custom_content_type_request( + _request = build_bytes_client_request_body_custom_content_type_request( content_type=content_type, content=_content, headers=_headers, @@ -297,7 +299,7 @@ def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incons _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64") # type: ignore - _request = build_request_body_base64_request( + _request = build_bytes_client_request_body_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -348,7 +350,7 @@ def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=in _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64url") # type: ignore - _request = build_request_body_base64_url_request( + _request = build_bytes_client_request_body_base64_url_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py index 903f00096e..c715cea272 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseBodyOperations # type: ignore +from ._operations import BytesClientResponseBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseBodyOperations", + "BytesClientResponseBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py index 5b4dba41ed..163db67ef8 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py @@ -27,25 +27,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_response_body_base64_request, - build_response_body_base64_url_request, - build_response_body_custom_content_type_request, - build_response_body_default_request, - build_response_body_octet_stream_request, + build_bytes_client_response_body_base64_request, + build_bytes_client_response_body_base64_url_request, + build_bytes_client_response_body_custom_content_type_request, + build_bytes_client_response_body_default_request, + build_bytes_client_response_body_octet_stream_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ResponseBodyOperations: +class BytesClientResponseBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`response_body` attribute. + :attr:`bytes_client_response_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def default(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_default_request( + _request = build_bytes_client_response_body_default_request( headers=_headers, params=_params, ) @@ -129,7 +129,7 @@ async def octet_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_octet_stream_request( + _request = build_bytes_client_response_body_octet_stream_request( headers=_headers, params=_params, ) @@ -185,7 +185,7 @@ async def custom_content_type(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_custom_content_type_request( + _request = build_bytes_client_response_body_custom_content_type_request( headers=_headers, params=_params, ) @@ -241,7 +241,7 @@ async def base64(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_request( + _request = build_bytes_client_response_body_base64_request( headers=_headers, params=_params, ) @@ -300,7 +300,7 @@ async def base64_url(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_url_request( + _request = build_bytes_client_response_body_base64_url_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py index 903f00096e..c715cea272 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseBodyOperations # type: ignore +from ._operations import BytesClientResponseBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseBodyOperations", + "BytesClientResponseBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py index 5aec53c0f7..d1c79710a5 100644 --- a/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py @@ -35,7 +35,7 @@ _SERIALIZER.client_side_validation = False -def build_response_body_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/octet-stream") @@ -49,7 +49,9 @@ def build_response_body_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_octet_stream_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_octet_stream_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/octet-stream") @@ -63,7 +65,9 @@ def build_response_body_octet_stream_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_custom_content_type_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_bytes_client_response_body_custom_content_type_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "image/png") @@ -77,7 +81,7 @@ def build_response_body_custom_content_type_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -91,7 +95,7 @@ def build_response_body_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -105,14 +109,14 @@ def build_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class ResponseBodyOperations: +class BytesClientResponseBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`response_body` attribute. + :attr:`bytes_client_response_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -143,7 +147,7 @@ def default(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_default_request( + _request = build_bytes_client_response_body_default_request( headers=_headers, params=_params, ) @@ -196,7 +200,7 @@ def octet_stream(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_octet_stream_request( + _request = build_bytes_client_response_body_octet_stream_request( headers=_headers, params=_params, ) @@ -252,7 +256,7 @@ def custom_content_type(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_custom_content_type_request( + _request = build_bytes_client_response_body_custom_content_type_request( headers=_headers, params=_params, ) @@ -308,7 +312,7 @@ def base64(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_request( + _request = build_bytes_client_response_body_base64_request( headers=_headers, params=_params, ) @@ -367,7 +371,7 @@ def base64_url(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_url_request( + _request = build_bytes_client_response_body_base64_url_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations.py new file mode 100644 index 0000000000..5d59ec8f9f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BytesClientTestBase, BytesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientHeaderOperations(BytesClientTestBase): + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_header_default(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_header.default( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_header_base64(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_header.base64( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_header_base64_url(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_header.base64_url( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_header_base64_url_array(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_header.base64_url_array( + value=[bytes("bytes", encoding="utf-8")], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations_async.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations_async.py new file mode 100644 index 0000000000..9edc582b91 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_header_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BytesPreparer +from testpreparer_async import BytesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientHeaderOperationsAsync(BytesClientTestBaseAsync): + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_header_default(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_header.default( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_header_base64(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_header.base64( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_header_base64_url(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_header.base64_url( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_header_base64_url_array(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_header.base64_url_array( + value=[bytes("bytes", encoding="utf-8")], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations.py new file mode 100644 index 0000000000..82004e40fd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BytesClientTestBase, BytesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientPropertyOperations(BytesClientTestBase): + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_property_default(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_property.default( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_property_base64(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_property.base64( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_property_base64_url(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_property.base64_url( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_property_base64_url_array(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_property.base64_url_array( + body={"value": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations_async.py new file mode 100644 index 0000000000..0d3a86db96 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_property_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BytesPreparer +from testpreparer_async import BytesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientPropertyOperationsAsync(BytesClientTestBaseAsync): + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_property_default(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_property.default( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_property_base64(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_property.base64( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_property_base64_url(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_property.base64_url( + body={"value": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_property_base64_url_array(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_property.base64_url_array( + body={"value": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations.py new file mode 100644 index 0000000000..b6672c2900 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BytesClientTestBase, BytesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientQueryOperations(BytesClientTestBase): + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_query_default(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_query.default( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_query_base64(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_query.base64( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_query_base64_url(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_query.base64_url( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_query_base64_url_array(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_query.base64_url_array( + value=[bytes("bytes", encoding="utf-8")], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations_async.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations_async.py new file mode 100644 index 0000000000..6f24a63f87 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_query_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BytesPreparer +from testpreparer_async import BytesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientQueryOperationsAsync(BytesClientTestBaseAsync): + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_query_default(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_query.default( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_query_base64(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_query.base64( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_query_base64_url(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_query.base64_url( + value=bytes("bytes", encoding="utf-8"), + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_query_base64_url_array(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_query.base64_url_array( + value=[bytes("bytes", encoding="utf-8")], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations.py new file mode 100644 index 0000000000..7bff0f050d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BytesClientTestBase, BytesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientRequestBodyOperations(BytesClientTestBase): + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_request_body_default(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_request_body.default( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_request_body_octet_stream(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_request_body.octet_stream( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_request_body_custom_content_type(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_request_body.custom_content_type( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_request_body_base64(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_request_body.base64( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_request_body_base64_url(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_request_body.base64_url( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations_async.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations_async.py new file mode 100644 index 0000000000..648344143b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_request_body_operations_async.py @@ -0,0 +1,74 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BytesPreparer +from testpreparer_async import BytesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientRequestBodyOperationsAsync(BytesClientTestBaseAsync): + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_request_body_default(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_request_body.default( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_request_body_octet_stream(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_request_body.octet_stream( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_request_body_custom_content_type(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_request_body.custom_content_type( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_request_body_base64(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_request_body.base64( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_request_body_base64_url(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_request_body.base64_url( + value=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations.py new file mode 100644 index 0000000000..2e9d89c646 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BytesClientTestBase, BytesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientResponseBodyOperations(BytesClientTestBase): + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_response_body_default(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_response_body.default() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_response_body_octet_stream(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_response_body.octet_stream() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_response_body_custom_content_type(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_response_body.custom_content_type() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_response_body_base64(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_response_body.base64() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy + def test_bytes_client_response_body_base64_url(self, bytes_endpoint): + client = self.create_client(endpoint=bytes_endpoint) + response = client.bytes_client_response_body.base64_url() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations_async.py b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations_async.py new file mode 100644 index 0000000000..5588cc36bc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-bytes/generated_tests/test_bytes_bytes_client_response_body_operations_async.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BytesPreparer +from testpreparer_async import BytesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBytesBytesClientResponseBodyOperationsAsync(BytesClientTestBaseAsync): + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_response_body_default(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_response_body.default() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_response_body_octet_stream(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_response_body.octet_stream() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_response_body_custom_content_type(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_response_body.custom_content_type() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_response_body_base64(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_response_body.base64() + + # please add some check logic here by yourself + # ... + + @BytesPreparer() + @recorded_by_proxy_async + async def test_bytes_client_response_body_base64_url(self, bytes_endpoint): + client = self.create_async_client(endpoint=bytes_endpoint) + response = await client.bytes_client_response_body.base64_url() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/apiview-properties.json b/packages/typespec-python/test/azure/generated/encode-datetime/apiview-properties.json index 822e64692e..7e3e9641a4 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/encode-datetime/apiview-properties.json @@ -6,43 +6,43 @@ "encode.datetime.models.Rfc7231DatetimeProperty": "Encode.Datetime.Rfc7231DatetimeProperty", "encode.datetime.models.UnixTimestampArrayDatetimeProperty": "Encode.Datetime.UnixTimestampArrayDatetimeProperty", "encode.datetime.models.UnixTimestampDatetimeProperty": "Encode.Datetime.UnixTimestampDatetimeProperty", - "encode.datetime.operations.QueryOperations.default": "Encode.Datetime.Query.default", - "encode.datetime.aio.operations.QueryOperations.default": "Encode.Datetime.Query.default", - "encode.datetime.operations.QueryOperations.rfc3339": "Encode.Datetime.Query.rfc3339", - "encode.datetime.aio.operations.QueryOperations.rfc3339": "Encode.Datetime.Query.rfc3339", - "encode.datetime.operations.QueryOperations.rfc7231": "Encode.Datetime.Query.rfc7231", - "encode.datetime.aio.operations.QueryOperations.rfc7231": "Encode.Datetime.Query.rfc7231", - "encode.datetime.operations.QueryOperations.unix_timestamp": "Encode.Datetime.Query.unixTimestamp", - "encode.datetime.aio.operations.QueryOperations.unix_timestamp": "Encode.Datetime.Query.unixTimestamp", - "encode.datetime.operations.QueryOperations.unix_timestamp_array": "Encode.Datetime.Query.unixTimestampArray", - "encode.datetime.aio.operations.QueryOperations.unix_timestamp_array": "Encode.Datetime.Query.unixTimestampArray", - "encode.datetime.operations.PropertyOperations.default": "Encode.Datetime.Property.default", - "encode.datetime.aio.operations.PropertyOperations.default": "Encode.Datetime.Property.default", - "encode.datetime.operations.PropertyOperations.rfc3339": "Encode.Datetime.Property.rfc3339", - "encode.datetime.aio.operations.PropertyOperations.rfc3339": "Encode.Datetime.Property.rfc3339", - "encode.datetime.operations.PropertyOperations.rfc7231": "Encode.Datetime.Property.rfc7231", - "encode.datetime.aio.operations.PropertyOperations.rfc7231": "Encode.Datetime.Property.rfc7231", - "encode.datetime.operations.PropertyOperations.unix_timestamp": "Encode.Datetime.Property.unixTimestamp", - "encode.datetime.aio.operations.PropertyOperations.unix_timestamp": "Encode.Datetime.Property.unixTimestamp", - "encode.datetime.operations.PropertyOperations.unix_timestamp_array": "Encode.Datetime.Property.unixTimestampArray", - "encode.datetime.aio.operations.PropertyOperations.unix_timestamp_array": "Encode.Datetime.Property.unixTimestampArray", - "encode.datetime.operations.HeaderOperations.default": "Encode.Datetime.Header.default", - "encode.datetime.aio.operations.HeaderOperations.default": "Encode.Datetime.Header.default", - "encode.datetime.operations.HeaderOperations.rfc3339": "Encode.Datetime.Header.rfc3339", - "encode.datetime.aio.operations.HeaderOperations.rfc3339": "Encode.Datetime.Header.rfc3339", - "encode.datetime.operations.HeaderOperations.rfc7231": "Encode.Datetime.Header.rfc7231", - "encode.datetime.aio.operations.HeaderOperations.rfc7231": "Encode.Datetime.Header.rfc7231", - "encode.datetime.operations.HeaderOperations.unix_timestamp": "Encode.Datetime.Header.unixTimestamp", - "encode.datetime.aio.operations.HeaderOperations.unix_timestamp": "Encode.Datetime.Header.unixTimestamp", - "encode.datetime.operations.HeaderOperations.unix_timestamp_array": "Encode.Datetime.Header.unixTimestampArray", - "encode.datetime.aio.operations.HeaderOperations.unix_timestamp_array": "Encode.Datetime.Header.unixTimestampArray", - "encode.datetime.operations.ResponseHeaderOperations.default": "Encode.Datetime.ResponseHeader.default", - "encode.datetime.aio.operations.ResponseHeaderOperations.default": "Encode.Datetime.ResponseHeader.default", - "encode.datetime.operations.ResponseHeaderOperations.rfc3339": "Encode.Datetime.ResponseHeader.rfc3339", - "encode.datetime.aio.operations.ResponseHeaderOperations.rfc3339": "Encode.Datetime.ResponseHeader.rfc3339", - "encode.datetime.operations.ResponseHeaderOperations.rfc7231": "Encode.Datetime.ResponseHeader.rfc7231", - "encode.datetime.aio.operations.ResponseHeaderOperations.rfc7231": "Encode.Datetime.ResponseHeader.rfc7231", - "encode.datetime.operations.ResponseHeaderOperations.unix_timestamp": "Encode.Datetime.ResponseHeader.unixTimestamp", - "encode.datetime.aio.operations.ResponseHeaderOperations.unix_timestamp": "Encode.Datetime.ResponseHeader.unixTimestamp" + "encode.datetime.operations.DatetimeClientQueryOperations.default": "Encode.Datetime.Query.default", + "encode.datetime.aio.operations.DatetimeClientQueryOperations.default": "Encode.Datetime.Query.default", + "encode.datetime.operations.DatetimeClientQueryOperations.rfc3339": "Encode.Datetime.Query.rfc3339", + "encode.datetime.aio.operations.DatetimeClientQueryOperations.rfc3339": "Encode.Datetime.Query.rfc3339", + "encode.datetime.operations.DatetimeClientQueryOperations.rfc7231": "Encode.Datetime.Query.rfc7231", + "encode.datetime.aio.operations.DatetimeClientQueryOperations.rfc7231": "Encode.Datetime.Query.rfc7231", + "encode.datetime.operations.DatetimeClientQueryOperations.unix_timestamp": "Encode.Datetime.Query.unixTimestamp", + "encode.datetime.aio.operations.DatetimeClientQueryOperations.unix_timestamp": "Encode.Datetime.Query.unixTimestamp", + "encode.datetime.operations.DatetimeClientQueryOperations.unix_timestamp_array": "Encode.Datetime.Query.unixTimestampArray", + "encode.datetime.aio.operations.DatetimeClientQueryOperations.unix_timestamp_array": "Encode.Datetime.Query.unixTimestampArray", + "encode.datetime.operations.DatetimeClientPropertyOperations.default": "Encode.Datetime.Property.default", + "encode.datetime.aio.operations.DatetimeClientPropertyOperations.default": "Encode.Datetime.Property.default", + "encode.datetime.operations.DatetimeClientPropertyOperations.rfc3339": "Encode.Datetime.Property.rfc3339", + "encode.datetime.aio.operations.DatetimeClientPropertyOperations.rfc3339": "Encode.Datetime.Property.rfc3339", + "encode.datetime.operations.DatetimeClientPropertyOperations.rfc7231": "Encode.Datetime.Property.rfc7231", + "encode.datetime.aio.operations.DatetimeClientPropertyOperations.rfc7231": "Encode.Datetime.Property.rfc7231", + "encode.datetime.operations.DatetimeClientPropertyOperations.unix_timestamp": "Encode.Datetime.Property.unixTimestamp", + "encode.datetime.aio.operations.DatetimeClientPropertyOperations.unix_timestamp": "Encode.Datetime.Property.unixTimestamp", + "encode.datetime.operations.DatetimeClientPropertyOperations.unix_timestamp_array": "Encode.Datetime.Property.unixTimestampArray", + "encode.datetime.aio.operations.DatetimeClientPropertyOperations.unix_timestamp_array": "Encode.Datetime.Property.unixTimestampArray", + "encode.datetime.operations.DatetimeClientHeaderOperations.default": "Encode.Datetime.Header.default", + "encode.datetime.aio.operations.DatetimeClientHeaderOperations.default": "Encode.Datetime.Header.default", + "encode.datetime.operations.DatetimeClientHeaderOperations.rfc3339": "Encode.Datetime.Header.rfc3339", + "encode.datetime.aio.operations.DatetimeClientHeaderOperations.rfc3339": "Encode.Datetime.Header.rfc3339", + "encode.datetime.operations.DatetimeClientHeaderOperations.rfc7231": "Encode.Datetime.Header.rfc7231", + "encode.datetime.aio.operations.DatetimeClientHeaderOperations.rfc7231": "Encode.Datetime.Header.rfc7231", + "encode.datetime.operations.DatetimeClientHeaderOperations.unix_timestamp": "Encode.Datetime.Header.unixTimestamp", + "encode.datetime.aio.operations.DatetimeClientHeaderOperations.unix_timestamp": "Encode.Datetime.Header.unixTimestamp", + "encode.datetime.operations.DatetimeClientHeaderOperations.unix_timestamp_array": "Encode.Datetime.Header.unixTimestampArray", + "encode.datetime.aio.operations.DatetimeClientHeaderOperations.unix_timestamp_array": "Encode.Datetime.Header.unixTimestampArray", + "encode.datetime.operations.DatetimeClientResponseHeaderOperations.default": "Encode.Datetime.ResponseHeader.default", + "encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations.default": "Encode.Datetime.ResponseHeader.default", + "encode.datetime.operations.DatetimeClientResponseHeaderOperations.rfc3339": "Encode.Datetime.ResponseHeader.rfc3339", + "encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations.rfc3339": "Encode.Datetime.ResponseHeader.rfc3339", + "encode.datetime.operations.DatetimeClientResponseHeaderOperations.rfc7231": "Encode.Datetime.ResponseHeader.rfc7231", + "encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations.rfc7231": "Encode.Datetime.ResponseHeader.rfc7231", + "encode.datetime.operations.DatetimeClientResponseHeaderOperations.unix_timestamp": "Encode.Datetime.ResponseHeader.unixTimestamp", + "encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations.unix_timestamp": "Encode.Datetime.ResponseHeader.unixTimestamp" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_client.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_client.py index 75e498112a..0503293c4c 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/_client.py @@ -16,23 +16,24 @@ from ._configuration import DatetimeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .property.operations import PropertyOperations -from .query.operations import QueryOperations -from .responseheader.operations import ResponseHeaderOperations +from .header.operations import DatetimeClientHeaderOperations +from .property.operations import DatetimeClientPropertyOperations +from .query.operations import DatetimeClientQueryOperations +from .responseheader.operations import DatetimeClientResponseHeaderOperations class DatetimeClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on datetime. - :ivar query: QueryOperations operations - :vartype query: encode.datetime.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.datetime.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.datetime.operations.HeaderOperations - :ivar response_header: ResponseHeaderOperations operations - :vartype response_header: encode.datetime.operations.ResponseHeaderOperations + :ivar datetime_client_query: DatetimeClientQueryOperations operations + :vartype datetime_client_query: encode.datetime.operations.DatetimeClientQueryOperations + :ivar datetime_client_property: DatetimeClientPropertyOperations operations + :vartype datetime_client_property: encode.datetime.operations.DatetimeClientPropertyOperations + :ivar datetime_client_header: DatetimeClientHeaderOperations operations + :vartype datetime_client_header: encode.datetime.operations.DatetimeClientHeaderOperations + :ivar datetime_client_response_header: DatetimeClientResponseHeaderOperations operations + :vartype datetime_client_response_header: + encode.datetime.operations.DatetimeClientResponseHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -65,10 +66,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_header = ResponseHeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_client_query = DatetimeClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_property = DatetimeClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_header = DatetimeClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_response_header = DatetimeClientResponseHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/_client.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/_client.py index fdc3587ba2..5e9d60a9e3 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/aio/_client.py @@ -15,24 +15,26 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..property.aio.operations import PropertyOperations -from ..query.aio.operations import QueryOperations -from ..responseheader.aio.operations import ResponseHeaderOperations +from ..header.aio.operations import DatetimeClientHeaderOperations +from ..property.aio.operations import DatetimeClientPropertyOperations +from ..query.aio.operations import DatetimeClientQueryOperations +from ..responseheader.aio.operations import DatetimeClientResponseHeaderOperations from ._configuration import DatetimeClientConfiguration class DatetimeClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on datetime. - :ivar query: QueryOperations operations - :vartype query: encode.datetime.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.datetime.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.datetime.aio.operations.HeaderOperations - :ivar response_header: ResponseHeaderOperations operations - :vartype response_header: encode.datetime.aio.operations.ResponseHeaderOperations + :ivar datetime_client_query: DatetimeClientQueryOperations operations + :vartype datetime_client_query: encode.datetime.aio.operations.DatetimeClientQueryOperations + :ivar datetime_client_property: DatetimeClientPropertyOperations operations + :vartype datetime_client_property: + encode.datetime.aio.operations.DatetimeClientPropertyOperations + :ivar datetime_client_header: DatetimeClientHeaderOperations operations + :vartype datetime_client_header: encode.datetime.aio.operations.DatetimeClientHeaderOperations + :ivar datetime_client_response_header: DatetimeClientResponseHeaderOperations operations + :vartype datetime_client_response_header: + encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -65,10 +67,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_header = ResponseHeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_client_query = DatetimeClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_property = DatetimeClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_header = DatetimeClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_response_header = DatetimeClientResponseHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py index 1ab30f6026..066db8de75 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DatetimeClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DatetimeClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py index 796372537e..b81a885617 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py @@ -25,25 +25,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_header_default_request, - build_header_rfc3339_request, - build_header_rfc7231_request, - build_header_unix_timestamp_array_request, - build_header_unix_timestamp_request, + build_datetime_client_header_default_request, + build_datetime_client_header_rfc3339_request, + build_datetime_client_header_rfc7231_request, + build_datetime_client_header_unix_timestamp_array_request, + build_datetime_client_header_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class DatetimeClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`header` attribute. + :attr:`datetime_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_datetime_client_header_default_request( value=value, headers=_headers, params=_params, @@ -123,7 +123,7 @@ async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc3339_request( + _request = build_datetime_client_header_rfc3339_request( value=value, headers=_headers, params=_params, @@ -170,7 +170,7 @@ async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc7231_request( + _request = build_datetime_client_header_rfc7231_request( value=value, headers=_headers, params=_params, @@ -217,7 +217,7 @@ async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_request( + _request = build_datetime_client_header_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -264,7 +264,7 @@ async def unix_timestamp_array(self, *, value: list[datetime.datetime], **kwargs cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_array_request( + _request = build_datetime_client_header_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/__init__.py index 1ab30f6026..066db8de75 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DatetimeClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DatetimeClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/_operations.py index 1e8cbd0044..5ccfd09456 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/header/operations/_operations.py @@ -33,7 +33,9 @@ _SERIALIZER.client_side_validation = False -def build_header_default_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_default_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -45,7 +47,9 @@ def build_header_default_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_rfc3339_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -57,7 +61,9 @@ def build_header_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_rfc7231_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -69,7 +75,9 @@ def build_header_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_unix_timestamp_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_unix_timestamp_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -81,7 +89,7 @@ def build_header_unix_timestamp_request(*, value: datetime.datetime, **kwargs: A return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_unix_timestamp_array_request( # pylint: disable=name-too-long +def build_datetime_client_header_unix_timestamp_array_request( # pylint: disable=name-too-long *, value: list[datetime.datetime], **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -95,14 +103,14 @@ def build_header_unix_timestamp_array_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class DatetimeClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`header` attribute. + :attr:`datetime_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -137,7 +145,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_datetime_client_header_default_request( value=value, headers=_headers, params=_params, @@ -186,7 +194,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc3339_request( + _request = build_datetime_client_header_rfc3339_request( value=value, headers=_headers, params=_params, @@ -235,7 +243,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc7231_request( + _request = build_datetime_client_header_rfc7231_request( value=value, headers=_headers, params=_params, @@ -284,7 +292,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_request( + _request = build_datetime_client_header_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -333,7 +341,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_array_request( + _request = build_datetime_client_header_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py index 22f1107401..c356ac3be7 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DatetimeClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DatetimeClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py index 0a8784b1cc..4d88f655ce 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py @@ -31,11 +31,11 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_property_default_request, - build_property_rfc3339_request, - build_property_rfc7231_request, - build_property_unix_timestamp_array_request, - build_property_unix_timestamp_request, + build_datetime_client_property_default_request, + build_datetime_client_property_rfc3339_request, + build_datetime_client_property_rfc7231_request, + build_datetime_client_property_unix_timestamp_array_request, + build_datetime_client_property_unix_timestamp_request, ) JSON = MutableMapping[str, Any] @@ -43,14 +43,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class DatetimeClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`property` attribute. + :attr:`datetime_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -141,7 +141,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_datetime_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -259,7 +259,7 @@ async def rfc3339( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc3339_request( + _request = build_datetime_client_property_rfc3339_request( content_type=content_type, content=_content, headers=_headers, @@ -377,7 +377,7 @@ async def rfc7231( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc7231_request( + _request = build_datetime_client_property_rfc7231_request( content_type=content_type, content=_content, headers=_headers, @@ -500,7 +500,7 @@ async def unix_timestamp( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_request( + _request = build_datetime_client_property_unix_timestamp_request( content_type=content_type, content=_content, headers=_headers, @@ -627,7 +627,7 @@ async def unix_timestamp_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_array_request( + _request = build_datetime_client_property_unix_timestamp_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/__init__.py index 22f1107401..c356ac3be7 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DatetimeClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DatetimeClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/_operations.py index 852955ab59..657fc59f45 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/property/operations/_operations.py @@ -39,7 +39,7 @@ _SERIALIZER.client_side_validation = False -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -56,7 +56,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_rfc3339_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_rfc3339_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -73,7 +73,7 @@ def build_property_rfc3339_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_rfc7231_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_rfc7231_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +90,9 @@ def build_property_rfc7231_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_unix_timestamp_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_unix_timestamp_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -107,7 +109,9 @@ def build_property_unix_timestamp_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_unix_timestamp_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_datetime_client_property_unix_timestamp_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -124,14 +128,14 @@ def build_property_unix_timestamp_array_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class DatetimeClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`property` attribute. + :attr:`datetime_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -222,7 +226,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_datetime_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -340,7 +344,7 @@ def rfc3339( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc3339_request( + _request = build_datetime_client_property_rfc3339_request( content_type=content_type, content=_content, headers=_headers, @@ -458,7 +462,7 @@ def rfc7231( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc7231_request( + _request = build_datetime_client_property_rfc7231_request( content_type=content_type, content=_content, headers=_headers, @@ -581,7 +585,7 @@ def unix_timestamp( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_request( + _request = build_datetime_client_property_unix_timestamp_request( content_type=content_type, content=_content, headers=_headers, @@ -624,7 +628,7 @@ def unix_timestamp_array( body: _models2.UnixTimestampArrayDatetimeProperty, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models2.UnixTimestampArrayDatetimeProperty: """unix_timestamp_array. @@ -708,7 +712,7 @@ def unix_timestamp_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_array_request( + _request = build_datetime_client_property_unix_timestamp_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py index 97d3de4f9b..9a55eb050d 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DatetimeClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DatetimeClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py index fe1805280e..86274dc665 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py @@ -25,25 +25,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_query_default_request, - build_query_rfc3339_request, - build_query_rfc7231_request, - build_query_unix_timestamp_array_request, - build_query_unix_timestamp_request, + build_datetime_client_query_default_request, + build_datetime_client_query_rfc3339_request, + build_datetime_client_query_rfc7231_request, + build_datetime_client_query_unix_timestamp_array_request, + build_datetime_client_query_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class DatetimeClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`query` attribute. + :attr:`datetime_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_datetime_client_query_default_request( value=value, headers=_headers, params=_params, @@ -123,7 +123,7 @@ async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc3339_request( + _request = build_datetime_client_query_rfc3339_request( value=value, headers=_headers, params=_params, @@ -170,7 +170,7 @@ async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc7231_request( + _request = build_datetime_client_query_rfc7231_request( value=value, headers=_headers, params=_params, @@ -217,7 +217,7 @@ async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_request( + _request = build_datetime_client_query_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -264,7 +264,7 @@ async def unix_timestamp_array(self, *, value: list[datetime.datetime], **kwargs cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_array_request( + _request = build_datetime_client_query_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/__init__.py index 97d3de4f9b..9a55eb050d 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DatetimeClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DatetimeClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/_operations.py index 229f26f4e9..e78f15a02e 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/query/operations/_operations.py @@ -33,7 +33,9 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_default_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -45,7 +47,9 @@ def build_query_default_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_rfc3339_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -57,7 +61,9 @@ def build_query_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_rfc7231_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -69,7 +75,9 @@ def build_query_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_unix_timestamp_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_unix_timestamp_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -81,7 +89,9 @@ def build_query_unix_timestamp_request(*, value: datetime.datetime, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_unix_timestamp_array_request(*, value: list[datetime.datetime], **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_unix_timestamp_array_request( # pylint: disable=name-too-long + *, value: list[datetime.datetime], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -93,14 +103,14 @@ def build_query_unix_timestamp_array_request(*, value: list[datetime.datetime], return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class DatetimeClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`query` attribute. + :attr:`datetime_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -135,7 +145,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_datetime_client_query_default_request( value=value, headers=_headers, params=_params, @@ -184,7 +194,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc3339_request( + _request = build_datetime_client_query_rfc3339_request( value=value, headers=_headers, params=_params, @@ -233,7 +243,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc7231_request( + _request = build_datetime_client_query_rfc7231_request( value=value, headers=_headers, params=_params, @@ -282,7 +292,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_request( + _request = build_datetime_client_query_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -331,7 +341,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_array_request( + _request = build_datetime_client_query_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py index dba58a3938..04756f925f 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseHeaderOperations # type: ignore +from ._operations import DatetimeClientResponseHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseHeaderOperations", + "DatetimeClientResponseHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py index 81eb76fd55..0b07df85fd 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py @@ -24,24 +24,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_response_header_default_request, - build_response_header_rfc3339_request, - build_response_header_rfc7231_request, - build_response_header_unix_timestamp_request, + build_datetime_client_response_header_default_request, + build_datetime_client_response_header_rfc3339_request, + build_datetime_client_response_header_rfc7231_request, + build_datetime_client_response_header_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ResponseHeaderOperations: +class DatetimeClientResponseHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`response_header` attribute. + :attr:`datetime_client_response_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -72,7 +72,7 @@ async def default(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_default_request( + _request = build_datetime_client_response_header_default_request( headers=_headers, params=_params, ) @@ -119,7 +119,7 @@ async def rfc3339(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc3339_request( + _request = build_datetime_client_response_header_rfc3339_request( headers=_headers, params=_params, ) @@ -166,7 +166,7 @@ async def rfc7231(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc7231_request( + _request = build_datetime_client_response_header_rfc7231_request( headers=_headers, params=_params, ) @@ -213,7 +213,7 @@ async def unix_timestamp(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_unix_timestamp_request( + _request = build_datetime_client_response_header_unix_timestamp_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py index dba58a3938..04756f925f 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseHeaderOperations # type: ignore +from ._operations import DatetimeClientResponseHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseHeaderOperations", + "DatetimeClientResponseHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py index cb076ce76a..783971d6f0 100644 --- a/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py @@ -31,42 +31,50 @@ _SERIALIZER.client_side_validation = False -def build_response_header_default_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/default" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_rfc3339_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_rfc3339_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/rfc3339" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_rfc7231_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_rfc7231_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/rfc7231" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_unix_timestamp_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_datetime_client_response_header_unix_timestamp_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/unix-timestamp" return HttpRequest(method="GET", url=_url, **kwargs) -class ResponseHeaderOperations: +class DatetimeClientResponseHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`response_header` attribute. + :attr:`datetime_client_response_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -97,7 +105,7 @@ def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_default_request( + _request = build_datetime_client_response_header_default_request( headers=_headers, params=_params, ) @@ -144,7 +152,7 @@ def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc3339_request( + _request = build_datetime_client_response_header_rfc3339_request( headers=_headers, params=_params, ) @@ -191,7 +199,7 @@ def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc7231_request( + _request = build_datetime_client_response_header_rfc7231_request( headers=_headers, params=_params, ) @@ -238,7 +246,7 @@ def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_unix_timestamp_request( + _request = build_datetime_client_response_header_unix_timestamp_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations.py new file mode 100644 index 0000000000..0951cf906f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DatetimeClientTestBase, DatetimePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientHeaderOperations(DatetimeClientTestBase): + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_header_default(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_header.default( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_header_rfc3339(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_header.rfc3339( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_header_rfc7231(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_header.rfc7231( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_header_unix_timestamp(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_header.unix_timestamp( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_header_unix_timestamp_array(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_header.unix_timestamp_array( + value=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations_async.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations_async.py new file mode 100644 index 0000000000..8bf7a6ab8c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_header_operations_async.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DatetimePreparer +from testpreparer_async import DatetimeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientHeaderOperationsAsync(DatetimeClientTestBaseAsync): + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_header_default(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_header.default( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_header_rfc3339(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_header.rfc3339( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_header_rfc7231(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_header.rfc7231( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_header_unix_timestamp(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_header.unix_timestamp( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_header_unix_timestamp_array(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_header.unix_timestamp_array( + value=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations.py new file mode 100644 index 0000000000..f642067cab --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DatetimeClientTestBase, DatetimePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientPropertyOperations(DatetimeClientTestBase): + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_property_default(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_property.default( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_property_rfc3339(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_property.rfc3339( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_property_rfc7231(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_property.rfc7231( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_property_unix_timestamp(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_property.unix_timestamp( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_property_unix_timestamp_array(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_property.unix_timestamp_array( + body={"value": ["2020-02-20 00:00:00"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations_async.py new file mode 100644 index 0000000000..e9c3d5bd45 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_property_operations_async.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DatetimePreparer +from testpreparer_async import DatetimeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientPropertyOperationsAsync(DatetimeClientTestBaseAsync): + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_property_default(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_property.default( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_property_rfc3339(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_property.rfc3339( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_property_rfc7231(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_property.rfc7231( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_property_unix_timestamp(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_property.unix_timestamp( + body={"value": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_property_unix_timestamp_array(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_property.unix_timestamp_array( + body={"value": ["2020-02-20 00:00:00"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations.py new file mode 100644 index 0000000000..40e0d2c3a8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DatetimeClientTestBase, DatetimePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientQueryOperations(DatetimeClientTestBase): + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_query_default(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_query.default( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_query_rfc3339(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_query.rfc3339( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_query_rfc7231(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_query.rfc7231( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_query_unix_timestamp(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_query.unix_timestamp( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_query_unix_timestamp_array(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_query.unix_timestamp_array( + value=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations_async.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations_async.py new file mode 100644 index 0000000000..f4cea5767c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_query_operations_async.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DatetimePreparer +from testpreparer_async import DatetimeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientQueryOperationsAsync(DatetimeClientTestBaseAsync): + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_query_default(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_query.default( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_query_rfc3339(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_query.rfc3339( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_query_rfc7231(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_query.rfc7231( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_query_unix_timestamp(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_query.unix_timestamp( + value="2020-02-20 00:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_query_unix_timestamp_array(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_query.unix_timestamp_array( + value=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations.py new file mode 100644 index 0000000000..06688e62cb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DatetimeClientTestBase, DatetimePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientResponseHeaderOperations(DatetimeClientTestBase): + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_response_header_default(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_response_header.default() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_response_header_rfc3339(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_response_header.rfc3339() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_response_header_rfc7231(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_response_header.rfc7231() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy + def test_datetime_client_response_header_unix_timestamp(self, datetime_endpoint): + client = self.create_client(endpoint=datetime_endpoint) + response = client.datetime_client_response_header.unix_timestamp() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations_async.py b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations_async.py new file mode 100644 index 0000000000..dc4b7ac627 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-datetime/generated_tests/test_datetime_datetime_client_response_header_operations_async.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DatetimePreparer +from testpreparer_async import DatetimeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDatetimeDatetimeClientResponseHeaderOperationsAsync(DatetimeClientTestBaseAsync): + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_response_header_default(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_response_header.default() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_response_header_rfc3339(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_response_header.rfc3339() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_response_header_rfc7231(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_response_header.rfc7231() + + # please add some check logic here by yourself + # ... + + @DatetimePreparer() + @recorded_by_proxy_async + async def test_datetime_client_response_header_unix_timestamp(self, datetime_endpoint): + client = self.create_async_client(endpoint=datetime_endpoint) + response = await client.datetime_client_response_header.unix_timestamp() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/apiview-properties.json b/packages/typespec-python/test/azure/generated/encode-duration/apiview-properties.json index eabf4f8524..2877f9ba87 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/encode-duration/apiview-properties.json @@ -15,89 +15,89 @@ "encode.duration.models.Int32SecondsDurationProperty": "Encode.Duration.Property.Int32SecondsDurationProperty", "encode.duration.models.Int32SecondsLargerUnitDurationProperty": "Encode.Duration.Property.Int32SecondsLargerUnitDurationProperty", "encode.duration.models.ISO8601DurationProperty": "Encode.Duration.Property.ISO8601DurationProperty", - "encode.duration.operations.QueryOperations.default": "Encode.Duration.Query.default", - "encode.duration.aio.operations.QueryOperations.default": "Encode.Duration.Query.default", - "encode.duration.operations.QueryOperations.iso8601": "Encode.Duration.Query.iso8601", - "encode.duration.aio.operations.QueryOperations.iso8601": "Encode.Duration.Query.iso8601", - "encode.duration.operations.QueryOperations.int32_seconds": "Encode.Duration.Query.int32Seconds", - "encode.duration.aio.operations.QueryOperations.int32_seconds": "Encode.Duration.Query.int32Seconds", - "encode.duration.operations.QueryOperations.int32_seconds_larger_unit": "Encode.Duration.Query.int32SecondsLargerUnit", - "encode.duration.aio.operations.QueryOperations.int32_seconds_larger_unit": "Encode.Duration.Query.int32SecondsLargerUnit", - "encode.duration.operations.QueryOperations.float_seconds": "Encode.Duration.Query.floatSeconds", - "encode.duration.aio.operations.QueryOperations.float_seconds": "Encode.Duration.Query.floatSeconds", - "encode.duration.operations.QueryOperations.float_seconds_larger_unit": "Encode.Duration.Query.floatSecondsLargerUnit", - "encode.duration.aio.operations.QueryOperations.float_seconds_larger_unit": "Encode.Duration.Query.floatSecondsLargerUnit", - "encode.duration.operations.QueryOperations.float64_seconds": "Encode.Duration.Query.float64Seconds", - "encode.duration.aio.operations.QueryOperations.float64_seconds": "Encode.Duration.Query.float64Seconds", - "encode.duration.operations.QueryOperations.int32_milliseconds": "Encode.Duration.Query.int32Milliseconds", - "encode.duration.aio.operations.QueryOperations.int32_milliseconds": "Encode.Duration.Query.int32Milliseconds", - "encode.duration.operations.QueryOperations.int32_milliseconds_larger_unit": "Encode.Duration.Query.int32MillisecondsLargerUnit", - "encode.duration.aio.operations.QueryOperations.int32_milliseconds_larger_unit": "Encode.Duration.Query.int32MillisecondsLargerUnit", - "encode.duration.operations.QueryOperations.float_milliseconds": "Encode.Duration.Query.floatMilliseconds", - "encode.duration.aio.operations.QueryOperations.float_milliseconds": "Encode.Duration.Query.floatMilliseconds", - "encode.duration.operations.QueryOperations.float_milliseconds_larger_unit": "Encode.Duration.Query.floatMillisecondsLargerUnit", - "encode.duration.aio.operations.QueryOperations.float_milliseconds_larger_unit": "Encode.Duration.Query.floatMillisecondsLargerUnit", - "encode.duration.operations.QueryOperations.float64_milliseconds": "Encode.Duration.Query.float64Milliseconds", - "encode.duration.aio.operations.QueryOperations.float64_milliseconds": "Encode.Duration.Query.float64Milliseconds", - "encode.duration.operations.QueryOperations.int32_seconds_array": "Encode.Duration.Query.int32SecondsArray", - "encode.duration.aio.operations.QueryOperations.int32_seconds_array": "Encode.Duration.Query.int32SecondsArray", - "encode.duration.operations.QueryOperations.int32_milliseconds_array": "Encode.Duration.Query.int32MillisecondsArray", - "encode.duration.aio.operations.QueryOperations.int32_milliseconds_array": "Encode.Duration.Query.int32MillisecondsArray", - "encode.duration.operations.PropertyOperations.default": "Encode.Duration.Property.default", - "encode.duration.aio.operations.PropertyOperations.default": "Encode.Duration.Property.default", - "encode.duration.operations.PropertyOperations.iso8601": "Encode.Duration.Property.iso8601", - "encode.duration.aio.operations.PropertyOperations.iso8601": "Encode.Duration.Property.iso8601", - "encode.duration.operations.PropertyOperations.int32_seconds": "Encode.Duration.Property.int32Seconds", - "encode.duration.aio.operations.PropertyOperations.int32_seconds": "Encode.Duration.Property.int32Seconds", - "encode.duration.operations.PropertyOperations.float_seconds": "Encode.Duration.Property.floatSeconds", - "encode.duration.aio.operations.PropertyOperations.float_seconds": "Encode.Duration.Property.floatSeconds", - "encode.duration.operations.PropertyOperations.float64_seconds": "Encode.Duration.Property.float64Seconds", - "encode.duration.aio.operations.PropertyOperations.float64_seconds": "Encode.Duration.Property.float64Seconds", - "encode.duration.operations.PropertyOperations.int32_milliseconds": "Encode.Duration.Property.int32Milliseconds", - "encode.duration.aio.operations.PropertyOperations.int32_milliseconds": "Encode.Duration.Property.int32Milliseconds", - "encode.duration.operations.PropertyOperations.float_milliseconds": "Encode.Duration.Property.floatMilliseconds", - "encode.duration.aio.operations.PropertyOperations.float_milliseconds": "Encode.Duration.Property.floatMilliseconds", - "encode.duration.operations.PropertyOperations.float64_milliseconds": "Encode.Duration.Property.float64Milliseconds", - "encode.duration.aio.operations.PropertyOperations.float64_milliseconds": "Encode.Duration.Property.float64Milliseconds", - "encode.duration.operations.PropertyOperations.float_seconds_array": "Encode.Duration.Property.floatSecondsArray", - "encode.duration.aio.operations.PropertyOperations.float_seconds_array": "Encode.Duration.Property.floatSecondsArray", - "encode.duration.operations.PropertyOperations.float_milliseconds_array": "Encode.Duration.Property.floatMillisecondsArray", - "encode.duration.aio.operations.PropertyOperations.float_milliseconds_array": "Encode.Duration.Property.floatMillisecondsArray", - "encode.duration.operations.PropertyOperations.int32_seconds_larger_unit": "Encode.Duration.Property.int32SecondsLargerUnit", - "encode.duration.aio.operations.PropertyOperations.int32_seconds_larger_unit": "Encode.Duration.Property.int32SecondsLargerUnit", - "encode.duration.operations.PropertyOperations.float_seconds_larger_unit": "Encode.Duration.Property.floatSecondsLargerUnit", - "encode.duration.aio.operations.PropertyOperations.float_seconds_larger_unit": "Encode.Duration.Property.floatSecondsLargerUnit", - "encode.duration.operations.PropertyOperations.int32_milliseconds_larger_unit": "Encode.Duration.Property.int32MillisecondsLargerUnit", - "encode.duration.aio.operations.PropertyOperations.int32_milliseconds_larger_unit": "Encode.Duration.Property.int32MillisecondsLargerUnit", - "encode.duration.operations.PropertyOperations.float_milliseconds_larger_unit": "Encode.Duration.Property.floatMillisecondsLargerUnit", - "encode.duration.aio.operations.PropertyOperations.float_milliseconds_larger_unit": "Encode.Duration.Property.floatMillisecondsLargerUnit", - "encode.duration.operations.HeaderOperations.default": "Encode.Duration.Header.default", - "encode.duration.aio.operations.HeaderOperations.default": "Encode.Duration.Header.default", - "encode.duration.operations.HeaderOperations.iso8601": "Encode.Duration.Header.iso8601", - "encode.duration.aio.operations.HeaderOperations.iso8601": "Encode.Duration.Header.iso8601", - "encode.duration.operations.HeaderOperations.iso8601_array": "Encode.Duration.Header.iso8601Array", - "encode.duration.aio.operations.HeaderOperations.iso8601_array": "Encode.Duration.Header.iso8601Array", - "encode.duration.operations.HeaderOperations.int32_seconds": "Encode.Duration.Header.int32Seconds", - "encode.duration.aio.operations.HeaderOperations.int32_seconds": "Encode.Duration.Header.int32Seconds", - "encode.duration.operations.HeaderOperations.int32_seconds_larger_unit": "Encode.Duration.Header.int32SecondsLargerUnit", - "encode.duration.aio.operations.HeaderOperations.int32_seconds_larger_unit": "Encode.Duration.Header.int32SecondsLargerUnit", - "encode.duration.operations.HeaderOperations.float_seconds": "Encode.Duration.Header.floatSeconds", - "encode.duration.aio.operations.HeaderOperations.float_seconds": "Encode.Duration.Header.floatSeconds", - "encode.duration.operations.HeaderOperations.float_seconds_larger_unit": "Encode.Duration.Header.floatSecondsLargerUnit", - "encode.duration.aio.operations.HeaderOperations.float_seconds_larger_unit": "Encode.Duration.Header.floatSecondsLargerUnit", - "encode.duration.operations.HeaderOperations.float64_seconds": "Encode.Duration.Header.float64Seconds", - "encode.duration.aio.operations.HeaderOperations.float64_seconds": "Encode.Duration.Header.float64Seconds", - "encode.duration.operations.HeaderOperations.int32_milliseconds": "Encode.Duration.Header.int32Milliseconds", - "encode.duration.aio.operations.HeaderOperations.int32_milliseconds": "Encode.Duration.Header.int32Milliseconds", - "encode.duration.operations.HeaderOperations.int32_milliseconds_larger_unit": "Encode.Duration.Header.int32MillisecondsLargerUnit", - "encode.duration.aio.operations.HeaderOperations.int32_milliseconds_larger_unit": "Encode.Duration.Header.int32MillisecondsLargerUnit", - "encode.duration.operations.HeaderOperations.float_milliseconds": "Encode.Duration.Header.floatMilliseconds", - "encode.duration.aio.operations.HeaderOperations.float_milliseconds": "Encode.Duration.Header.floatMilliseconds", - "encode.duration.operations.HeaderOperations.float_milliseconds_larger_unit": "Encode.Duration.Header.floatMillisecondsLargerUnit", - "encode.duration.aio.operations.HeaderOperations.float_milliseconds_larger_unit": "Encode.Duration.Header.floatMillisecondsLargerUnit", - "encode.duration.operations.HeaderOperations.float64_milliseconds": "Encode.Duration.Header.float64Milliseconds", - "encode.duration.aio.operations.HeaderOperations.float64_milliseconds": "Encode.Duration.Header.float64Milliseconds", - "encode.duration.operations.HeaderOperations.int32_milliseconds_array": "Encode.Duration.Header.int32MillisecondsArray", - "encode.duration.aio.operations.HeaderOperations.int32_milliseconds_array": "Encode.Duration.Header.int32MillisecondsArray" + "encode.duration.operations.DurationClientQueryOperations.default": "Encode.Duration.Query.default", + "encode.duration.aio.operations.DurationClientQueryOperations.default": "Encode.Duration.Query.default", + "encode.duration.operations.DurationClientQueryOperations.iso8601": "Encode.Duration.Query.iso8601", + "encode.duration.aio.operations.DurationClientQueryOperations.iso8601": "Encode.Duration.Query.iso8601", + "encode.duration.operations.DurationClientQueryOperations.int32_seconds": "Encode.Duration.Query.int32Seconds", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_seconds": "Encode.Duration.Query.int32Seconds", + "encode.duration.operations.DurationClientQueryOperations.int32_seconds_larger_unit": "Encode.Duration.Query.int32SecondsLargerUnit", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_seconds_larger_unit": "Encode.Duration.Query.int32SecondsLargerUnit", + "encode.duration.operations.DurationClientQueryOperations.float_seconds": "Encode.Duration.Query.floatSeconds", + "encode.duration.aio.operations.DurationClientQueryOperations.float_seconds": "Encode.Duration.Query.floatSeconds", + "encode.duration.operations.DurationClientQueryOperations.float_seconds_larger_unit": "Encode.Duration.Query.floatSecondsLargerUnit", + "encode.duration.aio.operations.DurationClientQueryOperations.float_seconds_larger_unit": "Encode.Duration.Query.floatSecondsLargerUnit", + "encode.duration.operations.DurationClientQueryOperations.float64_seconds": "Encode.Duration.Query.float64Seconds", + "encode.duration.aio.operations.DurationClientQueryOperations.float64_seconds": "Encode.Duration.Query.float64Seconds", + "encode.duration.operations.DurationClientQueryOperations.int32_milliseconds": "Encode.Duration.Query.int32Milliseconds", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_milliseconds": "Encode.Duration.Query.int32Milliseconds", + "encode.duration.operations.DurationClientQueryOperations.int32_milliseconds_larger_unit": "Encode.Duration.Query.int32MillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_milliseconds_larger_unit": "Encode.Duration.Query.int32MillisecondsLargerUnit", + "encode.duration.operations.DurationClientQueryOperations.float_milliseconds": "Encode.Duration.Query.floatMilliseconds", + "encode.duration.aio.operations.DurationClientQueryOperations.float_milliseconds": "Encode.Duration.Query.floatMilliseconds", + "encode.duration.operations.DurationClientQueryOperations.float_milliseconds_larger_unit": "Encode.Duration.Query.floatMillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientQueryOperations.float_milliseconds_larger_unit": "Encode.Duration.Query.floatMillisecondsLargerUnit", + "encode.duration.operations.DurationClientQueryOperations.float64_milliseconds": "Encode.Duration.Query.float64Milliseconds", + "encode.duration.aio.operations.DurationClientQueryOperations.float64_milliseconds": "Encode.Duration.Query.float64Milliseconds", + "encode.duration.operations.DurationClientQueryOperations.int32_seconds_array": "Encode.Duration.Query.int32SecondsArray", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_seconds_array": "Encode.Duration.Query.int32SecondsArray", + "encode.duration.operations.DurationClientQueryOperations.int32_milliseconds_array": "Encode.Duration.Query.int32MillisecondsArray", + "encode.duration.aio.operations.DurationClientQueryOperations.int32_milliseconds_array": "Encode.Duration.Query.int32MillisecondsArray", + "encode.duration.operations.DurationClientPropertyOperations.default": "Encode.Duration.Property.default", + "encode.duration.aio.operations.DurationClientPropertyOperations.default": "Encode.Duration.Property.default", + "encode.duration.operations.DurationClientPropertyOperations.iso8601": "Encode.Duration.Property.iso8601", + "encode.duration.aio.operations.DurationClientPropertyOperations.iso8601": "Encode.Duration.Property.iso8601", + "encode.duration.operations.DurationClientPropertyOperations.int32_seconds": "Encode.Duration.Property.int32Seconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.int32_seconds": "Encode.Duration.Property.int32Seconds", + "encode.duration.operations.DurationClientPropertyOperations.float_seconds": "Encode.Duration.Property.floatSeconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_seconds": "Encode.Duration.Property.floatSeconds", + "encode.duration.operations.DurationClientPropertyOperations.float64_seconds": "Encode.Duration.Property.float64Seconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.float64_seconds": "Encode.Duration.Property.float64Seconds", + "encode.duration.operations.DurationClientPropertyOperations.int32_milliseconds": "Encode.Duration.Property.int32Milliseconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.int32_milliseconds": "Encode.Duration.Property.int32Milliseconds", + "encode.duration.operations.DurationClientPropertyOperations.float_milliseconds": "Encode.Duration.Property.floatMilliseconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_milliseconds": "Encode.Duration.Property.floatMilliseconds", + "encode.duration.operations.DurationClientPropertyOperations.float64_milliseconds": "Encode.Duration.Property.float64Milliseconds", + "encode.duration.aio.operations.DurationClientPropertyOperations.float64_milliseconds": "Encode.Duration.Property.float64Milliseconds", + "encode.duration.operations.DurationClientPropertyOperations.float_seconds_array": "Encode.Duration.Property.floatSecondsArray", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_seconds_array": "Encode.Duration.Property.floatSecondsArray", + "encode.duration.operations.DurationClientPropertyOperations.float_milliseconds_array": "Encode.Duration.Property.floatMillisecondsArray", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_milliseconds_array": "Encode.Duration.Property.floatMillisecondsArray", + "encode.duration.operations.DurationClientPropertyOperations.int32_seconds_larger_unit": "Encode.Duration.Property.int32SecondsLargerUnit", + "encode.duration.aio.operations.DurationClientPropertyOperations.int32_seconds_larger_unit": "Encode.Duration.Property.int32SecondsLargerUnit", + "encode.duration.operations.DurationClientPropertyOperations.float_seconds_larger_unit": "Encode.Duration.Property.floatSecondsLargerUnit", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_seconds_larger_unit": "Encode.Duration.Property.floatSecondsLargerUnit", + "encode.duration.operations.DurationClientPropertyOperations.int32_milliseconds_larger_unit": "Encode.Duration.Property.int32MillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientPropertyOperations.int32_milliseconds_larger_unit": "Encode.Duration.Property.int32MillisecondsLargerUnit", + "encode.duration.operations.DurationClientPropertyOperations.float_milliseconds_larger_unit": "Encode.Duration.Property.floatMillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientPropertyOperations.float_milliseconds_larger_unit": "Encode.Duration.Property.floatMillisecondsLargerUnit", + "encode.duration.operations.DurationClientHeaderOperations.default": "Encode.Duration.Header.default", + "encode.duration.aio.operations.DurationClientHeaderOperations.default": "Encode.Duration.Header.default", + "encode.duration.operations.DurationClientHeaderOperations.iso8601": "Encode.Duration.Header.iso8601", + "encode.duration.aio.operations.DurationClientHeaderOperations.iso8601": "Encode.Duration.Header.iso8601", + "encode.duration.operations.DurationClientHeaderOperations.iso8601_array": "Encode.Duration.Header.iso8601Array", + "encode.duration.aio.operations.DurationClientHeaderOperations.iso8601_array": "Encode.Duration.Header.iso8601Array", + "encode.duration.operations.DurationClientHeaderOperations.int32_seconds": "Encode.Duration.Header.int32Seconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.int32_seconds": "Encode.Duration.Header.int32Seconds", + "encode.duration.operations.DurationClientHeaderOperations.int32_seconds_larger_unit": "Encode.Duration.Header.int32SecondsLargerUnit", + "encode.duration.aio.operations.DurationClientHeaderOperations.int32_seconds_larger_unit": "Encode.Duration.Header.int32SecondsLargerUnit", + "encode.duration.operations.DurationClientHeaderOperations.float_seconds": "Encode.Duration.Header.floatSeconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.float_seconds": "Encode.Duration.Header.floatSeconds", + "encode.duration.operations.DurationClientHeaderOperations.float_seconds_larger_unit": "Encode.Duration.Header.floatSecondsLargerUnit", + "encode.duration.aio.operations.DurationClientHeaderOperations.float_seconds_larger_unit": "Encode.Duration.Header.floatSecondsLargerUnit", + "encode.duration.operations.DurationClientHeaderOperations.float64_seconds": "Encode.Duration.Header.float64Seconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.float64_seconds": "Encode.Duration.Header.float64Seconds", + "encode.duration.operations.DurationClientHeaderOperations.int32_milliseconds": "Encode.Duration.Header.int32Milliseconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.int32_milliseconds": "Encode.Duration.Header.int32Milliseconds", + "encode.duration.operations.DurationClientHeaderOperations.int32_milliseconds_larger_unit": "Encode.Duration.Header.int32MillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientHeaderOperations.int32_milliseconds_larger_unit": "Encode.Duration.Header.int32MillisecondsLargerUnit", + "encode.duration.operations.DurationClientHeaderOperations.float_milliseconds": "Encode.Duration.Header.floatMilliseconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.float_milliseconds": "Encode.Duration.Header.floatMilliseconds", + "encode.duration.operations.DurationClientHeaderOperations.float_milliseconds_larger_unit": "Encode.Duration.Header.floatMillisecondsLargerUnit", + "encode.duration.aio.operations.DurationClientHeaderOperations.float_milliseconds_larger_unit": "Encode.Duration.Header.floatMillisecondsLargerUnit", + "encode.duration.operations.DurationClientHeaderOperations.float64_milliseconds": "Encode.Duration.Header.float64Milliseconds", + "encode.duration.aio.operations.DurationClientHeaderOperations.float64_milliseconds": "Encode.Duration.Header.float64Milliseconds", + "encode.duration.operations.DurationClientHeaderOperations.int32_milliseconds_array": "Encode.Duration.Header.int32MillisecondsArray", + "encode.duration.aio.operations.DurationClientHeaderOperations.int32_milliseconds_array": "Encode.Duration.Header.int32MillisecondsArray" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_client.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_client.py index eaa36842d9..3606f494c6 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/_client.py @@ -16,18 +16,18 @@ from ._configuration import DurationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import HeaderOperations, PropertyOperations, QueryOperations +from .operations import DurationClientHeaderOperations, DurationClientPropertyOperations, DurationClientQueryOperations class DurationClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on duration. - :ivar query: QueryOperations operations - :vartype query: encode.duration.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.duration.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.duration.operations.HeaderOperations + :ivar duration_client_query: DurationClientQueryOperations operations + :vartype duration_client_query: encode.duration.operations.DurationClientQueryOperations + :ivar duration_client_property: DurationClientPropertyOperations operations + :vartype duration_client_property: encode.duration.operations.DurationClientPropertyOperations + :ivar duration_client_header: DurationClientHeaderOperations operations + :vartype duration_client_header: encode.duration.operations.DurationClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,9 +60,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_client_query = DurationClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_property = DurationClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_header = DurationClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/_client.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/_client.py index f67866d4be..3b9690f50b 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/_client.py @@ -16,18 +16,19 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DurationClientConfiguration -from .operations import HeaderOperations, PropertyOperations, QueryOperations +from .operations import DurationClientHeaderOperations, DurationClientPropertyOperations, DurationClientQueryOperations class DurationClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on duration. - :ivar query: QueryOperations operations - :vartype query: encode.duration.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.duration.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.duration.aio.operations.HeaderOperations + :ivar duration_client_query: DurationClientQueryOperations operations + :vartype duration_client_query: encode.duration.aio.operations.DurationClientQueryOperations + :ivar duration_client_property: DurationClientPropertyOperations operations + :vartype duration_client_property: + encode.duration.aio.operations.DurationClientPropertyOperations + :ivar duration_client_header: DurationClientHeaderOperations operations + :vartype duration_client_header: encode.duration.aio.operations.DurationClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,9 +61,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_client_query = DurationClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_property = DurationClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_header = DurationClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/__init__.py index 543a675862..688ec1493a 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore -from ._operations import PropertyOperations # type: ignore -from ._operations import HeaderOperations # type: ignore +from ._operations import DurationClientQueryOperations # type: ignore +from ._operations import DurationClientPropertyOperations # type: ignore +from ._operations import DurationClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", - "PropertyOperations", - "HeaderOperations", + "DurationClientQueryOperations", + "DurationClientPropertyOperations", + "DurationClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py index 1366d7b2f9..1af951c0bd 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/aio/operations/_operations.py @@ -32,48 +32,48 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_header_default_request, - build_header_float64_milliseconds_request, - build_header_float64_seconds_request, - build_header_float_milliseconds_larger_unit_request, - build_header_float_milliseconds_request, - build_header_float_seconds_larger_unit_request, - build_header_float_seconds_request, - build_header_int32_milliseconds_array_request, - build_header_int32_milliseconds_larger_unit_request, - build_header_int32_milliseconds_request, - build_header_int32_seconds_larger_unit_request, - build_header_int32_seconds_request, - build_header_iso8601_array_request, - build_header_iso8601_request, - build_property_default_request, - build_property_float64_milliseconds_request, - build_property_float64_seconds_request, - build_property_float_milliseconds_array_request, - build_property_float_milliseconds_larger_unit_request, - build_property_float_milliseconds_request, - build_property_float_seconds_array_request, - build_property_float_seconds_larger_unit_request, - build_property_float_seconds_request, - build_property_int32_milliseconds_larger_unit_request, - build_property_int32_milliseconds_request, - build_property_int32_seconds_larger_unit_request, - build_property_int32_seconds_request, - build_property_iso8601_request, - build_query_default_request, - build_query_float64_milliseconds_request, - build_query_float64_seconds_request, - build_query_float_milliseconds_larger_unit_request, - build_query_float_milliseconds_request, - build_query_float_seconds_larger_unit_request, - build_query_float_seconds_request, - build_query_int32_milliseconds_array_request, - build_query_int32_milliseconds_larger_unit_request, - build_query_int32_milliseconds_request, - build_query_int32_seconds_array_request, - build_query_int32_seconds_larger_unit_request, - build_query_int32_seconds_request, - build_query_iso8601_request, + build_duration_client_header_default_request, + build_duration_client_header_float64_milliseconds_request, + build_duration_client_header_float64_seconds_request, + build_duration_client_header_float_milliseconds_larger_unit_request, + build_duration_client_header_float_milliseconds_request, + build_duration_client_header_float_seconds_larger_unit_request, + build_duration_client_header_float_seconds_request, + build_duration_client_header_int32_milliseconds_array_request, + build_duration_client_header_int32_milliseconds_larger_unit_request, + build_duration_client_header_int32_milliseconds_request, + build_duration_client_header_int32_seconds_larger_unit_request, + build_duration_client_header_int32_seconds_request, + build_duration_client_header_iso8601_array_request, + build_duration_client_header_iso8601_request, + build_duration_client_property_default_request, + build_duration_client_property_float64_milliseconds_request, + build_duration_client_property_float64_seconds_request, + build_duration_client_property_float_milliseconds_array_request, + build_duration_client_property_float_milliseconds_larger_unit_request, + build_duration_client_property_float_milliseconds_request, + build_duration_client_property_float_seconds_array_request, + build_duration_client_property_float_seconds_larger_unit_request, + build_duration_client_property_float_seconds_request, + build_duration_client_property_int32_milliseconds_larger_unit_request, + build_duration_client_property_int32_milliseconds_request, + build_duration_client_property_int32_seconds_larger_unit_request, + build_duration_client_property_int32_seconds_request, + build_duration_client_property_iso8601_request, + build_duration_client_query_default_request, + build_duration_client_query_float64_milliseconds_request, + build_duration_client_query_float64_seconds_request, + build_duration_client_query_float_milliseconds_larger_unit_request, + build_duration_client_query_float_milliseconds_request, + build_duration_client_query_float_seconds_larger_unit_request, + build_duration_client_query_float_seconds_request, + build_duration_client_query_int32_milliseconds_array_request, + build_duration_client_query_int32_milliseconds_larger_unit_request, + build_duration_client_query_int32_milliseconds_request, + build_duration_client_query_int32_seconds_array_request, + build_duration_client_query_int32_seconds_larger_unit_request, + build_duration_client_query_int32_seconds_request, + build_duration_client_query_iso8601_request, ) from .._configuration import DurationClientConfiguration @@ -82,14 +82,14 @@ JSON = MutableMapping[str, Any] -class QueryOperations: +class DurationClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`query` attribute. + :attr:`duration_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -122,7 +122,7 @@ async def default(self, *, input: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_duration_client_query_default_request( input=input, headers=_headers, params=_params, @@ -169,7 +169,7 @@ async def iso8601(self, *, input: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_iso8601_request( + _request = build_duration_client_query_iso8601_request( input=input, headers=_headers, params=_params, @@ -216,7 +216,7 @@ async def int32_seconds(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_request( + _request = build_duration_client_query_int32_seconds_request( input=input, headers=_headers, params=_params, @@ -263,7 +263,7 @@ async def int32_seconds_larger_unit(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_larger_unit_request( + _request = build_duration_client_query_int32_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -310,7 +310,7 @@ async def float_seconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_request( + _request = build_duration_client_query_float_seconds_request( input=input, headers=_headers, params=_params, @@ -357,7 +357,7 @@ async def float_seconds_larger_unit(self, *, input: float, **kwargs: Any) -> Non cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_larger_unit_request( + _request = build_duration_client_query_float_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -404,7 +404,7 @@ async def float64_seconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_seconds_request( + _request = build_duration_client_query_float64_seconds_request( input=input, headers=_headers, params=_params, @@ -451,7 +451,7 @@ async def int32_milliseconds(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_request( + _request = build_duration_client_query_int32_milliseconds_request( input=input, headers=_headers, params=_params, @@ -498,7 +498,7 @@ async def int32_milliseconds_larger_unit(self, *, input: int, **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_larger_unit_request( + _request = build_duration_client_query_int32_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -545,7 +545,7 @@ async def float_milliseconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_request( + _request = build_duration_client_query_float_milliseconds_request( input=input, headers=_headers, params=_params, @@ -592,7 +592,7 @@ async def float_milliseconds_larger_unit(self, *, input: float, **kwargs: Any) - cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_larger_unit_request( + _request = build_duration_client_query_float_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -639,7 +639,7 @@ async def float64_milliseconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_milliseconds_request( + _request = build_duration_client_query_float64_milliseconds_request( input=input, headers=_headers, params=_params, @@ -686,7 +686,7 @@ async def int32_seconds_array(self, *, input: list[int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_array_request( + _request = build_duration_client_query_int32_seconds_array_request( input=input, headers=_headers, params=_params, @@ -733,7 +733,7 @@ async def int32_milliseconds_array(self, *, input: list[int], **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_array_request( + _request = build_duration_client_query_int32_milliseconds_array_request( input=input, headers=_headers, params=_params, @@ -758,14 +758,14 @@ async def int32_milliseconds_array(self, *, input: list[int], **kwargs: Any) -> return cls(pipeline_response, None, {}) # type: ignore -class PropertyOperations: +class DurationClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`property` attribute. + :attr:`duration_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -856,7 +856,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_duration_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -974,7 +974,7 @@ async def iso8601( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_iso8601_request( + _request = build_duration_client_property_iso8601_request( content_type=content_type, content=_content, headers=_headers, @@ -1097,7 +1097,7 @@ async def int32_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_request( + _request = build_duration_client_property_int32_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1220,7 +1220,7 @@ async def float_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_request( + _request = build_duration_client_property_float_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1343,7 +1343,7 @@ async def float64_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_seconds_request( + _request = build_duration_client_property_float64_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1466,7 +1466,7 @@ async def int32_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_request( + _request = build_duration_client_property_int32_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1589,7 +1589,7 @@ async def float_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_request( + _request = build_duration_client_property_float_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1716,7 +1716,7 @@ async def float64_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_milliseconds_request( + _request = build_duration_client_property_float64_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1839,7 +1839,7 @@ async def float_seconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_array_request( + _request = build_duration_client_property_float_seconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -1966,7 +1966,7 @@ async def float_milliseconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_array_request( + _request = build_duration_client_property_float_milliseconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -2093,7 +2093,7 @@ async def int32_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_larger_unit_request( + _request = build_duration_client_property_int32_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2220,7 +2220,7 @@ async def float_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_larger_unit_request( + _request = build_duration_client_property_float_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2348,7 +2348,7 @@ async def int32_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_larger_unit_request( + _request = build_duration_client_property_int32_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2476,7 +2476,7 @@ async def float_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_larger_unit_request( + _request = build_duration_client_property_float_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2514,14 +2514,14 @@ async def float_milliseconds_larger_unit( return deserialized # type: ignore -class HeaderOperations: +class DurationClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`header` attribute. + :attr:`duration_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2554,7 +2554,7 @@ async def default(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_duration_client_header_default_request( duration=duration, headers=_headers, params=_params, @@ -2601,7 +2601,7 @@ async def iso8601(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_request( + _request = build_duration_client_header_iso8601_request( duration=duration, headers=_headers, params=_params, @@ -2648,7 +2648,7 @@ async def iso8601_array(self, *, duration: list[datetime.timedelta], **kwargs: A cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_array_request( + _request = build_duration_client_header_iso8601_array_request( duration=duration, headers=_headers, params=_params, @@ -2695,7 +2695,7 @@ async def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_request( + _request = build_duration_client_header_int32_seconds_request( duration=duration, headers=_headers, params=_params, @@ -2742,7 +2742,7 @@ async def int32_seconds_larger_unit(self, *, duration: int, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_larger_unit_request( + _request = build_duration_client_header_int32_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -2789,7 +2789,7 @@ async def float_seconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_request( + _request = build_duration_client_header_float_seconds_request( duration=duration, headers=_headers, params=_params, @@ -2836,7 +2836,7 @@ async def float_seconds_larger_unit(self, *, duration: float, **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_larger_unit_request( + _request = build_duration_client_header_float_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -2883,7 +2883,7 @@ async def float64_seconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_seconds_request( + _request = build_duration_client_header_float64_seconds_request( duration=duration, headers=_headers, params=_params, @@ -2930,7 +2930,7 @@ async def int32_milliseconds(self, *, duration: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_request( + _request = build_duration_client_header_int32_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -2977,7 +2977,7 @@ async def int32_milliseconds_larger_unit(self, *, duration: int, **kwargs: Any) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_larger_unit_request( + _request = build_duration_client_header_int32_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3024,7 +3024,7 @@ async def float_milliseconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_request( + _request = build_duration_client_header_float_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -3071,7 +3071,7 @@ async def float_milliseconds_larger_unit(self, *, duration: float, **kwargs: Any cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_larger_unit_request( + _request = build_duration_client_header_float_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3118,7 +3118,7 @@ async def float64_milliseconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_milliseconds_request( + _request = build_duration_client_header_float64_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -3165,7 +3165,7 @@ async def int32_milliseconds_array(self, *, duration: list[int], **kwargs: Any) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_array_request( + _request = build_duration_client_header_int32_milliseconds_array_request( duration=duration, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/__init__.py index 543a675862..688ec1493a 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/__init__.py @@ -12,18 +12,18 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore -from ._operations import PropertyOperations # type: ignore -from ._operations import HeaderOperations # type: ignore +from ._operations import DurationClientQueryOperations # type: ignore +from ._operations import DurationClientPropertyOperations # type: ignore +from ._operations import DurationClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", - "PropertyOperations", - "HeaderOperations", + "DurationClientQueryOperations", + "DurationClientPropertyOperations", + "DurationClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py index 2e893c76da..53712ada0d 100644 --- a/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-duration/encode/duration/operations/_operations.py @@ -41,7 +41,9 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, input: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_default_request( # pylint: disable=name-too-long + *, input: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -53,7 +55,9 @@ def build_query_default_request(*, input: datetime.timedelta, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_iso8601_request(*, input: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_iso8601_request( # pylint: disable=name-too-long + *, input: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -65,7 +69,9 @@ def build_query_iso8601_request(*, input: datetime.timedelta, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_request(*, input: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_seconds_request( # pylint: disable=name-too-long + *, input: int, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -77,7 +83,7 @@ def build_query_int32_seconds_request(*, input: int, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-long *, input: int, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -91,7 +97,9 @@ def build_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_seconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float_seconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -103,7 +111,7 @@ def build_query_float_seconds_request(*, input: float, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_float_seconds_larger_unit_request( # pylint: disable=name-too-long *, input: float, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -117,7 +125,9 @@ def build_query_float_seconds_larger_unit_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float64_seconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float64_seconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -129,7 +139,9 @@ def build_query_float64_seconds_request(*, input: float, **kwargs: Any) -> HttpR return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_request(*, input: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_milliseconds_request( # pylint: disable=name-too-long + *, input: int, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -141,7 +153,7 @@ def build_query_int32_milliseconds_request(*, input: int, **kwargs: Any) -> Http return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, input: int, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -155,7 +167,9 @@ def build_query_int32_milliseconds_larger_unit_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_milliseconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float_milliseconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -167,7 +181,7 @@ def build_query_float_milliseconds_request(*, input: float, **kwargs: Any) -> Ht return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, input: float, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -181,7 +195,9 @@ def build_query_float_milliseconds_larger_unit_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float64_milliseconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float64_milliseconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -193,7 +209,9 @@ def build_query_float64_milliseconds_request(*, input: float, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_array_request(*, input: list[int], **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_seconds_array_request( # pylint: disable=name-too-long + *, input: list[int], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -205,7 +223,7 @@ def build_query_int32_seconds_array_request(*, input: list[int], **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_array_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_milliseconds_array_request( # pylint: disable=name-too-long *, input: list[int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -219,7 +237,7 @@ def build_query_int32_milliseconds_array_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -236,7 +254,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_iso8601_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_iso8601_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -253,7 +271,7 @@ def build_property_iso8601_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -270,7 +288,7 @@ def build_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_float_seconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -287,7 +305,9 @@ def build_property_float_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float64_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_float64_seconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -304,7 +324,9 @@ def build_property_float64_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_int32_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -321,7 +343,9 @@ def build_property_int32_milliseconds_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -338,7 +362,9 @@ def build_property_float_milliseconds_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float64_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float64_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -355,7 +381,9 @@ def build_property_float64_milliseconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_seconds_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -372,7 +400,9 @@ def build_property_float_seconds_array_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -389,7 +419,9 @@ def build_property_float_milliseconds_array_request(**kwargs: Any) -> HttpReques return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_seconds_larger_unit_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_int32_seconds_larger_unit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -406,7 +438,9 @@ def build_property_int32_seconds_larger_unit_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_larger_unit_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_seconds_larger_unit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -423,7 +457,7 @@ def build_property_float_seconds_larger_unit_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_property_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -442,7 +476,7 @@ def build_property_int32_milliseconds_larger_unit_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -461,7 +495,9 @@ def build_property_float_milliseconds_larger_unit_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_header_default_request(*, duration: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_default_request( # pylint: disable=name-too-long + *, duration: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -473,7 +509,9 @@ def build_header_default_request(*, duration: datetime.timedelta, **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_iso8601_request(*, duration: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_iso8601_request( # pylint: disable=name-too-long + *, duration: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -485,7 +523,9 @@ def build_header_iso8601_request(*, duration: datetime.timedelta, **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_iso8601_array_request(*, duration: list[datetime.timedelta], **kwargs: Any) -> HttpRequest: +def build_duration_client_header_iso8601_array_request( # pylint: disable=name-too-long + *, duration: list[datetime.timedelta], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -497,7 +537,9 @@ def build_header_iso8601_array_request(*, duration: list[datetime.timedelta], ** return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_seconds_request(*, duration: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_int32_seconds_request( # pylint: disable=name-too-long + *, duration: int, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -509,7 +551,7 @@ def build_header_int32_seconds_request(*, duration: int, **kwargs: Any) -> HttpR return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_seconds_larger_unit_request( # pylint: disable=name-too-long *, duration: int, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -523,7 +565,9 @@ def build_header_int32_seconds_larger_unit_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_seconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float_seconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -535,7 +579,7 @@ def build_header_float_seconds_request(*, duration: float, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_float_seconds_larger_unit_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -549,7 +593,9 @@ def build_header_float_seconds_larger_unit_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float64_seconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float64_seconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -561,7 +607,9 @@ def build_header_float64_seconds_request(*, duration: float, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_request(*, duration: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_int32_milliseconds_request( # pylint: disable=name-too-long + *, duration: int, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -573,7 +621,7 @@ def build_header_int32_milliseconds_request(*, duration: int, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, duration: int, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -587,7 +635,9 @@ def build_header_int32_milliseconds_larger_unit_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_milliseconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float_milliseconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -599,7 +649,7 @@ def build_header_float_milliseconds_request(*, duration: float, **kwargs: Any) - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -613,7 +663,7 @@ def build_header_float_milliseconds_larger_unit_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float64_milliseconds_request( # pylint: disable=name-too-long +def build_duration_client_header_float64_milliseconds_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -627,7 +677,7 @@ def build_header_float64_milliseconds_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_array_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_milliseconds_array_request( # pylint: disable=name-too-long *, duration: list[int], **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -641,14 +691,14 @@ def build_header_int32_milliseconds_array_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class QueryOperations: +class DurationClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`query` attribute. + :attr:`duration_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -683,7 +733,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_duration_client_query_default_request( input=input, headers=_headers, params=_params, @@ -732,7 +782,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_iso8601_request( + _request = build_duration_client_query_iso8601_request( input=input, headers=_headers, params=_params, @@ -779,7 +829,7 @@ def int32_seconds(self, *, input: int, **kwargs: Any) -> None: # pylint: disabl cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_request( + _request = build_duration_client_query_int32_seconds_request( input=input, headers=_headers, params=_params, @@ -828,7 +878,7 @@ def int32_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_larger_unit_request( + _request = build_duration_client_query_int32_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -875,7 +925,7 @@ def float_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: disa cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_request( + _request = build_duration_client_query_float_seconds_request( input=input, headers=_headers, params=_params, @@ -924,7 +974,7 @@ def float_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_larger_unit_request( + _request = build_duration_client_query_float_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -971,7 +1021,7 @@ def float64_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_seconds_request( + _request = build_duration_client_query_float64_seconds_request( input=input, headers=_headers, params=_params, @@ -1020,7 +1070,7 @@ def int32_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_request( + _request = build_duration_client_query_int32_milliseconds_request( input=input, headers=_headers, params=_params, @@ -1069,7 +1119,7 @@ def int32_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_larger_unit_request( + _request = build_duration_client_query_int32_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -1118,7 +1168,7 @@ def float_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_request( + _request = build_duration_client_query_float_milliseconds_request( input=input, headers=_headers, params=_params, @@ -1167,7 +1217,7 @@ def float_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_larger_unit_request( + _request = build_duration_client_query_float_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -1216,7 +1266,7 @@ def float64_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_milliseconds_request( + _request = build_duration_client_query_float64_milliseconds_request( input=input, headers=_headers, params=_params, @@ -1265,7 +1315,7 @@ def int32_seconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_array_request( + _request = build_duration_client_query_int32_seconds_array_request( input=input, headers=_headers, params=_params, @@ -1314,7 +1364,7 @@ def int32_milliseconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_array_request( + _request = build_duration_client_query_int32_milliseconds_array_request( input=input, headers=_headers, params=_params, @@ -1339,14 +1389,14 @@ def int32_milliseconds_array( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class PropertyOperations: +class DurationClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`property` attribute. + :attr:`duration_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1437,7 +1487,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_duration_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1555,7 +1605,7 @@ def iso8601( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_iso8601_request( + _request = build_duration_client_property_iso8601_request( content_type=content_type, content=_content, headers=_headers, @@ -1678,7 +1728,7 @@ def int32_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_request( + _request = build_duration_client_property_int32_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1801,7 +1851,7 @@ def float_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_request( + _request = build_duration_client_property_float_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1924,7 +1974,7 @@ def float64_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_seconds_request( + _request = build_duration_client_property_float64_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -2047,7 +2097,7 @@ def int32_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_request( + _request = build_duration_client_property_int32_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -2170,7 +2220,7 @@ def float_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_request( + _request = build_duration_client_property_float_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -2297,7 +2347,7 @@ def float64_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_milliseconds_request( + _request = build_duration_client_property_float64_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -2420,7 +2470,7 @@ def float_seconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_array_request( + _request = build_duration_client_property_float_seconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -2547,7 +2597,7 @@ def float_milliseconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_array_request( + _request = build_duration_client_property_float_milliseconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -2674,7 +2724,7 @@ def int32_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_larger_unit_request( + _request = build_duration_client_property_int32_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2801,7 +2851,7 @@ def float_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_larger_unit_request( + _request = build_duration_client_property_float_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -2929,7 +2979,7 @@ def int32_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_larger_unit_request( + _request = build_duration_client_property_int32_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -3057,7 +3107,7 @@ def float_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_larger_unit_request( + _request = build_duration_client_property_float_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -3095,14 +3145,14 @@ def float_milliseconds_larger_unit( return deserialized # type: ignore -class HeaderOperations: +class DurationClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`header` attribute. + :attr:`duration_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3137,7 +3187,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_duration_client_header_default_request( duration=duration, headers=_headers, params=_params, @@ -3186,7 +3236,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_request( + _request = build_duration_client_header_iso8601_request( duration=duration, headers=_headers, params=_params, @@ -3235,7 +3285,7 @@ def iso8601_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_array_request( + _request = build_duration_client_header_iso8601_array_request( duration=duration, headers=_headers, params=_params, @@ -3282,7 +3332,7 @@ def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_request( + _request = build_duration_client_header_int32_seconds_request( duration=duration, headers=_headers, params=_params, @@ -3331,7 +3381,7 @@ def int32_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_larger_unit_request( + _request = build_duration_client_header_int32_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3380,7 +3430,7 @@ def float_seconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_request( + _request = build_duration_client_header_float_seconds_request( duration=duration, headers=_headers, params=_params, @@ -3429,7 +3479,7 @@ def float_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_larger_unit_request( + _request = build_duration_client_header_float_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3478,7 +3528,7 @@ def float64_seconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_seconds_request( + _request = build_duration_client_header_float64_seconds_request( duration=duration, headers=_headers, params=_params, @@ -3527,7 +3577,7 @@ def int32_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_request( + _request = build_duration_client_header_int32_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -3576,7 +3626,7 @@ def int32_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_larger_unit_request( + _request = build_duration_client_header_int32_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3625,7 +3675,7 @@ def float_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_request( + _request = build_duration_client_header_float_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -3674,7 +3724,7 @@ def float_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_larger_unit_request( + _request = build_duration_client_header_float_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -3723,7 +3773,7 @@ def float64_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_milliseconds_request( + _request = build_duration_client_header_float64_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -3772,7 +3822,7 @@ def int32_milliseconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_array_request( + _request = build_duration_client_header_int32_milliseconds_array_request( duration=duration, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations.py new file mode 100644 index 0000000000..685a52d20a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DurationClientTestBase, DurationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientHeaderOperations(DurationClientTestBase): + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_default(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.default( + duration="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_iso8601(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.iso8601( + duration="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_iso8601_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.iso8601_array( + duration=["1 day, 0:00:00"], + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_int32_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.int32_seconds( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.int32_seconds_larger_unit( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float_seconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float_seconds_larger_unit( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float64_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float64_seconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_int32_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.int32_milliseconds( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.int32_milliseconds_larger_unit( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float_milliseconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float_milliseconds_larger_unit( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_float64_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.float64_milliseconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_header_int32_milliseconds_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_header.int32_milliseconds_array( + duration=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations_async.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations_async.py new file mode 100644 index 0000000000..d0244f1196 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_header_operations_async.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DurationPreparer +from testpreparer_async import DurationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientHeaderOperationsAsync(DurationClientTestBaseAsync): + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_default(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.default( + duration="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_iso8601(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.iso8601( + duration="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_iso8601_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.iso8601_array( + duration=["1 day, 0:00:00"], + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_int32_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.int32_seconds( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.int32_seconds_larger_unit( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float_seconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float_seconds_larger_unit( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float64_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float64_seconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_int32_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.int32_milliseconds( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.int32_milliseconds_larger_unit( + duration=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float_milliseconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float_milliseconds_larger_unit( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_float64_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.float64_milliseconds( + duration=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_header_int32_milliseconds_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_header.int32_milliseconds_array( + duration=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations.py new file mode 100644 index 0000000000..aacc107643 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DurationClientTestBase, DurationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientPropertyOperations(DurationClientTestBase): + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_default(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.default( + body={"value": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_iso8601(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.iso8601( + body={"value": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_int32_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.int32_seconds( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_seconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float64_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float64_seconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_int32_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.int32_milliseconds( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_milliseconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float64_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float64_milliseconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_seconds_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_seconds_array( + body={"value": [0.0]}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_milliseconds_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_milliseconds_array( + body={"value": [0.0]}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.int32_seconds_larger_unit( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_seconds_larger_unit( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.int32_milliseconds_larger_unit( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_property_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_property.float_milliseconds_larger_unit( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations_async.py new file mode 100644 index 0000000000..4611db8d42 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_property_operations_async.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DurationPreparer +from testpreparer_async import DurationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientPropertyOperationsAsync(DurationClientTestBaseAsync): + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_default(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.default( + body={"value": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_iso8601(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.iso8601( + body={"value": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_int32_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.int32_seconds( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_seconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float64_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float64_seconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_int32_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.int32_milliseconds( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_milliseconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float64_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float64_milliseconds( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_seconds_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_seconds_array( + body={"value": [0.0]}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_milliseconds_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_milliseconds_array( + body={"value": [0.0]}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.int32_seconds_larger_unit( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_seconds_larger_unit( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.int32_milliseconds_larger_unit( + body={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_property_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_property.float_milliseconds_larger_unit( + body={"value": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations.py new file mode 100644 index 0000000000..2450423527 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DurationClientTestBase, DurationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientQueryOperations(DurationClientTestBase): + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_default(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.default( + input="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_iso8601(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.iso8601( + input="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_seconds( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_seconds_larger_unit( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float_seconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float_seconds_larger_unit( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float64_seconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float64_seconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_milliseconds( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_milliseconds_larger_unit( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float_milliseconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float_milliseconds_larger_unit( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_float64_milliseconds(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.float64_milliseconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_seconds_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_seconds_array( + input=[0], + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy + def test_duration_client_query_int32_milliseconds_array(self, duration_endpoint): + client = self.create_client(endpoint=duration_endpoint) + response = client.duration_client_query.int32_milliseconds_array( + input=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations_async.py b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations_async.py new file mode 100644 index 0000000000..d4983b7a01 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-duration/generated_tests/test_duration_duration_client_query_operations_async.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DurationPreparer +from testpreparer_async import DurationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDurationDurationClientQueryOperationsAsync(DurationClientTestBaseAsync): + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_default(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.default( + input="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_iso8601(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.iso8601( + input="1 day, 0:00:00", + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_seconds( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_seconds_larger_unit( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float_seconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float_seconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float_seconds_larger_unit( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float64_seconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float64_seconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_milliseconds( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_milliseconds_larger_unit( + input=0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float_milliseconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float_milliseconds_larger_unit(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float_milliseconds_larger_unit( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_float64_milliseconds(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.float64_milliseconds( + input=0.0, + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_seconds_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_seconds_array( + input=[0], + ) + + # please add some check logic here by yourself + # ... + + @DurationPreparer() + @recorded_by_proxy_async + async def test_duration_client_query_int32_milliseconds_array(self, duration_endpoint): + client = self.create_async_client(endpoint=duration_endpoint) + response = await client.duration_client_query.int32_milliseconds_array( + input=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/apiview-properties.json b/packages/typespec-python/test/azure/generated/encode-numeric/apiview-properties.json index 87e86c3bf1..5c5a7ea469 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/encode-numeric/apiview-properties.json @@ -4,11 +4,11 @@ "encode.numeric.models.SafeintAsStringProperty": "Encode.Numeric.Property.SafeintAsStringProperty", "encode.numeric.models.Uint32AsStringProperty": "Encode.Numeric.Property.Uint32AsStringProperty", "encode.numeric.models.Uint8AsStringProperty": "Encode.Numeric.Property.Uint8AsStringProperty", - "encode.numeric.operations.PropertyOperations.safeint_as_string": "Encode.Numeric.Property.safeintAsString", - "encode.numeric.aio.operations.PropertyOperations.safeint_as_string": "Encode.Numeric.Property.safeintAsString", - "encode.numeric.operations.PropertyOperations.uint32_as_string_optional": "Encode.Numeric.Property.uint32AsStringOptional", - "encode.numeric.aio.operations.PropertyOperations.uint32_as_string_optional": "Encode.Numeric.Property.uint32AsStringOptional", - "encode.numeric.operations.PropertyOperations.uint8_as_string": "Encode.Numeric.Property.uint8AsString", - "encode.numeric.aio.operations.PropertyOperations.uint8_as_string": "Encode.Numeric.Property.uint8AsString" + "encode.numeric.operations.NumericClientPropertyOperations.safeint_as_string": "Encode.Numeric.Property.safeintAsString", + "encode.numeric.aio.operations.NumericClientPropertyOperations.safeint_as_string": "Encode.Numeric.Property.safeintAsString", + "encode.numeric.operations.NumericClientPropertyOperations.uint32_as_string_optional": "Encode.Numeric.Property.uint32AsStringOptional", + "encode.numeric.aio.operations.NumericClientPropertyOperations.uint32_as_string_optional": "Encode.Numeric.Property.uint32AsStringOptional", + "encode.numeric.operations.NumericClientPropertyOperations.uint8_as_string": "Encode.Numeric.Property.uint8AsString", + "encode.numeric.aio.operations.NumericClientPropertyOperations.uint8_as_string": "Encode.Numeric.Property.uint8AsString" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_client.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_client.py index 72bca37699..ad9528b07c 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/_client.py @@ -16,14 +16,14 @@ from ._configuration import NumericClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import PropertyOperations +from .operations import NumericClientPropertyOperations class NumericClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on integer. - :ivar property: PropertyOperations operations - :vartype property: encode.numeric.operations.PropertyOperations + :ivar numeric_client_property: NumericClientPropertyOperations operations + :vartype numeric_client_property: encode.numeric.operations.NumericClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.numeric_client_property = NumericClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/_client.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/_client.py index abe2021768..6f727c7adc 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/_client.py @@ -16,14 +16,14 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NumericClientConfiguration -from .operations import PropertyOperations +from .operations import NumericClientPropertyOperations class NumericClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on integer. - :ivar property: PropertyOperations operations - :vartype property: encode.numeric.aio.operations.PropertyOperations + :ivar numeric_client_property: NumericClientPropertyOperations operations + :vartype numeric_client_property: encode.numeric.aio.operations.NumericClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.numeric_client_property = NumericClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/__init__.py index 22f1107401..140b6af109 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import NumericClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "NumericClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py index 3fb84fd206..e2c5e0cf43 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/aio/operations/_operations.py @@ -30,9 +30,9 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_property_safeint_as_string_request, - build_property_uint32_as_string_optional_request, - build_property_uint8_as_string_request, + build_numeric_client_property_safeint_as_string_request, + build_numeric_client_property_uint32_as_string_optional_request, + build_numeric_client_property_uint8_as_string_request, ) from .._configuration import NumericClientConfiguration @@ -41,14 +41,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class NumericClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.numeric.aio.NumericClient`'s - :attr:`property` attribute. + :attr:`numeric_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -139,7 +139,7 @@ async def safeint_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_safeint_as_string_request( + _request = build_numeric_client_property_safeint_as_string_request( content_type=content_type, content=_content, headers=_headers, @@ -257,7 +257,7 @@ async def uint32_as_string_optional( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint32_as_string_optional_request( + _request = build_numeric_client_property_uint32_as_string_optional_request( content_type=content_type, content=_content, headers=_headers, @@ -375,7 +375,7 @@ async def uint8_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint8_as_string_request( + _request = build_numeric_client_property_uint8_as_string_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/__init__.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/__init__.py index 22f1107401..140b6af109 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import NumericClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "NumericClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py index 82b7d88f7b..e1b1c44876 100644 --- a/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/encode-numeric/encode/numeric/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_property_safeint_as_string_request(**kwargs: Any) -> HttpRequest: +def build_numeric_client_property_safeint_as_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -56,7 +58,9 @@ def build_property_safeint_as_string_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_uint32_as_string_optional_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_numeric_client_property_uint32_as_string_optional_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -73,7 +77,9 @@ def build_property_uint32_as_string_optional_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_uint8_as_string_request(**kwargs: Any) -> HttpRequest: +def build_numeric_client_property_uint8_as_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,14 +96,14 @@ def build_property_uint8_as_string_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class NumericClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.numeric.NumericClient`'s - :attr:`property` attribute. + :attr:`numeric_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -188,7 +194,7 @@ def safeint_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_safeint_as_string_request( + _request = build_numeric_client_property_safeint_as_string_request( content_type=content_type, content=_content, headers=_headers, @@ -306,7 +312,7 @@ def uint32_as_string_optional( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint32_as_string_optional_request( + _request = build_numeric_client_property_uint32_as_string_optional_request( content_type=content_type, content=_content, headers=_headers, @@ -424,7 +430,7 @@ def uint8_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint8_as_string_request( + _request = build_numeric_client_property_uint8_as_string_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations.py b/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations.py new file mode 100644 index 0000000000..99662b06e5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NumericClientTestBase, NumericPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNumericNumericClientPropertyOperations(NumericClientTestBase): + @NumericPreparer() + @recorded_by_proxy + def test_numeric_client_property_safeint_as_string(self, numeric_endpoint): + client = self.create_client(endpoint=numeric_endpoint) + response = client.numeric_client_property.safeint_as_string( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @NumericPreparer() + @recorded_by_proxy + def test_numeric_client_property_uint32_as_string_optional(self, numeric_endpoint): + client = self.create_client(endpoint=numeric_endpoint) + response = client.numeric_client_property.uint32_as_string_optional( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @NumericPreparer() + @recorded_by_proxy + def test_numeric_client_property_uint8_as_string(self, numeric_endpoint): + client = self.create_client(endpoint=numeric_endpoint) + response = client.numeric_client_property.uint8_as_string( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations_async.py new file mode 100644 index 0000000000..a29cdc2aa1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/encode-numeric/generated_tests/test_numeric_numeric_client_property_operations_async.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NumericPreparer +from testpreparer_async import NumericClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNumericNumericClientPropertyOperationsAsync(NumericClientTestBaseAsync): + @NumericPreparer() + @recorded_by_proxy_async + async def test_numeric_client_property_safeint_as_string(self, numeric_endpoint): + client = self.create_async_client(endpoint=numeric_endpoint) + response = await client.numeric_client_property.safeint_as_string( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @NumericPreparer() + @recorded_by_proxy_async + async def test_numeric_client_property_uint32_as_string_optional(self, numeric_endpoint): + client = self.create_async_client(endpoint=numeric_endpoint) + response = await client.numeric_client_property.uint32_as_string_optional( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... + + @NumericPreparer() + @recorded_by_proxy_async + async def test_numeric_client_property_uint8_as_string(self, numeric_endpoint): + client = self.create_async_client(endpoint=numeric_endpoint) + response = await client.numeric_client_property.uint8_as_string( + value={"value": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/apiview-properties.json b/packages/typespec-python/test/azure/generated/parameters-basic/apiview-properties.json index 3aa04a7ea1..7eca9a4168 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/parameters-basic/apiview-properties.json @@ -2,9 +2,9 @@ "CrossLanguagePackageId": "Parameters.Basic", "CrossLanguageDefinitionId": { "parameters.basic.models.User": "Parameters.Basic.ExplicitBody.User", - "parameters.basic.operations.ExplicitBodyOperations.simple": "Parameters.Basic.ExplicitBody.simple", - "parameters.basic.aio.operations.ExplicitBodyOperations.simple": "Parameters.Basic.ExplicitBody.simple", - "parameters.basic.operations.ImplicitBodyOperations.simple": "Parameters.Basic.ImplicitBody.simple", - "parameters.basic.aio.operations.ImplicitBodyOperations.simple": "Parameters.Basic.ImplicitBody.simple" + "parameters.basic.operations.BasicClientExplicitBodyOperations.simple": "Parameters.Basic.ExplicitBody.simple", + "parameters.basic.aio.operations.BasicClientExplicitBodyOperations.simple": "Parameters.Basic.ExplicitBody.simple", + "parameters.basic.operations.BasicClientImplicitBodyOperations.simple": "Parameters.Basic.ImplicitBody.simple", + "parameters.basic.aio.operations.BasicClientImplicitBodyOperations.simple": "Parameters.Basic.ImplicitBody.simple" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations.py new file mode 100644 index 0000000000..89a142371a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BasicClientTestBase, BasicPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBasicBasicClientExplicitBodyOperations(BasicClientTestBase): + @BasicPreparer() + @recorded_by_proxy + def test_basic_client_explicit_body_simple(self, basic_endpoint): + client = self.create_client(endpoint=basic_endpoint) + response = client.basic_client_explicit_body.simple( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations_async.py new file mode 100644 index 0000000000..0fb05604f8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_explicit_body_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BasicPreparer +from testpreparer_async import BasicClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBasicBasicClientExplicitBodyOperationsAsync(BasicClientTestBaseAsync): + @BasicPreparer() + @recorded_by_proxy_async + async def test_basic_client_explicit_body_simple(self, basic_endpoint): + client = self.create_async_client(endpoint=basic_endpoint) + response = await client.basic_client_explicit_body.simple( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations.py new file mode 100644 index 0000000000..1a69471d99 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BasicClientTestBase, BasicPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBasicBasicClientImplicitBodyOperations(BasicClientTestBase): + @BasicPreparer() + @recorded_by_proxy + def test_basic_client_implicit_body_simple(self, basic_endpoint): + client = self.create_client(endpoint=basic_endpoint) + response = client.basic_client_implicit_body.simple( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations_async.py new file mode 100644 index 0000000000..ef05192780 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-basic/generated_tests/test_basic_basic_client_implicit_body_operations_async.py @@ -0,0 +1,26 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BasicPreparer +from testpreparer_async import BasicClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBasicBasicClientImplicitBodyOperationsAsync(BasicClientTestBaseAsync): + @BasicPreparer() + @recorded_by_proxy_async + async def test_basic_client_implicit_body_simple(self, basic_endpoint): + client = self.create_async_client(endpoint=basic_endpoint) + response = await client.basic_client_implicit_body.simple( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_client.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_client.py index a7ec55a26d..29c4cb6140 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/_client.py @@ -16,16 +16,18 @@ from ._configuration import BasicClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ExplicitBodyOperations, ImplicitBodyOperations +from .operations import BasicClientExplicitBodyOperations, BasicClientImplicitBodyOperations class BasicClient: # pylint: disable=client-accepts-api-version-keyword """Test for basic parameters cases. - :ivar explicit_body: ExplicitBodyOperations operations - :vartype explicit_body: parameters.basic.operations.ExplicitBodyOperations - :ivar implicit_body: ImplicitBodyOperations operations - :vartype implicit_body: parameters.basic.operations.ImplicitBodyOperations + :ivar basic_client_explicit_body: BasicClientExplicitBodyOperations operations + :vartype basic_client_explicit_body: + parameters.basic.operations.BasicClientExplicitBodyOperations + :ivar basic_client_implicit_body: BasicClientImplicitBodyOperations operations + :vartype basic_client_implicit_body: + parameters.basic.operations.BasicClientImplicitBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.explicit_body = ExplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.implicit_body = ImplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.basic_client_explicit_body = BasicClientExplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.basic_client_implicit_body = BasicClientImplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/_client.py index 37dde67925..791377e5c0 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/_client.py @@ -16,16 +16,18 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import BasicClientConfiguration -from .operations import ExplicitBodyOperations, ImplicitBodyOperations +from .operations import BasicClientExplicitBodyOperations, BasicClientImplicitBodyOperations class BasicClient: # pylint: disable=client-accepts-api-version-keyword """Test for basic parameters cases. - :ivar explicit_body: ExplicitBodyOperations operations - :vartype explicit_body: parameters.basic.aio.operations.ExplicitBodyOperations - :ivar implicit_body: ImplicitBodyOperations operations - :vartype implicit_body: parameters.basic.aio.operations.ImplicitBodyOperations + :ivar basic_client_explicit_body: BasicClientExplicitBodyOperations operations + :vartype basic_client_explicit_body: + parameters.basic.aio.operations.BasicClientExplicitBodyOperations + :ivar basic_client_implicit_body: BasicClientImplicitBodyOperations operations + :vartype basic_client_implicit_body: + parameters.basic.aio.operations.BasicClientImplicitBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.explicit_body = ExplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.implicit_body = ImplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.basic_client_explicit_body = BasicClientExplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.basic_client_implicit_body = BasicClientImplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/__init__.py index e6d8ddd24a..f112f2db55 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExplicitBodyOperations # type: ignore -from ._operations import ImplicitBodyOperations # type: ignore +from ._operations import BasicClientExplicitBodyOperations # type: ignore +from ._operations import BasicClientImplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExplicitBodyOperations", - "ImplicitBodyOperations", + "BasicClientExplicitBodyOperations", + "BasicClientImplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py index 7b64ea5c88..167278d9cd 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/aio/operations/_operations.py @@ -27,7 +27,10 @@ from ... import models as _models from ..._utils.model_base import SdkJSONEncoder from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_explicit_body_simple_request, build_implicit_body_simple_request +from ...operations._operations import ( + build_basic_client_explicit_body_simple_request, + build_basic_client_implicit_body_simple_request, +) from .._configuration import BasicClientConfiguration JSON = MutableMapping[str, Any] @@ -36,14 +39,14 @@ _Unset: Any = object() -class ExplicitBodyOperations: +class BasicClientExplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.aio.BasicClient`'s - :attr:`explicit_body` attribute. + :attr:`basic_client_explicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -126,7 +129,7 @@ async def simple(self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_explicit_body_simple_request( + _request = build_basic_client_explicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, @@ -152,14 +155,14 @@ async def simple(self, body: Union[_models.User, JSON, IO[bytes]], **kwargs: Any return cls(pipeline_response, None, {}) # type: ignore -class ImplicitBodyOperations: +class BasicClientImplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.aio.BasicClient`'s - :attr:`implicit_body` attribute. + :attr:`basic_client_implicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -249,7 +252,7 @@ async def simple(self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Un else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_implicit_body_simple_request( + _request = build_basic_client_implicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/__init__.py index e6d8ddd24a..f112f2db55 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExplicitBodyOperations # type: ignore -from ._operations import ImplicitBodyOperations # type: ignore +from ._operations import BasicClientExplicitBodyOperations # type: ignore +from ._operations import BasicClientImplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExplicitBodyOperations", - "ImplicitBodyOperations", + "BasicClientExplicitBodyOperations", + "BasicClientImplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py index 52ad8a9b5f..e69fae7314 100644 --- a/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-basic/parameters/basic/operations/_operations.py @@ -38,7 +38,7 @@ _SERIALIZER.client_side_validation = False -def build_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: +def build_basic_client_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -52,7 +52,7 @@ def build_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: +def build_basic_client_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -66,14 +66,14 @@ def build_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ExplicitBodyOperations: +class BasicClientExplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.BasicClient`'s - :attr:`explicit_body` attribute. + :attr:`basic_client_explicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -158,7 +158,7 @@ def simple( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_explicit_body_simple_request( + _request = build_basic_client_explicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, @@ -184,14 +184,14 @@ def simple( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ImplicitBodyOperations: +class BasicClientImplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.BasicClient`'s - :attr:`implicit_body` attribute. + :attr:`basic_client_implicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -283,7 +283,7 @@ def simple( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_implicit_body_simple_request( + _request = build_basic_client_implicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/apiview-properties.json b/packages/typespec-python/test/azure/generated/parameters-body-optionality/apiview-properties.json index e293789def..bcf4532a8c 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/apiview-properties.json @@ -2,10 +2,10 @@ "CrossLanguagePackageId": "Parameters.BodyOptionality", "CrossLanguageDefinitionId": { "parameters.bodyoptionality.models.BodyModel": "Parameters.BodyOptionality.BodyModel", - "parameters.bodyoptionality.operations.OptionalExplicitOperations.set": "Parameters.BodyOptionality.OptionalExplicit.set", - "parameters.bodyoptionality.aio.operations.OptionalExplicitOperations.set": "Parameters.BodyOptionality.OptionalExplicit.set", - "parameters.bodyoptionality.operations.OptionalExplicitOperations.omit": "Parameters.BodyOptionality.OptionalExplicit.omit", - "parameters.bodyoptionality.aio.operations.OptionalExplicitOperations.omit": "Parameters.BodyOptionality.OptionalExplicit.omit", + "parameters.bodyoptionality.operations.BodyOptionalityClientOptionalExplicitOperations.set": "Parameters.BodyOptionality.OptionalExplicit.set", + "parameters.bodyoptionality.aio.operations.BodyOptionalityClientOptionalExplicitOperations.set": "Parameters.BodyOptionality.OptionalExplicit.set", + "parameters.bodyoptionality.operations.BodyOptionalityClientOptionalExplicitOperations.omit": "Parameters.BodyOptionality.OptionalExplicit.omit", + "parameters.bodyoptionality.aio.operations.BodyOptionalityClientOptionalExplicitOperations.omit": "Parameters.BodyOptionality.OptionalExplicit.omit", "parameters.bodyoptionality.BodyOptionalityClient.required_explicit": "Parameters.BodyOptionality.requiredExplicit", "parameters.bodyoptionality.aio.BodyOptionalityClient.required_explicit": "Parameters.BodyOptionality.requiredExplicit", "parameters.bodyoptionality.BodyOptionalityClient.required_implicit": "Parameters.BodyOptionality.requiredImplicit", diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations.py new file mode 100644 index 0000000000..5f6fbeb231 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import BodyOptionalityClientTestBase, BodyOptionalityPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBodyOptionalityBodyOptionalityClientOptionalExplicitOperations(BodyOptionalityClientTestBase): + @BodyOptionalityPreparer() + @recorded_by_proxy + def test_body_optionality_client_optional_explicit_set(self, bodyoptionality_endpoint): + client = self.create_client(endpoint=bodyoptionality_endpoint) + response = client.body_optionality_client_optional_explicit.set() + + # please add some check logic here by yourself + # ... + + @BodyOptionalityPreparer() + @recorded_by_proxy + def test_body_optionality_client_optional_explicit_omit(self, bodyoptionality_endpoint): + client = self.create_client(endpoint=bodyoptionality_endpoint) + response = client.body_optionality_client_optional_explicit.omit() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations_async.py new file mode 100644 index 0000000000..b396c79f7d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/generated_tests/test_body_optionality_body_optionality_client_optional_explicit_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import BodyOptionalityPreparer +from testpreparer_async import BodyOptionalityClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestBodyOptionalityBodyOptionalityClientOptionalExplicitOperationsAsync(BodyOptionalityClientTestBaseAsync): + @BodyOptionalityPreparer() + @recorded_by_proxy_async + async def test_body_optionality_client_optional_explicit_set(self, bodyoptionality_endpoint): + client = self.create_async_client(endpoint=bodyoptionality_endpoint) + response = await client.body_optionality_client_optional_explicit.set() + + # please add some check logic here by yourself + # ... + + @BodyOptionalityPreparer() + @recorded_by_proxy_async + async def test_body_optionality_client_optional_explicit_omit(self, bodyoptionality_endpoint): + client = self.create_async_client(endpoint=bodyoptionality_endpoint) + response = await client.body_optionality_client_optional_explicit.omit() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py index c7b1bb740a..d2dbca6680 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py @@ -17,7 +17,7 @@ from ._configuration import BodyOptionalityClientConfiguration from ._operations import _BodyOptionalityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer -from .optionalexplicit.operations import OptionalExplicitOperations +from .optionalexplicit.operations import BodyOptionalityClientOptionalExplicitOperations class BodyOptionalityClient( @@ -25,8 +25,10 @@ class BodyOptionalityClient( ): # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar optional_explicit: OptionalExplicitOperations operations - :vartype optional_explicit: parameters.bodyoptionality.operations.OptionalExplicitOperations + :ivar body_optionality_client_optional_explicit: + BodyOptionalityClientOptionalExplicitOperations operations + :vartype body_optionality_client_optional_explicit: + parameters.bodyoptionality.operations.BodyOptionalityClientOptionalExplicitOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -59,7 +61,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.optional_explicit = OptionalExplicitOperations( + self.body_optionality_client_optional_explicit = BodyOptionalityClientOptionalExplicitOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py index 58b2dac665..8944d0cf24 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py @@ -15,7 +15,7 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..optionalexplicit.aio.operations import OptionalExplicitOperations +from ..optionalexplicit.aio.operations import BodyOptionalityClientOptionalExplicitOperations from ._configuration import BodyOptionalityClientConfiguration from ._operations import _BodyOptionalityClientOperationsMixin @@ -25,9 +25,10 @@ class BodyOptionalityClient( ): # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar optional_explicit: OptionalExplicitOperations operations - :vartype optional_explicit: - parameters.bodyoptionality.aio.operations.OptionalExplicitOperations + :ivar body_optionality_client_optional_explicit: + BodyOptionalityClientOptionalExplicitOperations operations + :vartype body_optionality_client_optional_explicit: + parameters.bodyoptionality.aio.operations.BodyOptionalityClientOptionalExplicitOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -60,7 +61,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.optional_explicit = OptionalExplicitOperations( + self.body_optionality_client_optional_explicit = BodyOptionalityClientOptionalExplicitOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py index 83a10b55fe..536c34dfda 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import OptionalExplicitOperations # type: ignore +from ._operations import BodyOptionalityClientOptionalExplicitOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "OptionalExplicitOperations", + "BodyOptionalityClientOptionalExplicitOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py index b198869a02..cf069d1f38 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py @@ -28,21 +28,24 @@ from ...._utils.model_base import SdkJSONEncoder from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BodyOptionalityClientConfiguration -from ...operations._operations import build_optional_explicit_omit_request, build_optional_explicit_set_request +from ...operations._operations import ( + build_body_optionality_client_optional_explicit_omit_request, + build_body_optionality_client_optional_explicit_set_request, +) JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class OptionalExplicitOperations: +class BodyOptionalityClientOptionalExplicitOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.bodyoptionality.aio.BodyOptionalityClient`'s - :attr:`optional_explicit` attribute. + :attr:`body_optionality_client_optional_explicit` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +136,7 @@ async def set(self, body: Optional[Union[_models3.BodyModel, JSON, IO[bytes]]] = else: _content = None - _request = build_optional_explicit_set_request( + _request = build_body_optionality_client_optional_explicit_set_request( content_type=content_type, content=_content, headers=_headers, @@ -239,7 +242,7 @@ async def omit(self, body: Optional[Union[_models3.BodyModel, JSON, IO[bytes]]] else: _content = None - _request = build_optional_explicit_omit_request( + _request = build_body_optionality_client_optional_explicit_omit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py index 83a10b55fe..536c34dfda 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import OptionalExplicitOperations # type: ignore +from ._operations import BodyOptionalityClientOptionalExplicitOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "OptionalExplicitOperations", + "BodyOptionalityClientOptionalExplicitOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py index abb6c87c17..a207247467 100644 --- a/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py @@ -37,7 +37,9 @@ _SERIALIZER.client_side_validation = False -def build_optional_explicit_set_request(**kwargs: Any) -> HttpRequest: +def build_body_optionality_client_optional_explicit_set_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -51,7 +53,9 @@ def build_optional_explicit_set_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_optional_explicit_omit_request(**kwargs: Any) -> HttpRequest: +def build_body_optionality_client_optional_explicit_omit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -65,14 +69,14 @@ def build_optional_explicit_omit_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class OptionalExplicitOperations: +class BodyOptionalityClientOptionalExplicitOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.bodyoptionality.BodyOptionalityClient`'s - :attr:`optional_explicit` attribute. + :attr:`body_optionality_client_optional_explicit` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -163,7 +167,7 @@ def set( # pylint: disable=inconsistent-return-statements else: _content = None - _request = build_optional_explicit_set_request( + _request = build_body_optionality_client_optional_explicit_set_request( content_type=content_type, content=_content, headers=_headers, @@ -269,7 +273,7 @@ def omit( # pylint: disable=inconsistent-return-statements else: _content = None - _request = build_optional_explicit_omit_request( + _request = build_body_optionality_client_optional_explicit_omit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/apiview-properties.json b/packages/typespec-python/test/azure/generated/parameters-collection-format/apiview-properties.json index c1243e8e46..a02b0303f8 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/apiview-properties.json @@ -1,15 +1,15 @@ { "CrossLanguagePackageId": "Parameters.CollectionFormat", "CrossLanguageDefinitionId": { - "parameters.collectionformat.operations.QueryOperations.multi": "Parameters.CollectionFormat.Query.multi", - "parameters.collectionformat.aio.operations.QueryOperations.multi": "Parameters.CollectionFormat.Query.multi", - "parameters.collectionformat.operations.QueryOperations.ssv": "Parameters.CollectionFormat.Query.ssv", - "parameters.collectionformat.aio.operations.QueryOperations.ssv": "Parameters.CollectionFormat.Query.ssv", - "parameters.collectionformat.operations.QueryOperations.pipes": "Parameters.CollectionFormat.Query.pipes", - "parameters.collectionformat.aio.operations.QueryOperations.pipes": "Parameters.CollectionFormat.Query.pipes", - "parameters.collectionformat.operations.QueryOperations.csv": "Parameters.CollectionFormat.Query.csv", - "parameters.collectionformat.aio.operations.QueryOperations.csv": "Parameters.CollectionFormat.Query.csv", - "parameters.collectionformat.operations.HeaderOperations.csv": "Parameters.CollectionFormat.Header.csv", - "parameters.collectionformat.aio.operations.HeaderOperations.csv": "Parameters.CollectionFormat.Header.csv" + "parameters.collectionformat.operations.CollectionFormatClientQueryOperations.multi": "Parameters.CollectionFormat.Query.multi", + "parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations.multi": "Parameters.CollectionFormat.Query.multi", + "parameters.collectionformat.operations.CollectionFormatClientQueryOperations.ssv": "Parameters.CollectionFormat.Query.ssv", + "parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations.ssv": "Parameters.CollectionFormat.Query.ssv", + "parameters.collectionformat.operations.CollectionFormatClientQueryOperations.pipes": "Parameters.CollectionFormat.Query.pipes", + "parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations.pipes": "Parameters.CollectionFormat.Query.pipes", + "parameters.collectionformat.operations.CollectionFormatClientQueryOperations.csv": "Parameters.CollectionFormat.Query.csv", + "parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations.csv": "Parameters.CollectionFormat.Query.csv", + "parameters.collectionformat.operations.CollectionFormatClientHeaderOperations.csv": "Parameters.CollectionFormat.Header.csv", + "parameters.collectionformat.aio.operations.CollectionFormatClientHeaderOperations.csv": "Parameters.CollectionFormat.Header.csv" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations.py new file mode 100644 index 0000000000..9b0bec39df --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import CollectionFormatClientTestBase, CollectionFormatPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCollectionFormatCollectionFormatClientHeaderOperations(CollectionFormatClientTestBase): + @CollectionFormatPreparer() + @recorded_by_proxy + def test_collection_format_client_header_csv(self, collectionformat_endpoint): + client = self.create_client(endpoint=collectionformat_endpoint) + response = client.collection_format_client_header.csv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations_async.py new file mode 100644 index 0000000000..8b04931544 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_header_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import CollectionFormatPreparer +from testpreparer_async import CollectionFormatClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCollectionFormatCollectionFormatClientHeaderOperationsAsync(CollectionFormatClientTestBaseAsync): + @CollectionFormatPreparer() + @recorded_by_proxy_async + async def test_collection_format_client_header_csv(self, collectionformat_endpoint): + client = self.create_async_client(endpoint=collectionformat_endpoint) + response = await client.collection_format_client_header.csv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations.py new file mode 100644 index 0000000000..8713ab4156 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import CollectionFormatClientTestBase, CollectionFormatPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCollectionFormatCollectionFormatClientQueryOperations(CollectionFormatClientTestBase): + @CollectionFormatPreparer() + @recorded_by_proxy + def test_collection_format_client_query_multi(self, collectionformat_endpoint): + client = self.create_client(endpoint=collectionformat_endpoint) + response = client.collection_format_client_query.multi( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy + def test_collection_format_client_query_ssv(self, collectionformat_endpoint): + client = self.create_client(endpoint=collectionformat_endpoint) + response = client.collection_format_client_query.ssv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy + def test_collection_format_client_query_pipes(self, collectionformat_endpoint): + client = self.create_client(endpoint=collectionformat_endpoint) + response = client.collection_format_client_query.pipes( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy + def test_collection_format_client_query_csv(self, collectionformat_endpoint): + client = self.create_client(endpoint=collectionformat_endpoint) + response = client.collection_format_client_query.csv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations_async.py new file mode 100644 index 0000000000..d353b989de --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/generated_tests/test_collection_format_collection_format_client_query_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import CollectionFormatPreparer +from testpreparer_async import CollectionFormatClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCollectionFormatCollectionFormatClientQueryOperationsAsync(CollectionFormatClientTestBaseAsync): + @CollectionFormatPreparer() + @recorded_by_proxy_async + async def test_collection_format_client_query_multi(self, collectionformat_endpoint): + client = self.create_async_client(endpoint=collectionformat_endpoint) + response = await client.collection_format_client_query.multi( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy_async + async def test_collection_format_client_query_ssv(self, collectionformat_endpoint): + client = self.create_async_client(endpoint=collectionformat_endpoint) + response = await client.collection_format_client_query.ssv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy_async + async def test_collection_format_client_query_pipes(self, collectionformat_endpoint): + client = self.create_async_client(endpoint=collectionformat_endpoint) + response = await client.collection_format_client_query.pipes( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... + + @CollectionFormatPreparer() + @recorded_by_proxy_async + async def test_collection_format_client_query_csv(self, collectionformat_endpoint): + client = self.create_async_client(endpoint=collectionformat_endpoint) + response = await client.collection_format_client_query.csv( + colors=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_client.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_client.py index bd0638069d..7e6590c203 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/_client.py @@ -16,17 +16,19 @@ from ._configuration import CollectionFormatClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .query.operations import QueryOperations +from .header.operations import CollectionFormatClientHeaderOperations +from .query.operations import CollectionFormatClientQueryOperations class CollectionFormatClient: # pylint: disable=client-accepts-api-version-keyword """Test for collectionFormat. - :ivar query: QueryOperations operations - :vartype query: parameters.collectionformat.operations.QueryOperations - :ivar header: HeaderOperations operations - :vartype header: parameters.collectionformat.operations.HeaderOperations + :ivar collection_format_client_query: CollectionFormatClientQueryOperations operations + :vartype collection_format_client_query: + parameters.collectionformat.operations.CollectionFormatClientQueryOperations + :ivar collection_format_client_header: CollectionFormatClientHeaderOperations operations + :vartype collection_format_client_header: + parameters.collectionformat.operations.CollectionFormatClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -59,8 +61,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_format_client_query = CollectionFormatClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_format_client_header = CollectionFormatClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py index bb984ca39e..18535a5569 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py @@ -15,18 +15,20 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..query.aio.operations import QueryOperations +from ..header.aio.operations import CollectionFormatClientHeaderOperations +from ..query.aio.operations import CollectionFormatClientQueryOperations from ._configuration import CollectionFormatClientConfiguration class CollectionFormatClient: # pylint: disable=client-accepts-api-version-keyword """Test for collectionFormat. - :ivar query: QueryOperations operations - :vartype query: parameters.collectionformat.aio.operations.QueryOperations - :ivar header: HeaderOperations operations - :vartype header: parameters.collectionformat.aio.operations.HeaderOperations + :ivar collection_format_client_query: CollectionFormatClientQueryOperations operations + :vartype collection_format_client_query: + parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations + :ivar collection_format_client_header: CollectionFormatClientHeaderOperations operations + :vartype collection_format_client_header: + parameters.collectionformat.aio.operations.CollectionFormatClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -59,8 +61,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_format_client_query = CollectionFormatClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_format_client_header = CollectionFormatClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py index 1ab30f6026..e184aa908a 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import CollectionFormatClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "CollectionFormatClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py index 41028ef06b..8935001641 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py @@ -23,20 +23,20 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import CollectionFormatClientConfiguration -from ...operations._operations import build_header_csv_request +from ...operations._operations import build_collection_format_client_header_csv_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class CollectionFormatClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.aio.CollectionFormatClient`'s - :attr:`header` attribute. + :attr:`collection_format_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,7 +69,7 @@ async def csv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_csv_request( + _request = build_collection_format_client_header_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py index 1ab30f6026..e184aa908a 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import CollectionFormatClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "CollectionFormatClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py index 19fb0ff47d..a5b6d29ff5 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_header_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_header_csv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -44,14 +46,14 @@ def build_header_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class CollectionFormatClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.CollectionFormatClient`'s - :attr:`header` attribute. + :attr:`collection_format_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,7 +86,7 @@ def csv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_csv_request( + _request = build_collection_format_client_header_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py index 97d3de4f9b..26c07071dc 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import CollectionFormatClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "CollectionFormatClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py index b790eed267..fb8ab002d2 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py @@ -24,24 +24,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import CollectionFormatClientConfiguration from ...operations._operations import ( - build_query_csv_request, - build_query_multi_request, - build_query_pipes_request, - build_query_ssv_request, + build_collection_format_client_query_csv_request, + build_collection_format_client_query_multi_request, + build_collection_format_client_query_pipes_request, + build_collection_format_client_query_ssv_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class CollectionFormatClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.aio.CollectionFormatClient`'s - :attr:`query` attribute. + :attr:`collection_format_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -74,7 +74,7 @@ async def multi(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_multi_request( + _request = build_collection_format_client_query_multi_request( colors=colors, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def ssv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_ssv_request( + _request = build_collection_format_client_query_ssv_request( colors=colors, headers=_headers, params=_params, @@ -168,7 +168,7 @@ async def pipes(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_pipes_request( + _request = build_collection_format_client_query_pipes_request( colors=colors, headers=_headers, params=_params, @@ -215,7 +215,7 @@ async def csv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_csv_request( + _request = build_collection_format_client_query_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py index 97d3de4f9b..26c07071dc 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import CollectionFormatClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "CollectionFormatClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py index e55817bfc1..e078315fb8 100644 --- a/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_query_multi_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_multi_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -44,7 +46,9 @@ def build_query_multi_request(*, colors: list[str], **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_ssv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_ssv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -56,7 +60,9 @@ def build_query_ssv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_pipes_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_pipes_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -68,7 +74,9 @@ def build_query_pipes_request(*, colors: list[str], **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_csv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -80,14 +88,14 @@ def build_query_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class CollectionFormatClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.CollectionFormatClient`'s - :attr:`query` attribute. + :attr:`collection_format_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -120,7 +128,7 @@ def multi(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_multi_request( + _request = build_collection_format_client_query_multi_request( colors=colors, headers=_headers, params=_params, @@ -167,7 +175,7 @@ def ssv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_ssv_request( + _request = build_collection_format_client_query_ssv_request( colors=colors, headers=_headers, params=_params, @@ -214,7 +222,7 @@ def pipes(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_pipes_request( + _request = build_collection_format_client_query_pipes_request( colors=colors, headers=_headers, params=_params, @@ -261,7 +269,7 @@ def csv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_csv_request( + _request = build_collection_format_client_query_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-query/apiview-properties.json b/packages/typespec-python/test/azure/generated/parameters-query/apiview-properties.json index e05019435d..f4b314e264 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/parameters-query/apiview-properties.json @@ -1,7 +1,7 @@ { "CrossLanguagePackageId": "Parameters.Query", "CrossLanguageDefinitionId": { - "parameters.query.operations.ConstantOperations.post": "Parameters.Query.Constant.post", - "parameters.query.aio.operations.ConstantOperations.post": "Parameters.Query.Constant.post" + "parameters.query.operations.QueryClientConstantOperations.post": "Parameters.Query.Constant.post", + "parameters.query.aio.operations.QueryClientConstantOperations.post": "Parameters.Query.Constant.post" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations.py b/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations.py new file mode 100644 index 0000000000..4529359643 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import QueryClientTestBase, QueryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestQueryQueryClientConstantOperations(QueryClientTestBase): + @QueryPreparer() + @recorded_by_proxy + def test_query_client_constant_post(self, query_endpoint): + client = self.create_client(endpoint=query_endpoint) + response = client.query_client_constant.post( + query_param="constantValue", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations_async.py new file mode 100644 index 0000000000..e16396a4af --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-query/generated_tests/test_query_query_client_constant_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import QueryPreparer +from testpreparer_async import QueryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestQueryQueryClientConstantOperationsAsync(QueryClientTestBaseAsync): + @QueryPreparer() + @recorded_by_proxy_async + async def test_query_client_constant_post(self, query_endpoint): + client = self.create_async_client(endpoint=query_endpoint) + response = await client.query_client_constant.post( + query_param="constantValue", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/_client.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/_client.py index e5b151a63f..dca6ec6069 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/_client.py @@ -16,14 +16,14 @@ from ._configuration import QueryClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ConstantOperations +from .operations import QueryClientConstantOperations class QueryClient: # pylint: disable=client-accepts-api-version-keyword """Test for query parameter cases. - :ivar constant: ConstantOperations operations - :vartype constant: parameters.query.operations.ConstantOperations + :ivar query_client_constant: QueryClientConstantOperations operations + :vartype query_client_constant: parameters.query.operations.QueryClientConstantOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.constant = ConstantOperations(self._client, self._config, self._serialize, self._deserialize) + self.query_client_constant = QueryClientConstantOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/_client.py index f5dff68396..37ae431b11 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/_client.py @@ -16,14 +16,14 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import QueryClientConfiguration -from .operations import ConstantOperations +from .operations import QueryClientConstantOperations class QueryClient: # pylint: disable=client-accepts-api-version-keyword """Test for query parameter cases. - :ivar constant: ConstantOperations operations - :vartype constant: parameters.query.aio.operations.ConstantOperations + :ivar query_client_constant: QueryClientConstantOperations operations + :vartype query_client_constant: parameters.query.aio.operations.QueryClientConstantOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.constant = ConstantOperations(self._client, self._config, self._serialize, self._deserialize) + self.query_client_constant = QueryClientConstantOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/__init__.py index 8f5275fd5d..55005b0e28 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ConstantOperations # type: ignore +from ._operations import QueryClientConstantOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ConstantOperations", + "QueryClientConstantOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/_operations.py index 8ff087080f..e0b5ab1757 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/aio/operations/_operations.py @@ -22,21 +22,21 @@ from azure.core.tracing.decorator_async import distributed_trace_async from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_constant_post_request +from ...operations._operations import build_query_client_constant_post_request from .._configuration import QueryClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ConstantOperations: +class QueryClientConstantOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.query.aio.QueryClient`'s - :attr:`constant` attribute. + :attr:`query_client_constant` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ async def post(self, **kwargs: Any) -> None: query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_constant_post_request( + _request = build_query_client_constant_post_request( query_param=query_param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/__init__.py index 8f5275fd5d..55005b0e28 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ConstantOperations # type: ignore +from ._operations import QueryClientConstantOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ConstantOperations", + "QueryClientConstantOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/_operations.py index 7bd4633fad..4ffc268192 100644 --- a/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-query/parameters/query/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_constant_post_request(**kwargs: Any) -> HttpRequest: +def build_query_client_constant_post_request(**kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) @@ -45,14 +45,14 @@ def build_constant_post_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -class ConstantOperations: +class QueryClientConstantOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.query.QueryClient`'s - :attr:`constant` attribute. + :attr:`query_client_constant` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,7 +84,7 @@ def post(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_constant_post_request( + _request = build_query_client_constant_post_request( query_param=query_param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/apiview-properties.json b/packages/typespec-python/test/azure/generated/parameters-spread/apiview-properties.json index fc44feff3d..61220ee1b9 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/parameters-spread/apiview-properties.json @@ -2,25 +2,25 @@ "CrossLanguagePackageId": "Parameters.Spread", "CrossLanguageDefinitionId": { "parameters.spread.models.BodyParameter": "Parameters.Spread.Model.BodyParameter", - "parameters.spread.operations.ModelOperations.spread_as_request_body": "Parameters.Spread.Model.spreadAsRequestBody", - "parameters.spread.aio.operations.ModelOperations.spread_as_request_body": "Parameters.Spread.Model.spreadAsRequestBody", - "parameters.spread.operations.ModelOperations.spread_composite_request_only_with_body": "Parameters.Spread.Model.spreadCompositeRequestOnlyWithBody", - "parameters.spread.aio.operations.ModelOperations.spread_composite_request_only_with_body": "Parameters.Spread.Model.spreadCompositeRequestOnlyWithBody", - "parameters.spread.operations.ModelOperations.spread_composite_request_without_body": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody", - "parameters.spread.aio.operations.ModelOperations.spread_composite_request_without_body": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody", - "parameters.spread.operations.ModelOperations.spread_composite_request": "Parameters.Spread.Model.spreadCompositeRequest", - "parameters.spread.aio.operations.ModelOperations.spread_composite_request": "Parameters.Spread.Model.spreadCompositeRequest", - "parameters.spread.operations.ModelOperations.spread_composite_request_mix": "Parameters.Spread.Model.spreadCompositeRequestMix", - "parameters.spread.aio.operations.ModelOperations.spread_composite_request_mix": "Parameters.Spread.Model.spreadCompositeRequestMix", - "parameters.spread.operations.AliasOperations.spread_as_request_body": "Parameters.Spread.Alias.spreadAsRequestBody", - "parameters.spread.aio.operations.AliasOperations.spread_as_request_body": "Parameters.Spread.Alias.spreadAsRequestBody", - "parameters.spread.operations.AliasOperations.spread_parameter_with_inner_model": "Parameters.Spread.Alias.spreadParameterWithInnerModel", - "parameters.spread.aio.operations.AliasOperations.spread_parameter_with_inner_model": "Parameters.Spread.Alias.spreadParameterWithInnerModel", - "parameters.spread.operations.AliasOperations.spread_as_request_parameter": "Parameters.Spread.Alias.spreadAsRequestParameter", - "parameters.spread.aio.operations.AliasOperations.spread_as_request_parameter": "Parameters.Spread.Alias.spreadAsRequestParameter", - "parameters.spread.operations.AliasOperations.spread_with_multiple_parameters": "Parameters.Spread.Alias.spreadWithMultipleParameters", - "parameters.spread.aio.operations.AliasOperations.spread_with_multiple_parameters": "Parameters.Spread.Alias.spreadWithMultipleParameters", - "parameters.spread.operations.AliasOperations.spread_parameter_with_inner_alias": "Parameters.Spread.Alias.spreadParameterWithInnerAlias", - "parameters.spread.aio.operations.AliasOperations.spread_parameter_with_inner_alias": "Parameters.Spread.Alias.spreadParameterWithInnerAlias" + "parameters.spread.operations.SpreadClientModelOperations.spread_as_request_body": "Parameters.Spread.Model.spreadAsRequestBody", + "parameters.spread.aio.operations.SpreadClientModelOperations.spread_as_request_body": "Parameters.Spread.Model.spreadAsRequestBody", + "parameters.spread.operations.SpreadClientModelOperations.spread_composite_request_only_with_body": "Parameters.Spread.Model.spreadCompositeRequestOnlyWithBody", + "parameters.spread.aio.operations.SpreadClientModelOperations.spread_composite_request_only_with_body": "Parameters.Spread.Model.spreadCompositeRequestOnlyWithBody", + "parameters.spread.operations.SpreadClientModelOperations.spread_composite_request_without_body": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody", + "parameters.spread.aio.operations.SpreadClientModelOperations.spread_composite_request_without_body": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody", + "parameters.spread.operations.SpreadClientModelOperations.spread_composite_request": "Parameters.Spread.Model.spreadCompositeRequest", + "parameters.spread.aio.operations.SpreadClientModelOperations.spread_composite_request": "Parameters.Spread.Model.spreadCompositeRequest", + "parameters.spread.operations.SpreadClientModelOperations.spread_composite_request_mix": "Parameters.Spread.Model.spreadCompositeRequestMix", + "parameters.spread.aio.operations.SpreadClientModelOperations.spread_composite_request_mix": "Parameters.Spread.Model.spreadCompositeRequestMix", + "parameters.spread.operations.SpreadClientAliasOperations.spread_as_request_body": "Parameters.Spread.Alias.spreadAsRequestBody", + "parameters.spread.aio.operations.SpreadClientAliasOperations.spread_as_request_body": "Parameters.Spread.Alias.spreadAsRequestBody", + "parameters.spread.operations.SpreadClientAliasOperations.spread_parameter_with_inner_model": "Parameters.Spread.Alias.spreadParameterWithInnerModel", + "parameters.spread.aio.operations.SpreadClientAliasOperations.spread_parameter_with_inner_model": "Parameters.Spread.Alias.spreadParameterWithInnerModel", + "parameters.spread.operations.SpreadClientAliasOperations.spread_as_request_parameter": "Parameters.Spread.Alias.spreadAsRequestParameter", + "parameters.spread.aio.operations.SpreadClientAliasOperations.spread_as_request_parameter": "Parameters.Spread.Alias.spreadAsRequestParameter", + "parameters.spread.operations.SpreadClientAliasOperations.spread_with_multiple_parameters": "Parameters.Spread.Alias.spreadWithMultipleParameters", + "parameters.spread.aio.operations.SpreadClientAliasOperations.spread_with_multiple_parameters": "Parameters.Spread.Alias.spreadWithMultipleParameters", + "parameters.spread.operations.SpreadClientAliasOperations.spread_parameter_with_inner_alias": "Parameters.Spread.Alias.spreadParameterWithInnerAlias", + "parameters.spread.aio.operations.SpreadClientAliasOperations.spread_parameter_with_inner_alias": "Parameters.Spread.Alias.spreadParameterWithInnerAlias" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations.py new file mode 100644 index 0000000000..216e3918c6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpreadClientTestBase, SpreadPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpreadSpreadClientAliasOperations(SpreadClientTestBase): + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_alias_spread_as_request_body(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_alias.spread_as_request_body( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_alias_spread_parameter_with_inner_model(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_alias.spread_parameter_with_inner_model( + id="str", + body={"name": "str"}, + x_ms_test_header="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_alias_spread_as_request_parameter(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_alias.spread_as_request_parameter( + id="str", + body={"name": "str"}, + x_ms_test_header="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_alias_spread_with_multiple_parameters(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_alias.spread_with_multiple_parameters( + id="str", + body={"requiredIntList": [0], "requiredString": "str", "optionalInt": 0, "optionalStringList": ["str"]}, + x_ms_test_header="str", + required_string="str", + required_int_list=[0], + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_alias_spread_parameter_with_inner_alias(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_alias.spread_parameter_with_inner_alias( + id="str", + body={"age": 0, "name": "str"}, + x_ms_test_header="str", + name="str", + age=0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations_async.py new file mode 100644 index 0000000000..90caad8ace --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_alias_operations_async.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpreadPreparer +from testpreparer_async import SpreadClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpreadSpreadClientAliasOperationsAsync(SpreadClientTestBaseAsync): + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_alias_spread_as_request_body(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_alias.spread_as_request_body( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_alias_spread_parameter_with_inner_model(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_alias.spread_parameter_with_inner_model( + id="str", + body={"name": "str"}, + x_ms_test_header="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_alias_spread_as_request_parameter(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_alias.spread_as_request_parameter( + id="str", + body={"name": "str"}, + x_ms_test_header="str", + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_alias_spread_with_multiple_parameters(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_alias.spread_with_multiple_parameters( + id="str", + body={"requiredIntList": [0], "requiredString": "str", "optionalInt": 0, "optionalStringList": ["str"]}, + x_ms_test_header="str", + required_string="str", + required_int_list=[0], + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_alias_spread_parameter_with_inner_alias(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_alias.spread_parameter_with_inner_alias( + id="str", + body={"age": 0, "name": "str"}, + x_ms_test_header="str", + name="str", + age=0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations.py new file mode 100644 index 0000000000..f23103e6f1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpreadClientTestBase, SpreadPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpreadSpreadClientModelOperations(SpreadClientTestBase): + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_model_spread_as_request_body(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_model.spread_as_request_body( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_model_spread_composite_request_only_with_body(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_model.spread_composite_request_only_with_body( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_model_spread_composite_request_without_body(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_model.spread_composite_request_without_body( + name="str", + test_header="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_model_spread_composite_request(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_model.spread_composite_request( + name="str", + body={"name": "str"}, + test_header="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy + def test_spread_client_model_spread_composite_request_mix(self, spread_endpoint): + client = self.create_client(endpoint=spread_endpoint) + response = client.spread_client_model.spread_composite_request_mix( + name="str", + body={"prop": "str"}, + test_header="str", + prop="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations_async.py b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations_async.py new file mode 100644 index 0000000000..419464d94d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/parameters-spread/generated_tests/test_spread_spread_client_model_operations_async.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpreadPreparer +from testpreparer_async import SpreadClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpreadSpreadClientModelOperationsAsync(SpreadClientTestBaseAsync): + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_model_spread_as_request_body(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_model.spread_as_request_body( + body={"name": "str"}, + name="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_model_spread_composite_request_only_with_body(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_model.spread_composite_request_only_with_body( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_model_spread_composite_request_without_body(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_model.spread_composite_request_without_body( + name="str", + test_header="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_model_spread_composite_request(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_model.spread_composite_request( + name="str", + body={"name": "str"}, + test_header="str", + ) + + # please add some check logic here by yourself + # ... + + @SpreadPreparer() + @recorded_by_proxy_async + async def test_spread_client_model_spread_composite_request_mix(self, spread_endpoint): + client = self.create_async_client(endpoint=spread_endpoint) + response = await client.spread_client_model.spread_composite_request_mix( + name="str", + body={"prop": "str"}, + test_header="str", + prop="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_client.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_client.py index e33cf068f4..fe960ff2e6 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/_client.py @@ -16,16 +16,16 @@ from ._configuration import SpreadClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import AliasOperations, ModelOperations +from .operations import SpreadClientAliasOperations, SpreadClientModelOperations class SpreadClient: # pylint: disable=client-accepts-api-version-keyword """Test for the spread operator. - :ivar model: ModelOperations operations - :vartype model: parameters.spread.operations.ModelOperations - :ivar alias: AliasOperations operations - :vartype alias: parameters.spread.operations.AliasOperations + :ivar spread_client_model: SpreadClientModelOperations operations + :vartype spread_client_model: parameters.spread.operations.SpreadClientModelOperations + :ivar spread_client_alias: SpreadClientAliasOperations operations + :vartype spread_client_alias: parameters.spread.operations.SpreadClientAliasOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +58,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize) + self.spread_client_model = SpreadClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.spread_client_alias = SpreadClientAliasOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/_client.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/_client.py index 1fe65ba263..166db03766 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/_client.py @@ -16,16 +16,16 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SpreadClientConfiguration -from .operations import AliasOperations, ModelOperations +from .operations import SpreadClientAliasOperations, SpreadClientModelOperations class SpreadClient: # pylint: disable=client-accepts-api-version-keyword """Test for the spread operator. - :ivar model: ModelOperations operations - :vartype model: parameters.spread.aio.operations.ModelOperations - :ivar alias: AliasOperations operations - :vartype alias: parameters.spread.aio.operations.AliasOperations + :ivar spread_client_model: SpreadClientModelOperations operations + :vartype spread_client_model: parameters.spread.aio.operations.SpreadClientModelOperations + :ivar spread_client_alias: SpreadClientAliasOperations operations + :vartype spread_client_alias: parameters.spread.aio.operations.SpreadClientAliasOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +58,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize) + self.spread_client_model = SpreadClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.spread_client_alias = SpreadClientAliasOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/__init__.py index f70348837a..634717b833 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelOperations # type: ignore -from ._operations import AliasOperations # type: ignore +from ._operations import SpreadClientModelOperations # type: ignore +from ._operations import SpreadClientAliasOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelOperations", - "AliasOperations", + "SpreadClientModelOperations", + "SpreadClientAliasOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py index 48cf67e8df..14db8f3dba 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/aio/operations/_operations.py @@ -29,16 +29,16 @@ from ..._utils.model_base import SdkJSONEncoder from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_alias_spread_as_request_body_request, - build_alias_spread_as_request_parameter_request, - build_alias_spread_parameter_with_inner_alias_request, - build_alias_spread_parameter_with_inner_model_request, - build_alias_spread_with_multiple_parameters_request, - build_model_spread_as_request_body_request, - build_model_spread_composite_request_mix_request, - build_model_spread_composite_request_only_with_body_request, - build_model_spread_composite_request_request, - build_model_spread_composite_request_without_body_request, + build_spread_client_alias_spread_as_request_body_request, + build_spread_client_alias_spread_as_request_parameter_request, + build_spread_client_alias_spread_parameter_with_inner_alias_request, + build_spread_client_alias_spread_parameter_with_inner_model_request, + build_spread_client_alias_spread_with_multiple_parameters_request, + build_spread_client_model_spread_as_request_body_request, + build_spread_client_model_spread_composite_request_mix_request, + build_spread_client_model_spread_composite_request_only_with_body_request, + build_spread_client_model_spread_composite_request_request, + build_spread_client_model_spread_composite_request_without_body_request, ) from .._configuration import SpreadClientConfiguration @@ -48,14 +48,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelOperations: +class SpreadClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.aio.SpreadClient`'s - :attr:`model` attribute. + :attr:`spread_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -151,7 +151,7 @@ async def spread_as_request_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_as_request_body_request( + _request = build_spread_client_model_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -257,7 +257,7 @@ async def spread_composite_request_only_with_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_only_with_body_request( + _request = build_spread_client_model_spread_composite_request_only_with_body_request( content_type=content_type, content=_content, headers=_headers, @@ -307,7 +307,7 @@ async def spread_composite_request_without_body(self, name: str, *, test_header: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_model_spread_composite_request_without_body_request( + _request = build_spread_client_model_spread_composite_request_without_body_request( name=name, test_header=test_header, headers=_headers, @@ -435,7 +435,7 @@ async def spread_composite_request( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_request( + _request = build_spread_client_model_spread_composite_request_request( name=name, test_header=test_header, content_type=content_type, @@ -566,7 +566,7 @@ async def spread_composite_request_mix( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_mix_request( + _request = build_spread_client_model_spread_composite_request_mix_request( name=name, test_header=test_header, content_type=content_type, @@ -594,14 +594,14 @@ async def spread_composite_request_mix( return cls(pipeline_response, None, {}) # type: ignore -class AliasOperations: +class SpreadClientAliasOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.aio.SpreadClient`'s - :attr:`alias` attribute. + :attr:`spread_client_alias` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -697,7 +697,7 @@ async def spread_as_request_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_body_request( + _request = build_spread_client_alias_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -832,7 +832,7 @@ async def spread_parameter_with_inner_model( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_model_request( + _request = build_spread_client_alias_spread_parameter_with_inner_model_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -969,7 +969,7 @@ async def spread_as_request_parameter( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_parameter_request( + _request = build_spread_client_alias_spread_as_request_parameter_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -1137,7 +1137,7 @@ async def spread_with_multiple_parameters( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_with_multiple_parameters_request( + _request = build_spread_client_alias_spread_with_multiple_parameters_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -1288,7 +1288,7 @@ async def spread_parameter_with_inner_alias( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_alias_request( + _request = build_spread_client_alias_spread_parameter_with_inner_alias_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/__init__.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/__init__.py index f70348837a..634717b833 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelOperations # type: ignore -from ._operations import AliasOperations # type: ignore +from ._operations import SpreadClientModelOperations # type: ignore +from ._operations import SpreadClientAliasOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelOperations", - "AliasOperations", + "SpreadClientModelOperations", + "SpreadClientAliasOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py index 5ab07b3436..924b3b6db0 100644 --- a/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/parameters-spread/parameters/spread/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_model_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_spread_client_model_spread_as_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -53,7 +55,7 @@ def build_model_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_only_with_body_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_only_with_body_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -69,7 +71,7 @@ def build_model_spread_composite_request_only_with_body_request( # pylint: disa return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_without_body_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_without_body_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -88,7 +90,7 @@ def build_model_spread_composite_request_without_body_request( # pylint: disabl return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -110,7 +112,7 @@ def build_model_spread_composite_request_request( # pylint: disable=name-too-lo return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_mix_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_mix_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -132,7 +134,9 @@ def build_model_spread_composite_request_mix_request( # pylint: disable=name-to return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_spread_client_alias_spread_as_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -146,7 +150,7 @@ def build_alias_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_parameter_with_inner_model_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_parameter_with_inner_model_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -168,7 +172,7 @@ def build_alias_spread_parameter_with_inner_model_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_alias_spread_as_request_parameter_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_as_request_parameter_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -190,7 +194,7 @@ def build_alias_spread_as_request_parameter_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_with_multiple_parameters_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_with_multiple_parameters_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -212,7 +216,7 @@ def build_alias_spread_with_multiple_parameters_request( # pylint: disable=name return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_parameter_with_inner_alias_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_parameter_with_inner_alias_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -234,14 +238,14 @@ def build_alias_spread_parameter_with_inner_alias_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class ModelOperations: +class SpreadClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.SpreadClient`'s - :attr:`model` attribute. + :attr:`spread_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -333,7 +337,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_as_request_body_request( + _request = build_spread_client_model_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -439,7 +443,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_only_with_body_request( + _request = build_spread_client_model_spread_composite_request_only_with_body_request( content_type=content_type, content=_content, headers=_headers, @@ -491,7 +495,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_model_spread_composite_request_without_body_request( + _request = build_spread_client_model_spread_composite_request_without_body_request( name=name, test_header=test_header, headers=_headers, @@ -619,7 +623,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_request( + _request = build_spread_client_model_spread_composite_request_request( name=name, test_header=test_header, content_type=content_type, @@ -750,7 +754,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_mix_request( + _request = build_spread_client_model_spread_composite_request_mix_request( name=name, test_header=test_header, content_type=content_type, @@ -778,14 +782,14 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme return cls(pipeline_response, None, {}) # type: ignore -class AliasOperations: +class SpreadClientAliasOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.SpreadClient`'s - :attr:`alias` attribute. + :attr:`spread_client_alias` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -877,7 +881,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_body_request( + _request = build_spread_client_alias_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -1012,7 +1016,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_model_request( + _request = build_spread_client_alias_spread_parameter_with_inner_model_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -1149,7 +1153,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_parameter_request( + _request = build_spread_client_alias_spread_as_request_parameter_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -1317,7 +1321,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_with_multiple_parameters_request( + _request = build_spread_client_alias_spread_with_multiple_parameters_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -1468,7 +1472,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_alias_request( + _request = build_spread_client_alias_spread_parameter_with_inner_alias_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/apiview-properties.json b/packages/typespec-python/test/azure/generated/payload-content-negotiation/apiview-properties.json index 563a45cea5..5e391cdd5e 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/apiview-properties.json @@ -2,13 +2,13 @@ "CrossLanguagePackageId": "Payload.ContentNegotiation", "CrossLanguageDefinitionId": { "payload.contentnegotiation.models.PngImageAsJson": "Payload.ContentNegotiation.DifferentBody.PngImageAsJson", - "payload.contentnegotiation.operations.SameBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.SameBody.getAvatarAsPng", - "payload.contentnegotiation.aio.operations.SameBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.SameBody.getAvatarAsPng", - "payload.contentnegotiation.operations.SameBodyOperations.get_avatar_as_jpeg": "Payload.ContentNegotiation.SameBody.getAvatarAsJpeg", - "payload.contentnegotiation.aio.operations.SameBodyOperations.get_avatar_as_jpeg": "Payload.ContentNegotiation.SameBody.getAvatarAsJpeg", - "payload.contentnegotiation.operations.DifferentBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.DifferentBody.getAvatarAsPng", - "payload.contentnegotiation.aio.operations.DifferentBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.DifferentBody.getAvatarAsPng", - "payload.contentnegotiation.operations.DifferentBodyOperations.get_avatar_as_json": "Payload.ContentNegotiation.DifferentBody.getAvatarAsJson", - "payload.contentnegotiation.aio.operations.DifferentBodyOperations.get_avatar_as_json": "Payload.ContentNegotiation.DifferentBody.getAvatarAsJson" + "payload.contentnegotiation.operations.ContentNegotiationClientSameBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.SameBody.getAvatarAsPng", + "payload.contentnegotiation.aio.operations.ContentNegotiationClientSameBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.SameBody.getAvatarAsPng", + "payload.contentnegotiation.operations.ContentNegotiationClientSameBodyOperations.get_avatar_as_jpeg": "Payload.ContentNegotiation.SameBody.getAvatarAsJpeg", + "payload.contentnegotiation.aio.operations.ContentNegotiationClientSameBodyOperations.get_avatar_as_jpeg": "Payload.ContentNegotiation.SameBody.getAvatarAsJpeg", + "payload.contentnegotiation.operations.ContentNegotiationClientDifferentBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.DifferentBody.getAvatarAsPng", + "payload.contentnegotiation.aio.operations.ContentNegotiationClientDifferentBodyOperations.get_avatar_as_png": "Payload.ContentNegotiation.DifferentBody.getAvatarAsPng", + "payload.contentnegotiation.operations.ContentNegotiationClientDifferentBodyOperations.get_avatar_as_json": "Payload.ContentNegotiation.DifferentBody.getAvatarAsJson", + "payload.contentnegotiation.aio.operations.ContentNegotiationClientDifferentBodyOperations.get_avatar_as_json": "Payload.ContentNegotiation.DifferentBody.getAvatarAsJson" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations.py new file mode 100644 index 0000000000..82189c1f98 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ContentNegotiationClientTestBase, ContentNegotiationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContentNegotiationContentNegotiationClientDifferentBodyOperations(ContentNegotiationClientTestBase): + @ContentNegotiationPreparer() + @recorded_by_proxy + def test_content_negotiation_client_different_body_get_avatar_as_png(self, contentnegotiation_endpoint): + client = self.create_client(endpoint=contentnegotiation_endpoint) + response = client.content_negotiation_client_different_body.get_avatar_as_png( + accept="image/png", + ) + + # please add some check logic here by yourself + # ... + + @ContentNegotiationPreparer() + @recorded_by_proxy + def test_content_negotiation_client_different_body_get_avatar_as_json(self, contentnegotiation_endpoint): + client = self.create_client(endpoint=contentnegotiation_endpoint) + response = client.content_negotiation_client_different_body.get_avatar_as_json( + accept="application/json", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations_async.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations_async.py new file mode 100644 index 0000000000..ba1691d530 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_different_body_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ContentNegotiationPreparer +from testpreparer_async import ContentNegotiationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContentNegotiationContentNegotiationClientDifferentBodyOperationsAsync(ContentNegotiationClientTestBaseAsync): + @ContentNegotiationPreparer() + @recorded_by_proxy_async + async def test_content_negotiation_client_different_body_get_avatar_as_png(self, contentnegotiation_endpoint): + client = self.create_async_client(endpoint=contentnegotiation_endpoint) + response = await client.content_negotiation_client_different_body.get_avatar_as_png( + accept="image/png", + ) + + # please add some check logic here by yourself + # ... + + @ContentNegotiationPreparer() + @recorded_by_proxy_async + async def test_content_negotiation_client_different_body_get_avatar_as_json(self, contentnegotiation_endpoint): + client = self.create_async_client(endpoint=contentnegotiation_endpoint) + response = await client.content_negotiation_client_different_body.get_avatar_as_json( + accept="application/json", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations.py new file mode 100644 index 0000000000..618b1b59c1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ContentNegotiationClientTestBase, ContentNegotiationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContentNegotiationContentNegotiationClientSameBodyOperations(ContentNegotiationClientTestBase): + @ContentNegotiationPreparer() + @recorded_by_proxy + def test_content_negotiation_client_same_body_get_avatar_as_png(self, contentnegotiation_endpoint): + client = self.create_client(endpoint=contentnegotiation_endpoint) + response = client.content_negotiation_client_same_body.get_avatar_as_png( + accept="image/png", + ) + + # please add some check logic here by yourself + # ... + + @ContentNegotiationPreparer() + @recorded_by_proxy + def test_content_negotiation_client_same_body_get_avatar_as_jpeg(self, contentnegotiation_endpoint): + client = self.create_client(endpoint=contentnegotiation_endpoint) + response = client.content_negotiation_client_same_body.get_avatar_as_jpeg( + accept="image/jpeg", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations_async.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations_async.py new file mode 100644 index 0000000000..0f99d67896 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/generated_tests/test_content_negotiation_content_negotiation_client_same_body_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ContentNegotiationPreparer +from testpreparer_async import ContentNegotiationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContentNegotiationContentNegotiationClientSameBodyOperationsAsync(ContentNegotiationClientTestBaseAsync): + @ContentNegotiationPreparer() + @recorded_by_proxy_async + async def test_content_negotiation_client_same_body_get_avatar_as_png(self, contentnegotiation_endpoint): + client = self.create_async_client(endpoint=contentnegotiation_endpoint) + response = await client.content_negotiation_client_same_body.get_avatar_as_png( + accept="image/png", + ) + + # please add some check logic here by yourself + # ... + + @ContentNegotiationPreparer() + @recorded_by_proxy_async + async def test_content_negotiation_client_same_body_get_avatar_as_jpeg(self, contentnegotiation_endpoint): + client = self.create_async_client(endpoint=contentnegotiation_endpoint) + response = await client.content_negotiation_client_same_body.get_avatar_as_jpeg( + accept="image/jpeg", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_client.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_client.py index 7065690fe7..6638714947 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/_client.py @@ -16,16 +16,20 @@ from ._configuration import ContentNegotiationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import DifferentBodyOperations, SameBodyOperations +from .operations import ContentNegotiationClientDifferentBodyOperations, ContentNegotiationClientSameBodyOperations class ContentNegotiationClient: # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar same_body: SameBodyOperations operations - :vartype same_body: payload.contentnegotiation.operations.SameBodyOperations - :ivar different_body: DifferentBodyOperations operations - :vartype different_body: payload.contentnegotiation.operations.DifferentBodyOperations + :ivar content_negotiation_client_same_body: ContentNegotiationClientSameBodyOperations + operations + :vartype content_negotiation_client_same_body: + payload.contentnegotiation.operations.ContentNegotiationClientSameBodyOperations + :ivar content_negotiation_client_different_body: + ContentNegotiationClientDifferentBodyOperations operations + :vartype content_negotiation_client_different_body: + payload.contentnegotiation.operations.ContentNegotiationClientDifferentBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +62,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.same_body = SameBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.different_body = DifferentBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_negotiation_client_same_body = ContentNegotiationClientSameBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.content_negotiation_client_different_body = ContentNegotiationClientDifferentBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py index 5880c31f1a..c7e6b08ed6 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py @@ -16,16 +16,20 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ContentNegotiationClientConfiguration -from .operations import DifferentBodyOperations, SameBodyOperations +from .operations import ContentNegotiationClientDifferentBodyOperations, ContentNegotiationClientSameBodyOperations class ContentNegotiationClient: # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar same_body: SameBodyOperations operations - :vartype same_body: payload.contentnegotiation.aio.operations.SameBodyOperations - :ivar different_body: DifferentBodyOperations operations - :vartype different_body: payload.contentnegotiation.aio.operations.DifferentBodyOperations + :ivar content_negotiation_client_same_body: ContentNegotiationClientSameBodyOperations + operations + :vartype content_negotiation_client_same_body: + payload.contentnegotiation.aio.operations.ContentNegotiationClientSameBodyOperations + :ivar content_negotiation_client_different_body: + ContentNegotiationClientDifferentBodyOperations operations + :vartype content_negotiation_client_different_body: + payload.contentnegotiation.aio.operations.ContentNegotiationClientDifferentBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +62,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.same_body = SameBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.different_body = DifferentBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_negotiation_client_same_body = ContentNegotiationClientSameBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.content_negotiation_client_different_body = ContentNegotiationClientDifferentBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/__init__.py index 1368193a3d..542957f375 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SameBodyOperations # type: ignore -from ._operations import DifferentBodyOperations # type: ignore +from ._operations import ContentNegotiationClientSameBodyOperations # type: ignore +from ._operations import ContentNegotiationClientDifferentBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SameBodyOperations", - "DifferentBodyOperations", + "ContentNegotiationClientSameBodyOperations", + "ContentNegotiationClientDifferentBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py index 7a717c4467..9fd899e239 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/aio/operations/_operations.py @@ -28,10 +28,10 @@ from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_different_body_get_avatar_as_json_request, - build_different_body_get_avatar_as_png_request, - build_same_body_get_avatar_as_jpeg_request, - build_same_body_get_avatar_as_png_request, + build_content_negotiation_client_different_body_get_avatar_as_json_request, + build_content_negotiation_client_different_body_get_avatar_as_png_request, + build_content_negotiation_client_same_body_get_avatar_as_jpeg_request, + build_content_negotiation_client_same_body_get_avatar_as_png_request, ) from .._configuration import ContentNegotiationClientConfiguration @@ -39,14 +39,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class SameBodyOperations: +class ContentNegotiationClientSameBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.aio.ContentNegotiationClient`'s - :attr:`same_body` attribute. + :attr:`content_negotiation_client_same_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -78,7 +78,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -136,7 +136,7 @@ async def get_avatar_as_jpeg(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_jpeg_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( accept=accept, headers=_headers, params=_params, @@ -173,14 +173,14 @@ async def get_avatar_as_jpeg(self, **kwargs: Any) -> AsyncIterator[bytes]: return deserialized # type: ignore -class DifferentBodyOperations: +class ContentNegotiationClientDifferentBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.aio.ContentNegotiationClient`'s - :attr:`different_body` attribute. + :attr:`content_negotiation_client_different_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -212,7 +212,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -270,7 +270,7 @@ async def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) cls: ClsType[_models.PngImageAsJson] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_json_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_json_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/__init__.py index 1368193a3d..542957f375 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SameBodyOperations # type: ignore -from ._operations import DifferentBodyOperations # type: ignore +from ._operations import ContentNegotiationClientSameBodyOperations # type: ignore +from ._operations import ContentNegotiationClientDifferentBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SameBodyOperations", - "DifferentBodyOperations", + "ContentNegotiationClientSameBodyOperations", + "ContentNegotiationClientDifferentBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py index 4ba465fe94..b5d53cd7ee 100644 --- a/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-content-negotiation/payload/contentnegotiation/operations/_operations.py @@ -36,7 +36,9 @@ _SERIALIZER.client_side_validation = False -def build_same_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_same_body_get_avatar_as_png_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) @@ -49,7 +51,9 @@ def build_same_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_same_body_get_avatar_as_jpeg_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) @@ -62,7 +66,9 @@ def build_same_body_get_avatar_as_jpeg_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_different_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_different_body_get_avatar_as_png_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) @@ -75,7 +81,9 @@ def build_different_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_different_body_get_avatar_as_json_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_different_body_get_avatar_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) @@ -88,14 +96,14 @@ def build_different_body_get_avatar_as_json_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class SameBodyOperations: +class ContentNegotiationClientSameBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.ContentNegotiationClient`'s - :attr:`same_body` attribute. + :attr:`content_negotiation_client_same_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -127,7 +135,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -185,7 +193,7 @@ def get_avatar_as_jpeg(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_jpeg_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( accept=accept, headers=_headers, params=_params, @@ -222,14 +230,14 @@ def get_avatar_as_jpeg(self, **kwargs: Any) -> Iterator[bytes]: return deserialized # type: ignore -class DifferentBodyOperations: +class ContentNegotiationClientDifferentBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.ContentNegotiationClient`'s - :attr:`different_body` attribute. + :attr:`content_negotiation_client_different_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -261,7 +269,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -319,7 +327,7 @@ def get_avatar_as_json(self, **kwargs: Any) -> _models.PngImageAsJson: accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) cls: ClsType[_models.PngImageAsJson] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_json_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_json_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/apiview-properties.json b/packages/typespec-python/test/azure/generated/payload-media-type/apiview-properties.json index 79b0e74f6f..4eee093574 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/payload-media-type/apiview-properties.json @@ -1,13 +1,13 @@ { "CrossLanguagePackageId": "Payload.MediaType", "CrossLanguageDefinitionId": { - "payload.mediatype.operations.StringBodyOperations.send_as_text": "Payload.MediaType.StringBody.sendAsText", - "payload.mediatype.aio.operations.StringBodyOperations.send_as_text": "Payload.MediaType.StringBody.sendAsText", - "payload.mediatype.operations.StringBodyOperations.get_as_text": "Payload.MediaType.StringBody.getAsText", - "payload.mediatype.aio.operations.StringBodyOperations.get_as_text": "Payload.MediaType.StringBody.getAsText", - "payload.mediatype.operations.StringBodyOperations.send_as_json": "Payload.MediaType.StringBody.sendAsJson", - "payload.mediatype.aio.operations.StringBodyOperations.send_as_json": "Payload.MediaType.StringBody.sendAsJson", - "payload.mediatype.operations.StringBodyOperations.get_as_json": "Payload.MediaType.StringBody.getAsJson", - "payload.mediatype.aio.operations.StringBodyOperations.get_as_json": "Payload.MediaType.StringBody.getAsJson" + "payload.mediatype.operations.MediaTypeClientStringBodyOperations.send_as_text": "Payload.MediaType.StringBody.sendAsText", + "payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations.send_as_text": "Payload.MediaType.StringBody.sendAsText", + "payload.mediatype.operations.MediaTypeClientStringBodyOperations.get_as_text": "Payload.MediaType.StringBody.getAsText", + "payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations.get_as_text": "Payload.MediaType.StringBody.getAsText", + "payload.mediatype.operations.MediaTypeClientStringBodyOperations.send_as_json": "Payload.MediaType.StringBody.sendAsJson", + "payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations.send_as_json": "Payload.MediaType.StringBody.sendAsJson", + "payload.mediatype.operations.MediaTypeClientStringBodyOperations.get_as_json": "Payload.MediaType.StringBody.getAsJson", + "payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations.get_as_json": "Payload.MediaType.StringBody.getAsJson" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations.py b/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations.py new file mode 100644 index 0000000000..012eb3eb12 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MediaTypeClientTestBase, MediaTypePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMediaTypeMediaTypeClientStringBodyOperations(MediaTypeClientTestBase): + @MediaTypePreparer() + @recorded_by_proxy + def test_media_type_client_string_body_send_as_text(self, mediatype_endpoint): + client = self.create_client(endpoint=mediatype_endpoint) + response = client.media_type_client_string_body.send_as_text( + text="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy + def test_media_type_client_string_body_get_as_text(self, mediatype_endpoint): + client = self.create_client(endpoint=mediatype_endpoint) + response = client.media_type_client_string_body.get_as_text() + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy + def test_media_type_client_string_body_send_as_json(self, mediatype_endpoint): + client = self.create_client(endpoint=mediatype_endpoint) + response = client.media_type_client_string_body.send_as_json( + text="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy + def test_media_type_client_string_body_get_as_json(self, mediatype_endpoint): + client = self.create_client(endpoint=mediatype_endpoint) + response = client.media_type_client_string_body.get_as_json() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations_async.py b/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations_async.py new file mode 100644 index 0000000000..83eadde8b9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-media-type/generated_tests/test_media_type_media_type_client_string_body_operations_async.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MediaTypePreparer +from testpreparer_async import MediaTypeClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMediaTypeMediaTypeClientStringBodyOperationsAsync(MediaTypeClientTestBaseAsync): + @MediaTypePreparer() + @recorded_by_proxy_async + async def test_media_type_client_string_body_send_as_text(self, mediatype_endpoint): + client = self.create_async_client(endpoint=mediatype_endpoint) + response = await client.media_type_client_string_body.send_as_text( + text="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy_async + async def test_media_type_client_string_body_get_as_text(self, mediatype_endpoint): + client = self.create_async_client(endpoint=mediatype_endpoint) + response = await client.media_type_client_string_body.get_as_text() + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy_async + async def test_media_type_client_string_body_send_as_json(self, mediatype_endpoint): + client = self.create_async_client(endpoint=mediatype_endpoint) + response = await client.media_type_client_string_body.send_as_json( + text="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @MediaTypePreparer() + @recorded_by_proxy_async + async def test_media_type_client_string_body_get_as_json(self, mediatype_endpoint): + client = self.create_async_client(endpoint=mediatype_endpoint) + response = await client.media_type_client_string_body.get_as_json() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_client.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_client.py index 9caa9feb5b..c22584c3ee 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/_client.py @@ -16,14 +16,15 @@ from ._configuration import MediaTypeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .stringbody.operations import StringBodyOperations +from .stringbody.operations import MediaTypeClientStringBodyOperations class MediaTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test the payload with different media types and different types of the payload itself. - :ivar string_body: StringBodyOperations operations - :vartype string_body: payload.mediatype.operations.StringBodyOperations + :ivar media_type_client_string_body: MediaTypeClientStringBodyOperations operations + :vartype media_type_client_string_body: + payload.mediatype.operations.MediaTypeClientStringBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string_body = StringBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.media_type_client_string_body = MediaTypeClientStringBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_client.py index 79c18ef862..b867f5ef15 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/aio/_client.py @@ -15,15 +15,16 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..stringbody.aio.operations import StringBodyOperations +from ..stringbody.aio.operations import MediaTypeClientStringBodyOperations from ._configuration import MediaTypeClientConfiguration class MediaTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test the payload with different media types and different types of the payload itself. - :ivar string_body: StringBodyOperations operations - :vartype string_body: payload.mediatype.aio.operations.StringBodyOperations + :ivar media_type_client_string_body: MediaTypeClientStringBodyOperations operations + :vartype media_type_client_string_body: + payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string_body = StringBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.media_type_client_string_body = MediaTypeClientStringBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py index 24dae74dcf..21bb31b1d1 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringBodyOperations # type: ignore +from ._operations import MediaTypeClientStringBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringBodyOperations", + "MediaTypeClientStringBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py index 16fa2d0ef3..93a4c0f1a7 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py @@ -29,24 +29,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import MediaTypeClientConfiguration from ...operations._operations import ( - build_string_body_get_as_json_request, - build_string_body_get_as_text_request, - build_string_body_send_as_json_request, - build_string_body_send_as_text_request, + build_media_type_client_string_body_get_as_json_request, + build_media_type_client_string_body_get_as_text_request, + build_media_type_client_string_body_send_as_json_request, + build_media_type_client_string_body_send_as_text_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringBodyOperations: +class MediaTypeClientStringBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.mediatype.aio.MediaTypeClient`'s - :attr:`string_body` attribute. + :attr:`media_type_client_string_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -82,7 +82,7 @@ async def send_as_text(self, text: str, **kwargs: Any) -> None: _content = text - _request = build_string_body_send_as_text_request( + _request = build_media_type_client_string_body_send_as_text_request( content_type=content_type, content=_content, headers=_headers, @@ -128,7 +128,7 @@ async def get_as_text(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_text_request( + _request = build_media_type_client_string_body_get_as_text_request( headers=_headers, params=_params, ) @@ -192,7 +192,7 @@ async def send_as_json(self, text: str, **kwargs: Any) -> None: _content = json.dumps(text, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_body_send_as_json_request( + _request = build_media_type_client_string_body_send_as_json_request( content_type=content_type, content=_content, headers=_headers, @@ -238,7 +238,7 @@ async def get_as_json(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_json_request( + _request = build_media_type_client_string_body_get_as_json_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py index 24dae74dcf..21bb31b1d1 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringBodyOperations # type: ignore +from ._operations import MediaTypeClientStringBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringBodyOperations", + "MediaTypeClientStringBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py index dc09344fc3..764c06218e 100644 --- a/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py @@ -36,7 +36,9 @@ _SERIALIZER.client_side_validation = False -def build_string_body_send_as_text_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_send_as_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -49,7 +51,9 @@ def build_string_body_send_as_text_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_body_get_as_text_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_get_as_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "text/plain") @@ -63,7 +67,9 @@ def build_string_body_get_as_text_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_body_send_as_json_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_send_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -76,7 +82,9 @@ def build_string_body_send_as_json_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_body_get_as_json_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_get_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -90,14 +98,14 @@ def build_string_body_get_as_json_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class StringBodyOperations: +class MediaTypeClientStringBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.mediatype.MediaTypeClient`'s - :attr:`string_body` attribute. + :attr:`media_type_client_string_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +141,7 @@ def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc _content = text - _request = build_string_body_send_as_text_request( + _request = build_media_type_client_string_body_send_as_text_request( content_type=content_type, content=_content, headers=_headers, @@ -179,7 +187,7 @@ def get_as_text(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_text_request( + _request = build_media_type_client_string_body_get_as_text_request( headers=_headers, params=_params, ) @@ -243,7 +251,7 @@ def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc _content = json.dumps(text, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_body_send_as_json_request( + _request = build_media_type_client_string_body_send_as_json_request( content_type=content_type, content=_content, headers=_headers, @@ -289,7 +297,7 @@ def get_as_json(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_json_request( + _request = build_media_type_client_string_body_get_as_json_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/apiview-properties.json b/packages/typespec-python/test/azure/generated/payload-multipart/apiview-properties.json index 5d42b5f1aa..ba1e4791c9 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/payload-multipart/apiview-properties.json @@ -18,23 +18,23 @@ "payload.multipart.models.UploadFileArrayRequest": "Payload.MultiPart.FormData.File.uploadFileArray.Request.anonymous", "payload.multipart.models.UploadFileRequiredFilenameRequest": "Payload.MultiPart.FormData.File.uploadFileRequiredFilename.Request.anonymous", "payload.multipart.models.UploadFileSpecificContentTypeRequest": "Payload.MultiPart.FormData.File.uploadFileSpecificContentType.Request.anonymous", - "payload.multipart.operations.FormDataOperations.basic": "Payload.MultiPart.FormData.basic", - "payload.multipart.aio.operations.FormDataOperations.basic": "Payload.MultiPart.FormData.basic", - "payload.multipart.operations.FormDataOperations.with_wire_name": "Payload.MultiPart.FormData.withWireName", - "payload.multipart.aio.operations.FormDataOperations.with_wire_name": "Payload.MultiPart.FormData.withWireName", - "payload.multipart.operations.FormDataOperations.optional_parts": "Payload.MultiPart.FormData.optionalParts", - "payload.multipart.aio.operations.FormDataOperations.optional_parts": "Payload.MultiPart.FormData.optionalParts", - "payload.multipart.operations.FormDataOperations.file_array_and_basic": "Payload.MultiPart.FormData.fileArrayAndBasic", - "payload.multipart.aio.operations.FormDataOperations.file_array_and_basic": "Payload.MultiPart.FormData.fileArrayAndBasic", - "payload.multipart.operations.FormDataOperations.json_part": "Payload.MultiPart.FormData.jsonPart", - "payload.multipart.aio.operations.FormDataOperations.json_part": "Payload.MultiPart.FormData.jsonPart", - "payload.multipart.operations.FormDataOperations.binary_array_parts": "Payload.MultiPart.FormData.binaryArrayParts", - "payload.multipart.aio.operations.FormDataOperations.binary_array_parts": "Payload.MultiPart.FormData.binaryArrayParts", - "payload.multipart.operations.FormDataOperations.multi_binary_parts": "Payload.MultiPart.FormData.multiBinaryParts", - "payload.multipart.aio.operations.FormDataOperations.multi_binary_parts": "Payload.MultiPart.FormData.multiBinaryParts", - "payload.multipart.operations.FormDataOperations.check_file_name_and_content_type": "Payload.MultiPart.FormData.checkFileNameAndContentType", - "payload.multipart.aio.operations.FormDataOperations.check_file_name_and_content_type": "Payload.MultiPart.FormData.checkFileNameAndContentType", - "payload.multipart.operations.FormDataOperations.anonymous_model": "Payload.MultiPart.FormData.anonymousModel", - "payload.multipart.aio.operations.FormDataOperations.anonymous_model": "Payload.MultiPart.FormData.anonymousModel" + "payload.multipart.operations.MultiPartClientFormDataOperations.basic": "Payload.MultiPart.FormData.basic", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.basic": "Payload.MultiPart.FormData.basic", + "payload.multipart.operations.MultiPartClientFormDataOperations.with_wire_name": "Payload.MultiPart.FormData.withWireName", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.with_wire_name": "Payload.MultiPart.FormData.withWireName", + "payload.multipart.operations.MultiPartClientFormDataOperations.optional_parts": "Payload.MultiPart.FormData.optionalParts", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.optional_parts": "Payload.MultiPart.FormData.optionalParts", + "payload.multipart.operations.MultiPartClientFormDataOperations.file_array_and_basic": "Payload.MultiPart.FormData.fileArrayAndBasic", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.file_array_and_basic": "Payload.MultiPart.FormData.fileArrayAndBasic", + "payload.multipart.operations.MultiPartClientFormDataOperations.json_part": "Payload.MultiPart.FormData.jsonPart", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.json_part": "Payload.MultiPart.FormData.jsonPart", + "payload.multipart.operations.MultiPartClientFormDataOperations.binary_array_parts": "Payload.MultiPart.FormData.binaryArrayParts", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.binary_array_parts": "Payload.MultiPart.FormData.binaryArrayParts", + "payload.multipart.operations.MultiPartClientFormDataOperations.multi_binary_parts": "Payload.MultiPart.FormData.multiBinaryParts", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.multi_binary_parts": "Payload.MultiPart.FormData.multiBinaryParts", + "payload.multipart.operations.MultiPartClientFormDataOperations.check_file_name_and_content_type": "Payload.MultiPart.FormData.checkFileNameAndContentType", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.check_file_name_and_content_type": "Payload.MultiPart.FormData.checkFileNameAndContentType", + "payload.multipart.operations.MultiPartClientFormDataOperations.anonymous_model": "Payload.MultiPart.FormData.anonymousModel", + "payload.multipart.aio.operations.MultiPartClientFormDataOperations.anonymous_model": "Payload.MultiPart.FormData.anonymousModel" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations.py b/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations.py new file mode 100644 index 0000000000..ba935eee19 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations.py @@ -0,0 +1,223 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import MultiPartClientTestBase, MultiPartPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMultiPartMultiPartClientFormDataOperations(MultiPartClientTestBase): + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_basic(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.basic( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_with_wire_name(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.with_wire_name( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_optional_parts(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.optional_parts( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_file_array_and_basic(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.file_array_and_basic( + body={"address": {"city": "str"}, "id": "str", "pictures": ["filetype"], "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_json_part(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.json_part( + body={"address": {"city": "str"}, "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_binary_array_parts(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.binary_array_parts( + body={"id": "str", "pictures": ["filetype"]}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_binary_parts(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_binary_parts( + body={"profileImage": "filetype", "picture": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_check_file_name_and_content_type(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.check_file_name_and_content_type( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_anonymous_model(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.anonymous_model( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_json_array_and_file_array( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_http_parts.json_array_and_file_array( + body={ + "address": {"city": "str"}, + "id": "str", + "pictures": ["filetype"], + "previousAddresses": [{"city": "str"}], + "profileImage": "filetype", + }, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_specific_content_type( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = ( + client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_specific_content_type( + body={"file": "filetype"}, + ) + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_required_filename( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_required_filename( + body={"file": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_array(self, multipart_endpoint): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_array( + body={"files": ["filetype"]}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.image_jpeg_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_required_content_type( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.required_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_optional_content_type( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.optional_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy + def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_non_string_float( + self, multipart_endpoint + ): + client = self.create_client(endpoint=multipart_endpoint) + response = client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_non_string.float( + body={"temperature": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations_async.py b/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations_async.py new file mode 100644 index 0000000000..34b51f064b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-multipart/generated_tests/test_multi_part_multi_part_client_form_data_operations_async.py @@ -0,0 +1,230 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import MultiPartPreparer +from testpreparer_async import MultiPartClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestMultiPartMultiPartClientFormDataOperationsAsync(MultiPartClientTestBaseAsync): + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_basic(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.basic( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_with_wire_name(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.with_wire_name( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_optional_parts(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.optional_parts( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_file_array_and_basic(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.file_array_and_basic( + body={"address": {"city": "str"}, "id": "str", "pictures": ["filetype"], "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_json_part(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.json_part( + body={"address": {"city": "str"}, "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_binary_array_parts(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.binary_array_parts( + body={"id": "str", "pictures": ["filetype"]}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_binary_parts(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_binary_parts( + body={"profileImage": "filetype", "picture": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_check_file_name_and_content_type(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.check_file_name_and_content_type( + body={"id": "str", "profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_anonymous_model(self, multipart_endpoint): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.anonymous_model( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_json_array_and_file_array( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = ( + await client.multi_part_client_form_data.multi_part_client_form_data_http_parts.json_array_and_file_array( + body={ + "address": {"city": "str"}, + "id": "str", + "pictures": ["filetype"], + "previousAddresses": [{"city": "str"}], + "profileImage": "filetype", + }, + ) + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_specific_content_type( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = ( + await client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_specific_content_type( + body={"file": "filetype"}, + ) + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_required_filename( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = ( + await client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_required_filename( + body={"file": "filetype"}, + ) + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_file_upload_file_array( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_part_client_form_data_file.upload_file_array( + body={"files": ["filetype"]}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.image_jpeg_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_required_content_type( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.required_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_content_type_optional_content_type( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_content_type.optional_content_type( + body={"profileImage": "filetype"}, + ) + + # please add some check logic here by yourself + # ... + + @MultiPartPreparer() + @recorded_by_proxy_async + async def test_multi_part_client_form_data_multi_part_client_form_data_http_parts_multi_part_client_form_data_http_parts_non_string_float( + self, multipart_endpoint + ): + client = self.create_async_client(endpoint=multipart_endpoint) + response = await client.multi_part_client_form_data.multi_part_client_form_data_http_parts.multi_part_client_form_data_http_parts_non_string.float( + body={"temperature": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_client.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_client.py index 96dedc4fa3..9987310045 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/_client.py @@ -16,14 +16,15 @@ from ._configuration import MultiPartClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import FormDataOperations +from .operations import MultiPartClientFormDataOperations class MultiPartClient: # pylint: disable=client-accepts-api-version-keyword """Test for multipart. - :ivar form_data: FormDataOperations operations - :vartype form_data: payload.multipart.operations.FormDataOperations + :ivar multi_part_client_form_data: MultiPartClientFormDataOperations operations + :vartype multi_part_client_form_data: + payload.multipart.operations.MultiPartClientFormDataOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.form_data = FormDataOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data = MultiPartClientFormDataOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_client.py index 2405f08bb7..7321b2813f 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/_client.py @@ -16,14 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import MultiPartClientConfiguration -from .operations import FormDataOperations +from .operations import MultiPartClientFormDataOperations class MultiPartClient: # pylint: disable=client-accepts-api-version-keyword """Test for multipart. - :ivar form_data: FormDataOperations operations - :vartype form_data: payload.multipart.aio.operations.FormDataOperations + :ivar multi_part_client_form_data: MultiPartClientFormDataOperations operations + :vartype multi_part_client_form_data: + payload.multipart.aio.operations.MultiPartClientFormDataOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.form_data = FormDataOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data = MultiPartClientFormDataOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/__init__.py index a3f0f414f4..93782fe1bc 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FormDataOperations # type: ignore +from ._operations import MultiPartClientFormDataOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FormDataOperations", + "MultiPartClientFormDataOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py index 5e787d82e1..8fbea80a7a 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/aio/operations/_operations.py @@ -27,23 +27,23 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import prepare_multipart_form_data from ...operations._operations import ( - build_form_data_anonymous_model_request, - build_form_data_basic_request, - build_form_data_binary_array_parts_request, - build_form_data_check_file_name_and_content_type_request, - build_form_data_file_array_and_basic_request, - build_form_data_file_upload_file_array_request, - build_form_data_file_upload_file_required_filename_request, - build_form_data_file_upload_file_specific_content_type_request, - build_form_data_http_parts_content_type_image_jpeg_content_type_request, - build_form_data_http_parts_content_type_optional_content_type_request, - build_form_data_http_parts_content_type_required_content_type_request, - build_form_data_http_parts_json_array_and_file_array_request, - build_form_data_http_parts_non_string_float_request, - build_form_data_json_part_request, - build_form_data_multi_binary_parts_request, - build_form_data_optional_parts_request, - build_form_data_with_wire_name_request, + build_multi_part_client_form_data_anonymous_model_request, + build_multi_part_client_form_data_basic_request, + build_multi_part_client_form_data_binary_array_parts_request, + build_multi_part_client_form_data_check_file_name_and_content_type_request, + build_multi_part_client_form_data_file_array_and_basic_request, + build_multi_part_client_form_data_file_upload_file_array_request, + build_multi_part_client_form_data_file_upload_file_required_filename_request, + build_multi_part_client_form_data_file_upload_file_specific_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_required_content_type_request, + build_multi_part_client_form_data_http_parts_json_array_and_file_array_request, + build_multi_part_client_form_data_http_parts_non_string_float_request, + build_multi_part_client_form_data_json_part_request, + build_multi_part_client_form_data_multi_binary_parts_request, + build_multi_part_client_form_data_optional_parts_request, + build_multi_part_client_form_data_with_wire_name_request, ) from .._configuration import MultiPartClientConfiguration @@ -52,14 +52,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataOperations: +class MultiPartClientFormDataOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`form_data` attribute. + :attr:`multi_part_client_form_data` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,8 +69,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) - self.file = FormDataFileOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data_http_parts = MultiPartClientFormDataHttpPartsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.multi_part_client_form_data_file = MultiPartClientFormDataFileOperations( + self._client, self._config, self._serialize, self._deserialize + ) @overload async def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: @@ -122,7 +126,7 @@ async def basic(self, body: Union[_models.MultiPartRequest, JSON], **kwargs: Any _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_basic_request( + _request = build_multi_part_client_form_data_basic_request( files=_files, headers=_headers, params=_params, @@ -196,7 +200,7 @@ async def with_wire_name(self, body: Union[_models.MultiPartRequestWithWireName, _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_with_wire_name_request( + _request = build_multi_part_client_form_data_with_wire_name_request( files=_files, headers=_headers, params=_params, @@ -270,7 +274,7 @@ async def optional_parts(self, body: Union[_models.MultiPartOptionalRequest, JSO _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_optional_parts_request( + _request = build_multi_part_client_form_data_optional_parts_request( files=_files, headers=_headers, params=_params, @@ -344,7 +348,7 @@ async def file_array_and_basic(self, body: Union[_models.ComplexPartsRequest, JS _data_fields: list[str] = ["id", "address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_array_and_basic_request( + _request = build_multi_part_client_form_data_file_array_and_basic_request( files=_files, headers=_headers, params=_params, @@ -418,7 +422,7 @@ async def json_part(self, body: Union[_models.JsonPartRequest, JSON], **kwargs: _data_fields: list[str] = ["address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_json_part_request( + _request = build_multi_part_client_form_data_json_part_request( files=_files, headers=_headers, params=_params, @@ -492,7 +496,7 @@ async def binary_array_parts(self, body: Union[_models.BinaryArrayPartsRequest, _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_binary_array_parts_request( + _request = build_multi_part_client_form_data_binary_array_parts_request( files=_files, headers=_headers, params=_params, @@ -566,7 +570,7 @@ async def multi_binary_parts(self, body: Union[_models.MultiBinaryPartsRequest, _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_multi_binary_parts_request( + _request = build_multi_part_client_form_data_multi_binary_parts_request( files=_files, headers=_headers, params=_params, @@ -642,7 +646,7 @@ async def check_file_name_and_content_type( _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_check_file_name_and_content_type_request( + _request = build_multi_part_client_form_data_check_file_name_and_content_type_request( files=_files, headers=_headers, params=_params, @@ -716,7 +720,7 @@ async def anonymous_model(self, body: Union[_models.AnonymousModelRequest, JSON] _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_anonymous_model_request( + _request = build_multi_part_client_form_data_anonymous_model_request( files=_files, headers=_headers, params=_params, @@ -741,14 +745,14 @@ async def anonymous_model(self, body: Union[_models.AnonymousModelRequest, JSON] return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsOperations: +class MultiPartClientFormDataHttpPartsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`http_parts` attribute. + :attr:`multi_part_client_form_data_http_parts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -758,10 +762,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.content_type = FormDataHttpPartsContentTypeOperations( - self._client, self._config, self._serialize, self._deserialize + self.multi_part_client_form_data_http_parts_content_type = ( + MultiPartClientFormDataHttpPartsContentTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.non_string = FormDataHttpPartsNonStringOperations( + self.multi_part_client_form_data_http_parts_non_string = MultiPartClientFormDataHttpPartsNonStringOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -817,7 +823,7 @@ async def json_array_and_file_array( _data_fields: list[str] = ["id", "address", "previousAddresses"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_json_array_and_file_array_request( + _request = build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( files=_files, headers=_headers, params=_params, @@ -842,14 +848,14 @@ async def json_array_and_file_array( return cls(pipeline_response, None, {}) # type: ignore -class FormDataFileOperations: +class MultiPartClientFormDataFileOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`file` attribute. + :attr:`multi_part_client_form_data_file` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -913,7 +919,7 @@ async def upload_file_specific_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_specific_content_type_request( + _request = build_multi_part_client_form_data_file_upload_file_specific_content_type_request( files=_files, headers=_headers, params=_params, @@ -991,7 +997,7 @@ async def upload_file_required_filename( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_required_filename_request( + _request = build_multi_part_client_form_data_file_upload_file_required_filename_request( files=_files, headers=_headers, params=_params, @@ -1065,7 +1071,7 @@ async def upload_file_array(self, body: Union[_models.UploadFileArrayRequest, JS _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_array_request( + _request = build_multi_part_client_form_data_file_upload_file_array_request( files=_files, headers=_headers, params=_params, @@ -1090,14 +1096,14 @@ async def upload_file_array(self, body: Union[_models.UploadFileArrayRequest, JS return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsContentTypeOperations: +class MultiPartClientFormDataHttpPartsContentTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`content_type` attribute. + :attr:`multi_part_client_form_data_http_parts_content_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1162,7 +1168,7 @@ async def image_jpeg_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_image_jpeg_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( files=_files, headers=_headers, params=_params, @@ -1241,7 +1247,7 @@ async def required_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_required_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( files=_files, headers=_headers, params=_params, @@ -1320,7 +1326,7 @@ async def optional_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_optional_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( files=_files, headers=_headers, params=_params, @@ -1345,14 +1351,14 @@ async def optional_content_type( return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsNonStringOperations: +class MultiPartClientFormDataHttpPartsNonStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`non_string` attribute. + :attr:`multi_part_client_form_data_http_parts_non_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1412,7 +1418,7 @@ async def float(self, body: Union[_models.FloatRequest, JSON], **kwargs: Any) -> _data_fields: list[str] = ["temperature"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_non_string_float_request( + _request = build_multi_part_client_form_data_http_parts_non_string_float_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/__init__.py index a3f0f414f4..93782fe1bc 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FormDataOperations # type: ignore +from ._operations import MultiPartClientFormDataOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FormDataOperations", + "MultiPartClientFormDataOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py index 877227b25b..c2fcacfe28 100644 --- a/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-multipart/payload/multipart/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,7 +37,7 @@ _SERIALIZER.client_side_validation = False -def build_form_data_basic_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_basic_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -46,7 +46,9 @@ def build_form_data_basic_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_with_wire_name_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_with_wire_name_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -55,7 +57,9 @@ def build_form_data_with_wire_name_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_optional_parts_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_optional_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -64,7 +68,9 @@ def build_form_data_optional_parts_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_array_and_basic_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_array_and_basic_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -73,7 +79,7 @@ def build_form_data_file_array_and_basic_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_json_part_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_json_part_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -82,7 +88,9 @@ def build_form_data_json_part_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_binary_array_parts_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_binary_array_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -91,7 +99,9 @@ def build_form_data_binary_array_parts_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_multi_binary_parts_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_multi_binary_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -100,7 +110,7 @@ def build_form_data_multi_binary_parts_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_check_file_name_and_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_check_file_name_and_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -111,7 +121,9 @@ def build_form_data_check_file_name_and_content_type_request( # pylint: disable return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_anonymous_model_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_anonymous_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -120,7 +132,7 @@ def build_form_data_anonymous_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_json_array_and_file_array_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -131,7 +143,7 @@ def build_form_data_http_parts_json_array_and_file_array_request( # pylint: dis return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_upload_file_specific_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_specific_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -142,7 +154,7 @@ def build_form_data_file_upload_file_specific_content_type_request( # pylint: d return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_upload_file_required_filename_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_required_filename_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -153,7 +165,9 @@ def build_form_data_file_upload_file_required_filename_request( # pylint: disab return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_upload_file_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -162,7 +176,7 @@ def build_form_data_file_upload_file_array_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_content_type_image_jpeg_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -173,7 +187,7 @@ def build_form_data_http_parts_content_type_image_jpeg_content_type_request( # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_content_type_required_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -184,7 +198,7 @@ def build_form_data_http_parts_content_type_required_content_type_request( # py return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_content_type_optional_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -195,7 +209,9 @@ def build_form_data_http_parts_content_type_optional_content_type_request( # py return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_non_string_float_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_non_string_float_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -204,14 +220,14 @@ def build_form_data_http_parts_non_string_float_request(**kwargs: Any) -> HttpRe return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataOperations: +class MultiPartClientFormDataOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`form_data` attribute. + :attr:`multi_part_client_form_data` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -221,8 +237,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) - self.file = FormDataFileOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data_http_parts = MultiPartClientFormDataHttpPartsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.multi_part_client_form_data_file = MultiPartClientFormDataFileOperations( + self._client, self._config, self._serialize, self._deserialize + ) @overload def basic(self, body: _models.MultiPartRequest, **kwargs: Any) -> None: @@ -276,7 +296,7 @@ def basic( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_basic_request( + _request = build_multi_part_client_form_data_basic_request( files=_files, headers=_headers, params=_params, @@ -352,7 +372,7 @@ def with_wire_name( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_with_wire_name_request( + _request = build_multi_part_client_form_data_with_wire_name_request( files=_files, headers=_headers, params=_params, @@ -428,7 +448,7 @@ def optional_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_optional_parts_request( + _request = build_multi_part_client_form_data_optional_parts_request( files=_files, headers=_headers, params=_params, @@ -504,7 +524,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id", "address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_array_and_basic_request( + _request = build_multi_part_client_form_data_file_array_and_basic_request( files=_files, headers=_headers, params=_params, @@ -580,7 +600,7 @@ def json_part( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_json_part_request( + _request = build_multi_part_client_form_data_json_part_request( files=_files, headers=_headers, params=_params, @@ -656,7 +676,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_binary_array_parts_request( + _request = build_multi_part_client_form_data_binary_array_parts_request( files=_files, headers=_headers, params=_params, @@ -732,7 +752,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_multi_binary_parts_request( + _request = build_multi_part_client_form_data_multi_binary_parts_request( files=_files, headers=_headers, params=_params, @@ -808,7 +828,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_check_file_name_and_content_type_request( + _request = build_multi_part_client_form_data_check_file_name_and_content_type_request( files=_files, headers=_headers, params=_params, @@ -884,7 +904,7 @@ def anonymous_model( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_anonymous_model_request( + _request = build_multi_part_client_form_data_anonymous_model_request( files=_files, headers=_headers, params=_params, @@ -909,14 +929,14 @@ def anonymous_model( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsOperations: +class MultiPartClientFormDataHttpPartsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`http_parts` attribute. + :attr:`multi_part_client_form_data_http_parts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -926,10 +946,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.content_type = FormDataHttpPartsContentTypeOperations( - self._client, self._config, self._serialize, self._deserialize + self.multi_part_client_form_data_http_parts_content_type = ( + MultiPartClientFormDataHttpPartsContentTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.non_string = FormDataHttpPartsNonStringOperations( + self.multi_part_client_form_data_http_parts_non_string = MultiPartClientFormDataHttpPartsNonStringOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -985,7 +1007,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id", "address", "previousAddresses"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_json_array_and_file_array_request( + _request = build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( files=_files, headers=_headers, params=_params, @@ -1010,14 +1032,14 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FormDataFileOperations: +class MultiPartClientFormDataFileOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`file` attribute. + :attr:`multi_part_client_form_data_file` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1081,7 +1103,7 @@ def upload_file_specific_content_type( # pylint: disable=inconsistent-return-st _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_specific_content_type_request( + _request = build_multi_part_client_form_data_file_upload_file_specific_content_type_request( files=_files, headers=_headers, params=_params, @@ -1157,7 +1179,7 @@ def upload_file_required_filename( # pylint: disable=inconsistent-return-statem _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_required_filename_request( + _request = build_multi_part_client_form_data_file_upload_file_required_filename_request( files=_files, headers=_headers, params=_params, @@ -1233,7 +1255,7 @@ def upload_file_array( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_array_request( + _request = build_multi_part_client_form_data_file_upload_file_array_request( files=_files, headers=_headers, params=_params, @@ -1258,14 +1280,14 @@ def upload_file_array( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsContentTypeOperations: +class MultiPartClientFormDataHttpPartsContentTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`content_type` attribute. + :attr:`multi_part_client_form_data_http_parts_content_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1328,7 +1350,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_image_jpeg_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( files=_files, headers=_headers, params=_params, @@ -1405,7 +1427,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_required_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( files=_files, headers=_headers, params=_params, @@ -1482,7 +1504,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_optional_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( files=_files, headers=_headers, params=_params, @@ -1507,14 +1529,14 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FormDataHttpPartsNonStringOperations: +class MultiPartClientFormDataHttpPartsNonStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`non_string` attribute. + :attr:`multi_part_client_form_data_http_parts_non_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1576,7 +1598,7 @@ def float( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["temperature"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_non_string_float_request( + _request = build_multi_part_client_form_data_http_parts_non_string_float_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/apiview-properties.json b/packages/typespec-python/test/azure/generated/payload-pageable/apiview-properties.json index 4758f8b27f..52ee36cb32 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/payload-pageable/apiview-properties.json @@ -9,19 +9,19 @@ "payload.pageable.serverdrivenpagination.continuationtoken.models.RequestQueryNestedResponseBodyResponseNestedItems": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestQueryNestedResponseBody.Response.nestedItems.anonymous", "payload.pageable.serverdrivenpagination.continuationtoken.models.RequestQueryNestedResponseBodyResponseNestedNext": "Payload.Pageable.ServerDrivenPagination.ContinuationToken.requestQueryNestedResponseBody.Response.nestedNext.anonymous", "payload.pageable.models.XmlPet": "Payload.Pageable.XmlPet", - "payload.pageable.operations.ServerDrivenPaginationOperations.link": "Payload.Pageable.ServerDrivenPagination.link", - "payload.pageable.aio.operations.ServerDrivenPaginationOperations.link": "Payload.Pageable.ServerDrivenPagination.link", - "payload.pageable.operations.ServerDrivenPaginationOperations.link_string": "Payload.Pageable.ServerDrivenPagination.linkString", - "payload.pageable.aio.operations.ServerDrivenPaginationOperations.link_string": "Payload.Pageable.ServerDrivenPagination.linkString", - "payload.pageable.operations.ServerDrivenPaginationOperations.nested_link": "Payload.Pageable.ServerDrivenPagination.nestedLink", - "payload.pageable.aio.operations.ServerDrivenPaginationOperations.nested_link": "Payload.Pageable.ServerDrivenPagination.nestedLink", - "payload.pageable.operations.PageSizeOperations.list_without_continuation": "Payload.Pageable.PageSize.listWithoutContinuation", - "payload.pageable.aio.operations.PageSizeOperations.list_without_continuation": "Payload.Pageable.PageSize.listWithoutContinuation", - "payload.pageable.operations.PageSizeOperations.list_with_page_size": "Payload.Pageable.PageSize.listWithPageSize", - "payload.pageable.aio.operations.PageSizeOperations.list_with_page_size": "Payload.Pageable.PageSize.listWithPageSize", - "payload.pageable.operations.XmlPaginationOperations.list_with_continuation": "Payload.Pageable.XmlPagination.listWithContinuation", - "payload.pageable.aio.operations.XmlPaginationOperations.list_with_continuation": "Payload.Pageable.XmlPagination.listWithContinuation", - "payload.pageable.operations.XmlPaginationOperations.list_with_next_link": "Payload.Pageable.XmlPagination.listWithNextLink", - "payload.pageable.aio.operations.XmlPaginationOperations.list_with_next_link": "Payload.Pageable.XmlPagination.listWithNextLink" + "payload.pageable.operations.PageableClientServerDrivenPaginationOperations.link": "Payload.Pageable.ServerDrivenPagination.link", + "payload.pageable.aio.operations.PageableClientServerDrivenPaginationOperations.link": "Payload.Pageable.ServerDrivenPagination.link", + "payload.pageable.operations.PageableClientServerDrivenPaginationOperations.link_string": "Payload.Pageable.ServerDrivenPagination.linkString", + "payload.pageable.aio.operations.PageableClientServerDrivenPaginationOperations.link_string": "Payload.Pageable.ServerDrivenPagination.linkString", + "payload.pageable.operations.PageableClientServerDrivenPaginationOperations.nested_link": "Payload.Pageable.ServerDrivenPagination.nestedLink", + "payload.pageable.aio.operations.PageableClientServerDrivenPaginationOperations.nested_link": "Payload.Pageable.ServerDrivenPagination.nestedLink", + "payload.pageable.operations.PageableClientPageSizeOperations.list_without_continuation": "Payload.Pageable.PageSize.listWithoutContinuation", + "payload.pageable.aio.operations.PageableClientPageSizeOperations.list_without_continuation": "Payload.Pageable.PageSize.listWithoutContinuation", + "payload.pageable.operations.PageableClientPageSizeOperations.list_with_page_size": "Payload.Pageable.PageSize.listWithPageSize", + "payload.pageable.aio.operations.PageableClientPageSizeOperations.list_with_page_size": "Payload.Pageable.PageSize.listWithPageSize", + "payload.pageable.operations.PageableClientXmlPaginationOperations.list_with_continuation": "Payload.Pageable.XmlPagination.listWithContinuation", + "payload.pageable.aio.operations.PageableClientXmlPaginationOperations.list_with_continuation": "Payload.Pageable.XmlPagination.listWithContinuation", + "payload.pageable.operations.PageableClientXmlPaginationOperations.list_with_next_link": "Payload.Pageable.XmlPagination.listWithNextLink", + "payload.pageable.aio.operations.PageableClientXmlPaginationOperations.list_with_next_link": "Payload.Pageable.XmlPagination.listWithNextLink" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations.py new file mode 100644 index 0000000000..1860cf2fa0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import PageableClientTestBase, PageablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientPageSizeOperations(PageableClientTestBase): + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_page_size_list_without_continuation(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_page_size.list_without_continuation() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_page_size_list_with_page_size(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_page_size.list_with_page_size() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations_async.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations_async.py new file mode 100644 index 0000000000..61ffe2e9ea --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_page_size_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import PageablePreparer +from testpreparer_async import PageableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientPageSizeOperationsAsync(PageableClientTestBaseAsync): + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_page_size_list_without_continuation(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_page_size.list_without_continuation() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_page_size_list_with_page_size(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_page_size.list_with_page_size() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations.py new file mode 100644 index 0000000000..364b71e237 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations.py @@ -0,0 +1,119 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import PageableClientTestBase, PageablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientServerDrivenPaginationOperations(PageableClientTestBase): + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_link(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.link() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_link_string(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.link_string() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_nested_link(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.nested_link() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_response_body( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_response_body() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_response_body( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_response_body() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_response_header( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_response_header() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_response_header( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_response_header() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_nested_response_body() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body( + self, pageable_endpoint + ): + client = self.create_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_nested_response_body() + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations_async.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations_async.py new file mode 100644 index 0000000000..093dcdab79 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_server_driven_pagination_operations_async.py @@ -0,0 +1,120 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import PageablePreparer +from testpreparer_async import PageableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientServerDrivenPaginationOperationsAsync(PageableClientTestBaseAsync): + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_link(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.link() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_link_string(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.link_string() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_nested_link(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_server_driven_pagination.nested_link() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_response_body( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_response_body() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_response_body( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_response_body() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_response_header( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_response_header() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_response_header( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_response_header() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_query_nested_response_body() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_server_driven_pagination_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body( + self, pageable_endpoint + ): + client = self.create_async_client(endpoint=pageable_endpoint) + response = ( + client.pageable_client_server_driven_pagination.pageable_client_server_driven_pagination_continuation_token.request_header_nested_response_body() + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations.py new file mode 100644 index 0000000000..7f84a7f1b3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import PageableClientTestBase, PageablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientXmlPaginationOperations(PageableClientTestBase): + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_xml_pagination_list_with_continuation(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_xml_pagination.list_with_continuation() + result = [r for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy + def test_pageable_client_xml_pagination_list_with_next_link(self, pageable_endpoint): + client = self.create_client(endpoint=pageable_endpoint) + response = client.pageable_client_xml_pagination.list_with_next_link() + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations_async.py b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations_async.py new file mode 100644 index 0000000000..e96e80119f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-pageable/generated_tests/test_pageable_pageable_client_xml_pagination_operations_async.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import PageablePreparer +from testpreparer_async import PageableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestPageablePageableClientXmlPaginationOperationsAsync(PageableClientTestBaseAsync): + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_xml_pagination_list_with_continuation(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_xml_pagination.list_with_continuation() + result = [r async for r in response] + # please add some check logic here by yourself + # ... + + @PageablePreparer() + @recorded_by_proxy_async + async def test_pageable_client_xml_pagination_list_with_next_link(self, pageable_endpoint): + client = self.create_async_client(endpoint=pageable_endpoint) + response = client.pageable_client_xml_pagination.list_with_next_link() + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_client.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_client.py index 20b9cdc7b9..8582e7ebc0 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/_client.py @@ -16,20 +16,24 @@ from ._configuration import PageableClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .pagesize.operations import PageSizeOperations -from .serverdrivenpagination.operations import ServerDrivenPaginationOperations -from .xmlpagination.operations import XmlPaginationOperations +from .pagesize.operations import PageableClientPageSizeOperations +from .serverdrivenpagination.operations import PageableClientServerDrivenPaginationOperations +from .xmlpagination.operations import PageableClientXmlPaginationOperations class PageableClient: # pylint: disable=client-accepts-api-version-keyword """Test for pageable payload. - :ivar server_driven_pagination: ServerDrivenPaginationOperations operations - :vartype server_driven_pagination: payload.pageable.operations.ServerDrivenPaginationOperations - :ivar page_size: PageSizeOperations operations - :vartype page_size: payload.pageable.operations.PageSizeOperations - :ivar xml_pagination: XmlPaginationOperations operations - :vartype xml_pagination: payload.pageable.operations.XmlPaginationOperations + :ivar pageable_client_server_driven_pagination: PageableClientServerDrivenPaginationOperations + operations + :vartype pageable_client_server_driven_pagination: + payload.pageable.operations.PageableClientServerDrivenPaginationOperations + :ivar pageable_client_page_size: PageableClientPageSizeOperations operations + :vartype pageable_client_page_size: + payload.pageable.operations.PageableClientPageSizeOperations + :ivar pageable_client_xml_pagination: PageableClientXmlPaginationOperations operations + :vartype pageable_client_xml_pagination: + payload.pageable.operations.PageableClientXmlPaginationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -62,11 +66,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.server_driven_pagination = ServerDrivenPaginationOperations( + self.pageable_client_server_driven_pagination = PageableClientServerDrivenPaginationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_page_size = PageableClientPageSizeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_xml_pagination = PageableClientXmlPaginationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.page_size = PageSizeOperations(self._client, self._config, self._serialize, self._deserialize) - self.xml_pagination = XmlPaginationOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_client.py index c25cf8b3cc..a311f7f5f3 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/aio/_client.py @@ -15,22 +15,25 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..pagesize.aio.operations import PageSizeOperations -from ..serverdrivenpagination.aio.operations import ServerDrivenPaginationOperations -from ..xmlpagination.aio.operations import XmlPaginationOperations +from ..pagesize.aio.operations import PageableClientPageSizeOperations +from ..serverdrivenpagination.aio.operations import PageableClientServerDrivenPaginationOperations +from ..xmlpagination.aio.operations import PageableClientXmlPaginationOperations from ._configuration import PageableClientConfiguration class PageableClient: # pylint: disable=client-accepts-api-version-keyword """Test for pageable payload. - :ivar server_driven_pagination: ServerDrivenPaginationOperations operations - :vartype server_driven_pagination: - payload.pageable.aio.operations.ServerDrivenPaginationOperations - :ivar page_size: PageSizeOperations operations - :vartype page_size: payload.pageable.aio.operations.PageSizeOperations - :ivar xml_pagination: XmlPaginationOperations operations - :vartype xml_pagination: payload.pageable.aio.operations.XmlPaginationOperations + :ivar pageable_client_server_driven_pagination: PageableClientServerDrivenPaginationOperations + operations + :vartype pageable_client_server_driven_pagination: + payload.pageable.aio.operations.PageableClientServerDrivenPaginationOperations + :ivar pageable_client_page_size: PageableClientPageSizeOperations operations + :vartype pageable_client_page_size: + payload.pageable.aio.operations.PageableClientPageSizeOperations + :ivar pageable_client_xml_pagination: PageableClientXmlPaginationOperations operations + :vartype pageable_client_xml_pagination: + payload.pageable.aio.operations.PageableClientXmlPaginationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,11 +66,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.server_driven_pagination = ServerDrivenPaginationOperations( + self.pageable_client_server_driven_pagination = PageableClientServerDrivenPaginationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_page_size = PageableClientPageSizeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_xml_pagination = PageableClientXmlPaginationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.page_size = PageSizeOperations(self._client, self._config, self._serialize, self._deserialize) - self.xml_pagination = XmlPaginationOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py index a0f529b11d..d96fe37050 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PageSizeOperations # type: ignore +from ._operations import PageableClientPageSizeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PageSizeOperations", + "PageableClientPageSizeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py index 079d923fb4..48f84506ae 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py @@ -27,22 +27,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_page_size_list_with_page_size_request, - build_page_size_list_without_continuation_request, + build_pageable_client_page_size_list_with_page_size_request, + build_pageable_client_page_size_list_without_continuation_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PageSizeOperations: +class PageableClientPageSizeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`page_size` attribute. + :attr:`pageable_client_page_size` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ def list_without_continuation(self, **kwargs: Any) -> AsyncItemPaged["_models3.P def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_without_continuation_request( + _request = build_pageable_client_page_size_list_without_continuation_request( headers=_headers, params=_params, ) @@ -148,7 +148,7 @@ def list_with_page_size(self, *, page_size: Optional[int] = None, **kwargs: Any) def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_with_page_size_request( + _request = build_pageable_client_page_size_list_with_page_size_request( page_size=page_size, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py index a0f529b11d..d96fe37050 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PageSizeOperations # type: ignore +from ._operations import PageableClientPageSizeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PageSizeOperations", + "PageableClientPageSizeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py index 5d77f2329c..60c53ad5ba 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py @@ -35,7 +35,9 @@ _SERIALIZER.client_side_validation = False -def build_page_size_list_without_continuation_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_page_size_list_without_continuation_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -49,7 +51,7 @@ def build_page_size_list_without_continuation_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_page_size_list_with_page_size_request( # pylint: disable=name-too-long +def build_pageable_client_page_size_list_with_page_size_request( # pylint: disable=name-too-long *, page_size: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -70,14 +72,14 @@ def build_page_size_list_with_page_size_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class PageSizeOperations: +class PageableClientPageSizeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`page_size` attribute. + :attr:`pageable_client_page_size` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -111,7 +113,7 @@ def list_without_continuation(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_without_continuation_request( + _request = build_pageable_client_page_size_list_without_continuation_request( headers=_headers, params=_params, ) @@ -183,7 +185,7 @@ def list_with_page_size(self, *, page_size: Optional[int] = None, **kwargs: Any) def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_with_page_size_request( + _request = build_pageable_client_page_size_list_with_page_size_request( page_size=page_size, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py index c027b74a4b..2a80c8bc21 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ServerDrivenPaginationOperations # type: ignore +from ._operations import PageableClientServerDrivenPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ServerDrivenPaginationOperations", + "PageableClientServerDrivenPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py index 96edd57ebb..496cb5a992 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py @@ -26,25 +26,27 @@ from ...._utils.model_base import _deserialize from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration -from ...continuationtoken.aio.operations._operations import ServerDrivenPaginationContinuationTokenOperations +from ...continuationtoken.aio.operations._operations import ( + PageableClientServerDrivenPaginationContinuationTokenOperations, +) from ...operations._operations import ( - build_server_driven_pagination_link_request, - build_server_driven_pagination_link_string_request, - build_server_driven_pagination_nested_link_request, + build_pageable_client_server_driven_pagination_link_request, + build_pageable_client_server_driven_pagination_link_string_request, + build_pageable_client_server_driven_pagination_nested_link_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ServerDrivenPaginationOperations: +class PageableClientServerDrivenPaginationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`server_driven_pagination` attribute. + :attr:`pageable_client_server_driven_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -54,8 +56,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.continuation_token = ServerDrivenPaginationContinuationTokenOperations( - self._client, self._config, self._serialize, self._deserialize + self.pageable_client_server_driven_pagination_continuation_token = ( + PageableClientServerDrivenPaginationContinuationTokenOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) @distributed_trace @@ -82,7 +86,7 @@ def link(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_request( + _request = build_pageable_client_server_driven_pagination_link_request( headers=_headers, params=_params, ) @@ -152,7 +156,7 @@ def link_string(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_string_request( + _request = build_pageable_client_server_driven_pagination_link_string_request( headers=_headers, params=_params, ) @@ -222,7 +226,7 @@ def nested_link(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_nested_link_request( + _request = build_pageable_client_server_driven_pagination_nested_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py index 9aeffe85bf..4fd6f62496 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,26 +28,26 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_server_driven_pagination_continuation_token_request_header_nested_response_body_request, - build_server_driven_pagination_continuation_token_request_header_response_body_request, - build_server_driven_pagination_continuation_token_request_header_response_header_request, - build_server_driven_pagination_continuation_token_request_query_nested_response_body_request, - build_server_driven_pagination_continuation_token_request_query_response_body_request, - build_server_driven_pagination_continuation_token_request_query_response_header_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long +class PageableClientServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`continuation_token` attribute. + :attr:`pageable_client_server_driven_pagination_continuation_token` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -85,12 +86,14 @@ def request_query_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -151,12 +154,14 @@ def request_header_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -217,12 +222,14 @@ def request_query_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_header_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -283,7 +290,7 @@ def request_header_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_header_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( token=_continuation_token, foo=foo, bar=bar, @@ -349,7 +356,7 @@ def request_query_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, @@ -415,7 +422,7 @@ def request_header_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py index 8345197487..de3f0c1b47 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py @@ -36,7 +36,7 @@ _SERIALIZER.client_side_validation = False -def build_server_driven_pagination_continuation_token_request_query_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -61,7 +61,7 @@ def build_server_driven_pagination_continuation_token_request_query_response_bod return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -86,7 +86,7 @@ def build_server_driven_pagination_continuation_token_request_header_response_bo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_query_response_header_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -111,7 +111,7 @@ def build_server_driven_pagination_continuation_token_request_query_response_hea return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_response_header_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -136,7 +136,7 @@ def build_server_driven_pagination_continuation_token_request_header_response_he return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -161,7 +161,7 @@ def build_server_driven_pagination_continuation_token_request_query_nested_respo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -186,14 +186,14 @@ def build_server_driven_pagination_continuation_token_request_header_nested_resp return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class ServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long +class PageableClientServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`continuation_token` attribute. + :attr:`pageable_client_server_driven_pagination_continuation_token` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -232,12 +232,14 @@ def request_query_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -298,12 +300,14 @@ def request_header_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -364,12 +368,14 @@ def request_query_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_header_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -430,7 +436,7 @@ def request_header_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_header_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( token=_continuation_token, foo=foo, bar=bar, @@ -496,7 +502,7 @@ def request_query_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, @@ -562,7 +568,7 @@ def request_header_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py index c027b74a4b..2a80c8bc21 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ServerDrivenPaginationOperations # type: ignore +from ._operations import PageableClientServerDrivenPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ServerDrivenPaginationOperations", + "PageableClientServerDrivenPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py index c8f5c6c488..c8101082da 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py @@ -27,7 +27,7 @@ from ..._configuration import PageableClientConfiguration from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer -from ..continuationtoken.operations._operations import ServerDrivenPaginationContinuationTokenOperations +from ..continuationtoken.operations._operations import PageableClientServerDrivenPaginationContinuationTokenOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -36,7 +36,9 @@ _SERIALIZER.client_side_validation = False -def build_server_driven_pagination_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -50,7 +52,9 @@ def build_server_driven_pagination_link_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_server_driven_pagination_link_string_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_link_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -64,7 +68,9 @@ def build_server_driven_pagination_link_string_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_server_driven_pagination_nested_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_nested_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -78,14 +84,14 @@ def build_server_driven_pagination_nested_link_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class ServerDrivenPaginationOperations: +class PageableClientServerDrivenPaginationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`server_driven_pagination` attribute. + :attr:`pageable_client_server_driven_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -95,8 +101,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.continuation_token = ServerDrivenPaginationContinuationTokenOperations( - self._client, self._config, self._serialize, self._deserialize + self.pageable_client_server_driven_pagination_continuation_token = ( + PageableClientServerDrivenPaginationContinuationTokenOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) @distributed_trace @@ -123,7 +131,7 @@ def link(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_request( + _request = build_pageable_client_server_driven_pagination_link_request( headers=_headers, params=_params, ) @@ -193,7 +201,7 @@ def link_string(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_string_request( + _request = build_pageable_client_server_driven_pagination_link_string_request( headers=_headers, params=_params, ) @@ -263,7 +271,7 @@ def nested_link(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_nested_link_request( + _request = build_pageable_client_server_driven_pagination_nested_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py index 32561ef802..37b911635f 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import XmlPaginationOperations # type: ignore +from ._operations import PageableClientXmlPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "XmlPaginationOperations", + "PageableClientXmlPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py index 59150f4cc5..ca0395f423 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py @@ -28,22 +28,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_xml_pagination_list_with_continuation_request, - build_xml_pagination_list_with_next_link_request, + build_pageable_client_xml_pagination_list_with_continuation_request, + build_pageable_client_xml_pagination_list_with_next_link_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class XmlPaginationOperations: +class PageableClientXmlPaginationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`xml_pagination` attribute. + :attr:`pageable_client_xml_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ def list_with_continuation(self, **kwargs: Any) -> AsyncItemPaged["_models3.XmlP def prepare_request(_continuation_token=None): - _request = build_xml_pagination_list_with_continuation_request( + _request = build_pageable_client_xml_pagination_list_with_continuation_request( marker=_continuation_token, headers=_headers, params=_params, @@ -136,7 +136,7 @@ def list_with_next_link(self, **kwargs: Any) -> AsyncItemPaged["_models3.XmlPet" def prepare_request(next_link=None): if not next_link: - _request = build_xml_pagination_list_with_next_link_request( + _request = build_pageable_client_xml_pagination_list_with_next_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py index 32561ef802..37b911635f 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import XmlPaginationOperations # type: ignore +from ._operations import PageableClientXmlPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "XmlPaginationOperations", + "PageableClientXmlPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py index 962210a3b1..b0732cdf12 100644 --- a/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py @@ -36,7 +36,7 @@ _SERIALIZER.client_side_validation = False -def build_xml_pagination_list_with_continuation_request( # pylint: disable=name-too-long +def build_pageable_client_xml_pagination_list_with_continuation_request( # pylint: disable=name-too-long *, marker: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -57,7 +57,9 @@ def build_xml_pagination_list_with_continuation_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_xml_pagination_list_with_next_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_xml_pagination_list_with_next_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -71,14 +73,14 @@ def build_xml_pagination_list_with_next_link_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class XmlPaginationOperations: +class PageableClientXmlPaginationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`xml_pagination` attribute. + :attr:`pageable_client_xml_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -111,7 +113,7 @@ def list_with_continuation(self, **kwargs: Any) -> ItemPaged["_models2.XmlPet"]: def prepare_request(_continuation_token=None): - _request = build_xml_pagination_list_with_continuation_request( + _request = build_pageable_client_xml_pagination_list_with_continuation_request( marker=_continuation_token, headers=_headers, params=_params, @@ -171,7 +173,7 @@ def list_with_next_link(self, **kwargs: Any) -> ItemPaged["_models2.XmlPet"]: def prepare_request(next_link=None): if not next_link: - _request = build_xml_pagination_list_with_next_link_request( + _request = build_pageable_client_xml_pagination_list_with_next_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-xml/apiview-properties.json b/packages/typespec-python/test/azure/generated/payload-xml/apiview-properties.json index 36b83986c6..39c4060dd8 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/payload-xml/apiview-properties.json @@ -3,11 +3,9 @@ "CrossLanguageDefinitionId": { "payload.xml.models.ModelWithArrayOfModel": "Payload.Xml.ModelWithArrayOfModel", "payload.xml.models.ModelWithAttributes": "Payload.Xml.ModelWithAttributes", - "payload.xml.models.ModelWithDatetime": "Payload.Xml.ModelWithDatetime", "payload.xml.models.ModelWithDictionary": "Payload.Xml.ModelWithDictionary", "payload.xml.models.ModelWithEmptyArray": "Payload.Xml.ModelWithEmptyArray", "payload.xml.models.ModelWithEncodedNames": "Payload.Xml.ModelWithEncodedNames", - "payload.xml.models.ModelWithEnum": "Payload.Xml.ModelWithEnum", "payload.xml.models.ModelWithOptionalField": "Payload.Xml.ModelWithOptionalField", "payload.xml.models.ModelWithRenamedArrays": "Payload.Xml.ModelWithRenamedArrays", "payload.xml.models.ModelWithRenamedFields": "Payload.Xml.ModelWithRenamedFields", @@ -16,64 +14,55 @@ "payload.xml.models.ModelWithUnwrappedArray": "Payload.Xml.ModelWithUnwrappedArray", "payload.xml.models.SimpleModel": "Payload.Xml.SimpleModel", "payload.xml.models.XmlErrorBody": "Payload.Xml.XmlErrorBody", - "payload.xml.models.Status": "Payload.Xml.Status", - "payload.xml.operations.SimpleModelValueOperations.get": "Payload.Xml.SimpleModelValue.get", - "payload.xml.aio.operations.SimpleModelValueOperations.get": "Payload.Xml.SimpleModelValue.get", - "payload.xml.operations.SimpleModelValueOperations.put": "Payload.Xml.SimpleModelValue.put", - "payload.xml.aio.operations.SimpleModelValueOperations.put": "Payload.Xml.SimpleModelValue.put", - "payload.xml.operations.ModelWithSimpleArraysValueOperations.get": "Payload.Xml.ModelWithSimpleArraysValue.get", - "payload.xml.aio.operations.ModelWithSimpleArraysValueOperations.get": "Payload.Xml.ModelWithSimpleArraysValue.get", - "payload.xml.operations.ModelWithSimpleArraysValueOperations.put": "Payload.Xml.ModelWithSimpleArraysValue.put", - "payload.xml.aio.operations.ModelWithSimpleArraysValueOperations.put": "Payload.Xml.ModelWithSimpleArraysValue.put", - "payload.xml.operations.ModelWithArrayOfModelValueOperations.get": "Payload.Xml.ModelWithArrayOfModelValue.get", - "payload.xml.aio.operations.ModelWithArrayOfModelValueOperations.get": "Payload.Xml.ModelWithArrayOfModelValue.get", - "payload.xml.operations.ModelWithArrayOfModelValueOperations.put": "Payload.Xml.ModelWithArrayOfModelValue.put", - "payload.xml.aio.operations.ModelWithArrayOfModelValueOperations.put": "Payload.Xml.ModelWithArrayOfModelValue.put", - "payload.xml.operations.ModelWithOptionalFieldValueOperations.get": "Payload.Xml.ModelWithOptionalFieldValue.get", - "payload.xml.aio.operations.ModelWithOptionalFieldValueOperations.get": "Payload.Xml.ModelWithOptionalFieldValue.get", - "payload.xml.operations.ModelWithOptionalFieldValueOperations.put": "Payload.Xml.ModelWithOptionalFieldValue.put", - "payload.xml.aio.operations.ModelWithOptionalFieldValueOperations.put": "Payload.Xml.ModelWithOptionalFieldValue.put", - "payload.xml.operations.ModelWithAttributesValueOperations.get": "Payload.Xml.ModelWithAttributesValue.get", - "payload.xml.aio.operations.ModelWithAttributesValueOperations.get": "Payload.Xml.ModelWithAttributesValue.get", - "payload.xml.operations.ModelWithAttributesValueOperations.put": "Payload.Xml.ModelWithAttributesValue.put", - "payload.xml.aio.operations.ModelWithAttributesValueOperations.put": "Payload.Xml.ModelWithAttributesValue.put", - "payload.xml.operations.ModelWithUnwrappedArrayValueOperations.get": "Payload.Xml.ModelWithUnwrappedArrayValue.get", - "payload.xml.aio.operations.ModelWithUnwrappedArrayValueOperations.get": "Payload.Xml.ModelWithUnwrappedArrayValue.get", - "payload.xml.operations.ModelWithUnwrappedArrayValueOperations.put": "Payload.Xml.ModelWithUnwrappedArrayValue.put", - "payload.xml.aio.operations.ModelWithUnwrappedArrayValueOperations.put": "Payload.Xml.ModelWithUnwrappedArrayValue.put", - "payload.xml.operations.ModelWithRenamedArraysValueOperations.get": "Payload.Xml.ModelWithRenamedArraysValue.get", - "payload.xml.aio.operations.ModelWithRenamedArraysValueOperations.get": "Payload.Xml.ModelWithRenamedArraysValue.get", - "payload.xml.operations.ModelWithRenamedArraysValueOperations.put": "Payload.Xml.ModelWithRenamedArraysValue.put", - "payload.xml.aio.operations.ModelWithRenamedArraysValueOperations.put": "Payload.Xml.ModelWithRenamedArraysValue.put", - "payload.xml.operations.ModelWithRenamedFieldsValueOperations.get": "Payload.Xml.ModelWithRenamedFieldsValue.get", - "payload.xml.aio.operations.ModelWithRenamedFieldsValueOperations.get": "Payload.Xml.ModelWithRenamedFieldsValue.get", - "payload.xml.operations.ModelWithRenamedFieldsValueOperations.put": "Payload.Xml.ModelWithRenamedFieldsValue.put", - "payload.xml.aio.operations.ModelWithRenamedFieldsValueOperations.put": "Payload.Xml.ModelWithRenamedFieldsValue.put", - "payload.xml.operations.ModelWithEmptyArrayValueOperations.get": "Payload.Xml.ModelWithEmptyArrayValue.get", - "payload.xml.aio.operations.ModelWithEmptyArrayValueOperations.get": "Payload.Xml.ModelWithEmptyArrayValue.get", - "payload.xml.operations.ModelWithEmptyArrayValueOperations.put": "Payload.Xml.ModelWithEmptyArrayValue.put", - "payload.xml.aio.operations.ModelWithEmptyArrayValueOperations.put": "Payload.Xml.ModelWithEmptyArrayValue.put", - "payload.xml.operations.ModelWithTextValueOperations.get": "Payload.Xml.ModelWithTextValue.get", - "payload.xml.aio.operations.ModelWithTextValueOperations.get": "Payload.Xml.ModelWithTextValue.get", - "payload.xml.operations.ModelWithTextValueOperations.put": "Payload.Xml.ModelWithTextValue.put", - "payload.xml.aio.operations.ModelWithTextValueOperations.put": "Payload.Xml.ModelWithTextValue.put", - "payload.xml.operations.ModelWithDictionaryValueOperations.get": "Payload.Xml.ModelWithDictionaryValue.get", - "payload.xml.aio.operations.ModelWithDictionaryValueOperations.get": "Payload.Xml.ModelWithDictionaryValue.get", - "payload.xml.operations.ModelWithDictionaryValueOperations.put": "Payload.Xml.ModelWithDictionaryValue.put", - "payload.xml.aio.operations.ModelWithDictionaryValueOperations.put": "Payload.Xml.ModelWithDictionaryValue.put", - "payload.xml.operations.ModelWithEncodedNamesValueOperations.get": "Payload.Xml.ModelWithEncodedNamesValue.get", - "payload.xml.aio.operations.ModelWithEncodedNamesValueOperations.get": "Payload.Xml.ModelWithEncodedNamesValue.get", - "payload.xml.operations.ModelWithEncodedNamesValueOperations.put": "Payload.Xml.ModelWithEncodedNamesValue.put", - "payload.xml.aio.operations.ModelWithEncodedNamesValueOperations.put": "Payload.Xml.ModelWithEncodedNamesValue.put", - "payload.xml.operations.ModelWithEnumValueOperations.get": "Payload.Xml.ModelWithEnumValue.get", - "payload.xml.aio.operations.ModelWithEnumValueOperations.get": "Payload.Xml.ModelWithEnumValue.get", - "payload.xml.operations.ModelWithEnumValueOperations.put": "Payload.Xml.ModelWithEnumValue.put", - "payload.xml.aio.operations.ModelWithEnumValueOperations.put": "Payload.Xml.ModelWithEnumValue.put", - "payload.xml.operations.ModelWithDatetimeValueOperations.get": "Payload.Xml.ModelWithDatetimeValue.get", - "payload.xml.aio.operations.ModelWithDatetimeValueOperations.get": "Payload.Xml.ModelWithDatetimeValue.get", - "payload.xml.operations.ModelWithDatetimeValueOperations.put": "Payload.Xml.ModelWithDatetimeValue.put", - "payload.xml.aio.operations.ModelWithDatetimeValueOperations.put": "Payload.Xml.ModelWithDatetimeValue.put", - "payload.xml.operations.XmlErrorValueOperations.get": "Payload.Xml.XmlErrorValue.get", - "payload.xml.aio.operations.XmlErrorValueOperations.get": "Payload.Xml.XmlErrorValue.get" + "payload.xml.operations.XmlClientSimpleModelValueOperations.get": "Payload.Xml.SimpleModelValue.get", + "payload.xml.aio.operations.XmlClientSimpleModelValueOperations.get": "Payload.Xml.SimpleModelValue.get", + "payload.xml.operations.XmlClientSimpleModelValueOperations.put": "Payload.Xml.SimpleModelValue.put", + "payload.xml.aio.operations.XmlClientSimpleModelValueOperations.put": "Payload.Xml.SimpleModelValue.put", + "payload.xml.operations.XmlClientModelWithSimpleArraysValueOperations.get": "Payload.Xml.ModelWithSimpleArraysValue.get", + "payload.xml.aio.operations.XmlClientModelWithSimpleArraysValueOperations.get": "Payload.Xml.ModelWithSimpleArraysValue.get", + "payload.xml.operations.XmlClientModelWithSimpleArraysValueOperations.put": "Payload.Xml.ModelWithSimpleArraysValue.put", + "payload.xml.aio.operations.XmlClientModelWithSimpleArraysValueOperations.put": "Payload.Xml.ModelWithSimpleArraysValue.put", + "payload.xml.operations.XmlClientModelWithArrayOfModelValueOperations.get": "Payload.Xml.ModelWithArrayOfModelValue.get", + "payload.xml.aio.operations.XmlClientModelWithArrayOfModelValueOperations.get": "Payload.Xml.ModelWithArrayOfModelValue.get", + "payload.xml.operations.XmlClientModelWithArrayOfModelValueOperations.put": "Payload.Xml.ModelWithArrayOfModelValue.put", + "payload.xml.aio.operations.XmlClientModelWithArrayOfModelValueOperations.put": "Payload.Xml.ModelWithArrayOfModelValue.put", + "payload.xml.operations.XmlClientModelWithOptionalFieldValueOperations.get": "Payload.Xml.ModelWithOptionalFieldValue.get", + "payload.xml.aio.operations.XmlClientModelWithOptionalFieldValueOperations.get": "Payload.Xml.ModelWithOptionalFieldValue.get", + "payload.xml.operations.XmlClientModelWithOptionalFieldValueOperations.put": "Payload.Xml.ModelWithOptionalFieldValue.put", + "payload.xml.aio.operations.XmlClientModelWithOptionalFieldValueOperations.put": "Payload.Xml.ModelWithOptionalFieldValue.put", + "payload.xml.operations.XmlClientModelWithAttributesValueOperations.get": "Payload.Xml.ModelWithAttributesValue.get", + "payload.xml.aio.operations.XmlClientModelWithAttributesValueOperations.get": "Payload.Xml.ModelWithAttributesValue.get", + "payload.xml.operations.XmlClientModelWithAttributesValueOperations.put": "Payload.Xml.ModelWithAttributesValue.put", + "payload.xml.aio.operations.XmlClientModelWithAttributesValueOperations.put": "Payload.Xml.ModelWithAttributesValue.put", + "payload.xml.operations.XmlClientModelWithUnwrappedArrayValueOperations.get": "Payload.Xml.ModelWithUnwrappedArrayValue.get", + "payload.xml.aio.operations.XmlClientModelWithUnwrappedArrayValueOperations.get": "Payload.Xml.ModelWithUnwrappedArrayValue.get", + "payload.xml.operations.XmlClientModelWithUnwrappedArrayValueOperations.put": "Payload.Xml.ModelWithUnwrappedArrayValue.put", + "payload.xml.aio.operations.XmlClientModelWithUnwrappedArrayValueOperations.put": "Payload.Xml.ModelWithUnwrappedArrayValue.put", + "payload.xml.operations.XmlClientModelWithRenamedArraysValueOperations.get": "Payload.Xml.ModelWithRenamedArraysValue.get", + "payload.xml.aio.operations.XmlClientModelWithRenamedArraysValueOperations.get": "Payload.Xml.ModelWithRenamedArraysValue.get", + "payload.xml.operations.XmlClientModelWithRenamedArraysValueOperations.put": "Payload.Xml.ModelWithRenamedArraysValue.put", + "payload.xml.aio.operations.XmlClientModelWithRenamedArraysValueOperations.put": "Payload.Xml.ModelWithRenamedArraysValue.put", + "payload.xml.operations.XmlClientModelWithRenamedFieldsValueOperations.get": "Payload.Xml.ModelWithRenamedFieldsValue.get", + "payload.xml.aio.operations.XmlClientModelWithRenamedFieldsValueOperations.get": "Payload.Xml.ModelWithRenamedFieldsValue.get", + "payload.xml.operations.XmlClientModelWithRenamedFieldsValueOperations.put": "Payload.Xml.ModelWithRenamedFieldsValue.put", + "payload.xml.aio.operations.XmlClientModelWithRenamedFieldsValueOperations.put": "Payload.Xml.ModelWithRenamedFieldsValue.put", + "payload.xml.operations.XmlClientModelWithEmptyArrayValueOperations.get": "Payload.Xml.ModelWithEmptyArrayValue.get", + "payload.xml.aio.operations.XmlClientModelWithEmptyArrayValueOperations.get": "Payload.Xml.ModelWithEmptyArrayValue.get", + "payload.xml.operations.XmlClientModelWithEmptyArrayValueOperations.put": "Payload.Xml.ModelWithEmptyArrayValue.put", + "payload.xml.aio.operations.XmlClientModelWithEmptyArrayValueOperations.put": "Payload.Xml.ModelWithEmptyArrayValue.put", + "payload.xml.operations.XmlClientModelWithTextValueOperations.get": "Payload.Xml.ModelWithTextValue.get", + "payload.xml.aio.operations.XmlClientModelWithTextValueOperations.get": "Payload.Xml.ModelWithTextValue.get", + "payload.xml.operations.XmlClientModelWithTextValueOperations.put": "Payload.Xml.ModelWithTextValue.put", + "payload.xml.aio.operations.XmlClientModelWithTextValueOperations.put": "Payload.Xml.ModelWithTextValue.put", + "payload.xml.operations.XmlClientModelWithDictionaryValueOperations.get": "Payload.Xml.ModelWithDictionaryValue.get", + "payload.xml.aio.operations.XmlClientModelWithDictionaryValueOperations.get": "Payload.Xml.ModelWithDictionaryValue.get", + "payload.xml.operations.XmlClientModelWithDictionaryValueOperations.put": "Payload.Xml.ModelWithDictionaryValue.put", + "payload.xml.aio.operations.XmlClientModelWithDictionaryValueOperations.put": "Payload.Xml.ModelWithDictionaryValue.put", + "payload.xml.operations.XmlClientModelWithEncodedNamesValueOperations.get": "Payload.Xml.ModelWithEncodedNamesValue.get", + "payload.xml.aio.operations.XmlClientModelWithEncodedNamesValueOperations.get": "Payload.Xml.ModelWithEncodedNamesValue.get", + "payload.xml.operations.XmlClientModelWithEncodedNamesValueOperations.put": "Payload.Xml.ModelWithEncodedNamesValue.put", + "payload.xml.aio.operations.XmlClientModelWithEncodedNamesValueOperations.put": "Payload.Xml.ModelWithEncodedNamesValue.put", + "payload.xml.operations.XmlClientXmlErrorValueOperations.get": "Payload.Xml.XmlErrorValue.get", + "payload.xml.aio.operations.XmlClientXmlErrorValueOperations.get": "Payload.Xml.XmlErrorValue.get" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations.py new file mode 100644 index 0000000000..948158b233 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithArrayOfModelValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_array_of_model_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_array_of_model_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_array_of_model_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_array_of_model_value.put( + input={"items": [{"age": 0, "name": "str"}]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations_async.py new file mode 100644 index 0000000000..77a9414aed --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_array_of_model_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithArrayOfModelValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_array_of_model_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_array_of_model_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_array_of_model_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_array_of_model_value.put( + input={"items": [{"age": 0, "name": "str"}]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations.py new file mode 100644 index 0000000000..7710d91cc1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithAttributesValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_attributes_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_attributes_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_attributes_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_attributes_value.put( + input={"enabled": bool, "id1": 0, "id2": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations_async.py new file mode 100644 index 0000000000..032c2327b7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_attributes_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithAttributesValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_attributes_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_attributes_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_attributes_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_attributes_value.put( + input={"enabled": bool, "id1": 0, "id2": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations.py new file mode 100644 index 0000000000..4ad0212eac --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithDictionaryValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_dictionary_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_dictionary_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_dictionary_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_dictionary_value.put( + input={"metadata": {"str": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations_async.py new file mode 100644 index 0000000000..bba036b5de --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_dictionary_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithDictionaryValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_dictionary_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_dictionary_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_dictionary_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_dictionary_value.put( + input={"metadata": {"str": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations.py new file mode 100644 index 0000000000..3ce2f1c24b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithEmptyArrayValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_empty_array_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_empty_array_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_empty_array_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_empty_array_value.put( + input={"items": [{"age": 0, "name": "str"}]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations_async.py new file mode 100644 index 0000000000..48bd01611d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_empty_array_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithEmptyArrayValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_empty_array_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_empty_array_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_empty_array_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_empty_array_value.put( + input={"items": [{"age": 0, "name": "str"}]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations.py new file mode 100644 index 0000000000..3d5f84c8c5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithEncodedNamesValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_encoded_names_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_encoded_names_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_encoded_names_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_encoded_names_value.put( + input={"colors": ["str"], "modelData": {"age": 0, "name": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations_async.py new file mode 100644 index 0000000000..fcc83f46ea --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_encoded_names_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithEncodedNamesValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_encoded_names_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_encoded_names_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_encoded_names_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_encoded_names_value.put( + input={"colors": ["str"], "modelData": {"age": 0, "name": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations.py new file mode 100644 index 0000000000..ffc1ba5e2f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithOptionalFieldValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_optional_field_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_optional_field_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_optional_field_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_optional_field_value.put( + input={"item": "str", "value": 0}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations_async.py new file mode 100644 index 0000000000..b9141ac542 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_optional_field_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithOptionalFieldValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_optional_field_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_optional_field_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_optional_field_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_optional_field_value.put( + input={"item": "str", "value": 0}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations.py new file mode 100644 index 0000000000..80b837074a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithRenamedArraysValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_renamed_arrays_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_renamed_arrays_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_renamed_arrays_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_renamed_arrays_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations_async.py new file mode 100644 index 0000000000..ea3512614e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_arrays_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithRenamedArraysValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_renamed_arrays_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_renamed_arrays_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_renamed_arrays_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_renamed_arrays_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations.py new file mode 100644 index 0000000000..3f83a611f2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithRenamedFieldsValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_renamed_fields_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_renamed_fields_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_renamed_fields_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_renamed_fields_value.put( + input={"inputData": {"age": 0, "name": "str"}, "outputData": {"age": 0, "name": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations_async.py new file mode 100644 index 0000000000..366d55ae6f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_renamed_fields_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithRenamedFieldsValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_renamed_fields_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_renamed_fields_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_renamed_fields_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_renamed_fields_value.put( + input={"inputData": {"age": 0, "name": "str"}, "outputData": {"age": 0, "name": "str"}}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations.py new file mode 100644 index 0000000000..032adfdc81 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithSimpleArraysValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_simple_arrays_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_simple_arrays_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_simple_arrays_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_simple_arrays_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations_async.py new file mode 100644 index 0000000000..a8b7074710 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_simple_arrays_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithSimpleArraysValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_simple_arrays_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_simple_arrays_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_simple_arrays_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_simple_arrays_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations.py new file mode 100644 index 0000000000..b6f18faa8c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithTextValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_text_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_text_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_text_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_text_value.put( + input={"content": "str", "language": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations_async.py new file mode 100644 index 0000000000..79954dfee0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_text_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithTextValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_text_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_text_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_text_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_text_value.put( + input={"content": "str", "language": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations.py new file mode 100644 index 0000000000..a64f663aef --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithUnwrappedArrayValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_unwrapped_array_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_unwrapped_array_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_model_with_unwrapped_array_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_model_with_unwrapped_array_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations_async.py new file mode 100644 index 0000000000..a7defdbb5d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_model_with_unwrapped_array_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientModelWithUnwrappedArrayValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_unwrapped_array_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_unwrapped_array_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_model_with_unwrapped_array_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_model_with_unwrapped_array_value.put( + input={"colors": ["str"], "counts": [0]}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations.py new file mode 100644 index 0000000000..5c10104321 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientSimpleModelValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_simple_model_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_simple_model_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_simple_model_value_put(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_simple_model_value.put( + input={"age": 0, "name": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations_async.py new file mode 100644 index 0000000000..01cea8747a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_simple_model_value_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientSimpleModelValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_simple_model_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_simple_model_value.get() + + # please add some check logic here by yourself + # ... + + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_simple_model_value_put(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_simple_model_value.put( + input={"age": 0, "name": "str"}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations.py new file mode 100644 index 0000000000..58b51dfee6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import XmlClientTestBase, XmlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientXmlErrorValueOperations(XmlClientTestBase): + @XmlPreparer() + @recorded_by_proxy + def test_xml_client_xml_error_value_get(self, xml_endpoint): + client = self.create_client(endpoint=xml_endpoint) + response = client.xml_client_xml_error_value.get() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations_async.py b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations_async.py new file mode 100644 index 0000000000..61b3ed84fc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/payload-xml/generated_tests/test_xml_xml_client_xml_error_value_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import XmlPreparer +from testpreparer_async import XmlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestXmlXmlClientXmlErrorValueOperationsAsync(XmlClientTestBaseAsync): + @XmlPreparer() + @recorded_by_proxy_async + async def test_xml_client_xml_error_value_get(self, xml_endpoint): + client = self.create_async_client(endpoint=xml_endpoint) + response = await client.xml_client_xml_error_value.get() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_client.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_client.py index 0d392fe3a1..98302abd55 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/_client.py @@ -17,65 +17,73 @@ from ._configuration import XmlClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - ModelWithArrayOfModelValueOperations, - ModelWithAttributesValueOperations, - ModelWithDatetimeValueOperations, - ModelWithDictionaryValueOperations, - ModelWithEmptyArrayValueOperations, - ModelWithEncodedNamesValueOperations, - ModelWithEnumValueOperations, - ModelWithOptionalFieldValueOperations, - ModelWithRenamedArraysValueOperations, - ModelWithRenamedFieldsValueOperations, - ModelWithSimpleArraysValueOperations, - ModelWithTextValueOperations, - ModelWithUnwrappedArrayValueOperations, - SimpleModelValueOperations, - XmlErrorValueOperations, + XmlClientModelWithArrayOfModelValueOperations, + XmlClientModelWithAttributesValueOperations, + XmlClientModelWithDictionaryValueOperations, + XmlClientModelWithEmptyArrayValueOperations, + XmlClientModelWithEncodedNamesValueOperations, + XmlClientModelWithOptionalFieldValueOperations, + XmlClientModelWithRenamedArraysValueOperations, + XmlClientModelWithRenamedFieldsValueOperations, + XmlClientModelWithSimpleArraysValueOperations, + XmlClientModelWithTextValueOperations, + XmlClientModelWithUnwrappedArrayValueOperations, + XmlClientSimpleModelValueOperations, + XmlClientXmlErrorValueOperations, ) class XmlClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Sends and receives bodies in XML format. - :ivar simple_model_value: SimpleModelValueOperations operations - :vartype simple_model_value: payload.xml.operations.SimpleModelValueOperations - :ivar model_with_simple_arrays_value: ModelWithSimpleArraysValueOperations operations - :vartype model_with_simple_arrays_value: - payload.xml.operations.ModelWithSimpleArraysValueOperations - :ivar model_with_array_of_model_value: ModelWithArrayOfModelValueOperations operations - :vartype model_with_array_of_model_value: - payload.xml.operations.ModelWithArrayOfModelValueOperations - :ivar model_with_optional_field_value: ModelWithOptionalFieldValueOperations operations - :vartype model_with_optional_field_value: - payload.xml.operations.ModelWithOptionalFieldValueOperations - :ivar model_with_attributes_value: ModelWithAttributesValueOperations operations - :vartype model_with_attributes_value: payload.xml.operations.ModelWithAttributesValueOperations - :ivar model_with_unwrapped_array_value: ModelWithUnwrappedArrayValueOperations operations - :vartype model_with_unwrapped_array_value: - payload.xml.operations.ModelWithUnwrappedArrayValueOperations - :ivar model_with_renamed_arrays_value: ModelWithRenamedArraysValueOperations operations - :vartype model_with_renamed_arrays_value: - payload.xml.operations.ModelWithRenamedArraysValueOperations - :ivar model_with_renamed_fields_value: ModelWithRenamedFieldsValueOperations operations - :vartype model_with_renamed_fields_value: - payload.xml.operations.ModelWithRenamedFieldsValueOperations - :ivar model_with_empty_array_value: ModelWithEmptyArrayValueOperations operations - :vartype model_with_empty_array_value: - payload.xml.operations.ModelWithEmptyArrayValueOperations - :ivar model_with_text_value: ModelWithTextValueOperations operations - :vartype model_with_text_value: payload.xml.operations.ModelWithTextValueOperations - :ivar model_with_dictionary_value: ModelWithDictionaryValueOperations operations - :vartype model_with_dictionary_value: payload.xml.operations.ModelWithDictionaryValueOperations - :ivar model_with_encoded_names_value: ModelWithEncodedNamesValueOperations operations - :vartype model_with_encoded_names_value: - payload.xml.operations.ModelWithEncodedNamesValueOperations - :ivar model_with_enum_value: ModelWithEnumValueOperations operations - :vartype model_with_enum_value: payload.xml.operations.ModelWithEnumValueOperations - :ivar model_with_datetime_value: ModelWithDatetimeValueOperations operations - :vartype model_with_datetime_value: payload.xml.operations.ModelWithDatetimeValueOperations - :ivar xml_error_value: XmlErrorValueOperations operations - :vartype xml_error_value: payload.xml.operations.XmlErrorValueOperations + :ivar xml_client_simple_model_value: XmlClientSimpleModelValueOperations operations + :vartype xml_client_simple_model_value: + payload.xml.operations.XmlClientSimpleModelValueOperations + :ivar xml_client_model_with_simple_arrays_value: XmlClientModelWithSimpleArraysValueOperations + operations + :vartype xml_client_model_with_simple_arrays_value: + payload.xml.operations.XmlClientModelWithSimpleArraysValueOperations + :ivar xml_client_model_with_array_of_model_value: XmlClientModelWithArrayOfModelValueOperations + operations + :vartype xml_client_model_with_array_of_model_value: + payload.xml.operations.XmlClientModelWithArrayOfModelValueOperations + :ivar xml_client_model_with_optional_field_value: + XmlClientModelWithOptionalFieldValueOperations operations + :vartype xml_client_model_with_optional_field_value: + payload.xml.operations.XmlClientModelWithOptionalFieldValueOperations + :ivar xml_client_model_with_attributes_value: XmlClientModelWithAttributesValueOperations + operations + :vartype xml_client_model_with_attributes_value: + payload.xml.operations.XmlClientModelWithAttributesValueOperations + :ivar xml_client_model_with_unwrapped_array_value: + XmlClientModelWithUnwrappedArrayValueOperations operations + :vartype xml_client_model_with_unwrapped_array_value: + payload.xml.operations.XmlClientModelWithUnwrappedArrayValueOperations + :ivar xml_client_model_with_renamed_arrays_value: + XmlClientModelWithRenamedArraysValueOperations operations + :vartype xml_client_model_with_renamed_arrays_value: + payload.xml.operations.XmlClientModelWithRenamedArraysValueOperations + :ivar xml_client_model_with_renamed_fields_value: + XmlClientModelWithRenamedFieldsValueOperations operations + :vartype xml_client_model_with_renamed_fields_value: + payload.xml.operations.XmlClientModelWithRenamedFieldsValueOperations + :ivar xml_client_model_with_empty_array_value: XmlClientModelWithEmptyArrayValueOperations + operations + :vartype xml_client_model_with_empty_array_value: + payload.xml.operations.XmlClientModelWithEmptyArrayValueOperations + :ivar xml_client_model_with_text_value: XmlClientModelWithTextValueOperations operations + :vartype xml_client_model_with_text_value: + payload.xml.operations.XmlClientModelWithTextValueOperations + :ivar xml_client_model_with_dictionary_value: XmlClientModelWithDictionaryValueOperations + operations + :vartype xml_client_model_with_dictionary_value: + payload.xml.operations.XmlClientModelWithDictionaryValueOperations + :ivar xml_client_model_with_encoded_names_value: XmlClientModelWithEncodedNamesValueOperations + operations + :vartype xml_client_model_with_encoded_names_value: + payload.xml.operations.XmlClientModelWithEncodedNamesValueOperations + :ivar xml_client_xml_error_value: XmlClientXmlErrorValueOperations operations + :vartype xml_client_xml_error_value: payload.xml.operations.XmlClientXmlErrorValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -108,49 +116,45 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.simple_model_value = SimpleModelValueOperations( + self.xml_client_simple_model_value = XmlClientSimpleModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_simple_arrays_value = ModelWithSimpleArraysValueOperations( + self.xml_client_model_with_simple_arrays_value = XmlClientModelWithSimpleArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_array_of_model_value = ModelWithArrayOfModelValueOperations( + self.xml_client_model_with_array_of_model_value = XmlClientModelWithArrayOfModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_optional_field_value = ModelWithOptionalFieldValueOperations( + self.xml_client_model_with_optional_field_value = XmlClientModelWithOptionalFieldValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_attributes_value = ModelWithAttributesValueOperations( + self.xml_client_model_with_attributes_value = XmlClientModelWithAttributesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_unwrapped_array_value = ModelWithUnwrappedArrayValueOperations( + self.xml_client_model_with_unwrapped_array_value = XmlClientModelWithUnwrappedArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_arrays_value = ModelWithRenamedArraysValueOperations( + self.xml_client_model_with_renamed_arrays_value = XmlClientModelWithRenamedArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_fields_value = ModelWithRenamedFieldsValueOperations( + self.xml_client_model_with_renamed_fields_value = XmlClientModelWithRenamedFieldsValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_empty_array_value = ModelWithEmptyArrayValueOperations( + self.xml_client_model_with_empty_array_value = XmlClientModelWithEmptyArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_text_value = ModelWithTextValueOperations( + self.xml_client_model_with_text_value = XmlClientModelWithTextValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_dictionary_value = ModelWithDictionaryValueOperations( + self.xml_client_model_with_dictionary_value = XmlClientModelWithDictionaryValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_encoded_names_value = ModelWithEncodedNamesValueOperations( + self.xml_client_model_with_encoded_names_value = XmlClientModelWithEncodedNamesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_enum_value = ModelWithEnumValueOperations( + self.xml_client_xml_error_value = XmlClientXmlErrorValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_datetime_value = ModelWithDatetimeValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.xml_error_value = XmlErrorValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/_client.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/_client.py index 7159875ea0..ae06dfe916 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/_client.py @@ -17,67 +17,74 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import XmlClientConfiguration from .operations import ( - ModelWithArrayOfModelValueOperations, - ModelWithAttributesValueOperations, - ModelWithDatetimeValueOperations, - ModelWithDictionaryValueOperations, - ModelWithEmptyArrayValueOperations, - ModelWithEncodedNamesValueOperations, - ModelWithEnumValueOperations, - ModelWithOptionalFieldValueOperations, - ModelWithRenamedArraysValueOperations, - ModelWithRenamedFieldsValueOperations, - ModelWithSimpleArraysValueOperations, - ModelWithTextValueOperations, - ModelWithUnwrappedArrayValueOperations, - SimpleModelValueOperations, - XmlErrorValueOperations, + XmlClientModelWithArrayOfModelValueOperations, + XmlClientModelWithAttributesValueOperations, + XmlClientModelWithDictionaryValueOperations, + XmlClientModelWithEmptyArrayValueOperations, + XmlClientModelWithEncodedNamesValueOperations, + XmlClientModelWithOptionalFieldValueOperations, + XmlClientModelWithRenamedArraysValueOperations, + XmlClientModelWithRenamedFieldsValueOperations, + XmlClientModelWithSimpleArraysValueOperations, + XmlClientModelWithTextValueOperations, + XmlClientModelWithUnwrappedArrayValueOperations, + XmlClientSimpleModelValueOperations, + XmlClientXmlErrorValueOperations, ) class XmlClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Sends and receives bodies in XML format. - :ivar simple_model_value: SimpleModelValueOperations operations - :vartype simple_model_value: payload.xml.aio.operations.SimpleModelValueOperations - :ivar model_with_simple_arrays_value: ModelWithSimpleArraysValueOperations operations - :vartype model_with_simple_arrays_value: - payload.xml.aio.operations.ModelWithSimpleArraysValueOperations - :ivar model_with_array_of_model_value: ModelWithArrayOfModelValueOperations operations - :vartype model_with_array_of_model_value: - payload.xml.aio.operations.ModelWithArrayOfModelValueOperations - :ivar model_with_optional_field_value: ModelWithOptionalFieldValueOperations operations - :vartype model_with_optional_field_value: - payload.xml.aio.operations.ModelWithOptionalFieldValueOperations - :ivar model_with_attributes_value: ModelWithAttributesValueOperations operations - :vartype model_with_attributes_value: - payload.xml.aio.operations.ModelWithAttributesValueOperations - :ivar model_with_unwrapped_array_value: ModelWithUnwrappedArrayValueOperations operations - :vartype model_with_unwrapped_array_value: - payload.xml.aio.operations.ModelWithUnwrappedArrayValueOperations - :ivar model_with_renamed_arrays_value: ModelWithRenamedArraysValueOperations operations - :vartype model_with_renamed_arrays_value: - payload.xml.aio.operations.ModelWithRenamedArraysValueOperations - :ivar model_with_renamed_fields_value: ModelWithRenamedFieldsValueOperations operations - :vartype model_with_renamed_fields_value: - payload.xml.aio.operations.ModelWithRenamedFieldsValueOperations - :ivar model_with_empty_array_value: ModelWithEmptyArrayValueOperations operations - :vartype model_with_empty_array_value: - payload.xml.aio.operations.ModelWithEmptyArrayValueOperations - :ivar model_with_text_value: ModelWithTextValueOperations operations - :vartype model_with_text_value: payload.xml.aio.operations.ModelWithTextValueOperations - :ivar model_with_dictionary_value: ModelWithDictionaryValueOperations operations - :vartype model_with_dictionary_value: - payload.xml.aio.operations.ModelWithDictionaryValueOperations - :ivar model_with_encoded_names_value: ModelWithEncodedNamesValueOperations operations - :vartype model_with_encoded_names_value: - payload.xml.aio.operations.ModelWithEncodedNamesValueOperations - :ivar model_with_enum_value: ModelWithEnumValueOperations operations - :vartype model_with_enum_value: payload.xml.aio.operations.ModelWithEnumValueOperations - :ivar model_with_datetime_value: ModelWithDatetimeValueOperations operations - :vartype model_with_datetime_value: payload.xml.aio.operations.ModelWithDatetimeValueOperations - :ivar xml_error_value: XmlErrorValueOperations operations - :vartype xml_error_value: payload.xml.aio.operations.XmlErrorValueOperations + :ivar xml_client_simple_model_value: XmlClientSimpleModelValueOperations operations + :vartype xml_client_simple_model_value: + payload.xml.aio.operations.XmlClientSimpleModelValueOperations + :ivar xml_client_model_with_simple_arrays_value: XmlClientModelWithSimpleArraysValueOperations + operations + :vartype xml_client_model_with_simple_arrays_value: + payload.xml.aio.operations.XmlClientModelWithSimpleArraysValueOperations + :ivar xml_client_model_with_array_of_model_value: XmlClientModelWithArrayOfModelValueOperations + operations + :vartype xml_client_model_with_array_of_model_value: + payload.xml.aio.operations.XmlClientModelWithArrayOfModelValueOperations + :ivar xml_client_model_with_optional_field_value: + XmlClientModelWithOptionalFieldValueOperations operations + :vartype xml_client_model_with_optional_field_value: + payload.xml.aio.operations.XmlClientModelWithOptionalFieldValueOperations + :ivar xml_client_model_with_attributes_value: XmlClientModelWithAttributesValueOperations + operations + :vartype xml_client_model_with_attributes_value: + payload.xml.aio.operations.XmlClientModelWithAttributesValueOperations + :ivar xml_client_model_with_unwrapped_array_value: + XmlClientModelWithUnwrappedArrayValueOperations operations + :vartype xml_client_model_with_unwrapped_array_value: + payload.xml.aio.operations.XmlClientModelWithUnwrappedArrayValueOperations + :ivar xml_client_model_with_renamed_arrays_value: + XmlClientModelWithRenamedArraysValueOperations operations + :vartype xml_client_model_with_renamed_arrays_value: + payload.xml.aio.operations.XmlClientModelWithRenamedArraysValueOperations + :ivar xml_client_model_with_renamed_fields_value: + XmlClientModelWithRenamedFieldsValueOperations operations + :vartype xml_client_model_with_renamed_fields_value: + payload.xml.aio.operations.XmlClientModelWithRenamedFieldsValueOperations + :ivar xml_client_model_with_empty_array_value: XmlClientModelWithEmptyArrayValueOperations + operations + :vartype xml_client_model_with_empty_array_value: + payload.xml.aio.operations.XmlClientModelWithEmptyArrayValueOperations + :ivar xml_client_model_with_text_value: XmlClientModelWithTextValueOperations operations + :vartype xml_client_model_with_text_value: + payload.xml.aio.operations.XmlClientModelWithTextValueOperations + :ivar xml_client_model_with_dictionary_value: XmlClientModelWithDictionaryValueOperations + operations + :vartype xml_client_model_with_dictionary_value: + payload.xml.aio.operations.XmlClientModelWithDictionaryValueOperations + :ivar xml_client_model_with_encoded_names_value: XmlClientModelWithEncodedNamesValueOperations + operations + :vartype xml_client_model_with_encoded_names_value: + payload.xml.aio.operations.XmlClientModelWithEncodedNamesValueOperations + :ivar xml_client_xml_error_value: XmlClientXmlErrorValueOperations operations + :vartype xml_client_xml_error_value: + payload.xml.aio.operations.XmlClientXmlErrorValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -110,49 +117,45 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.simple_model_value = SimpleModelValueOperations( + self.xml_client_simple_model_value = XmlClientSimpleModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_simple_arrays_value = ModelWithSimpleArraysValueOperations( + self.xml_client_model_with_simple_arrays_value = XmlClientModelWithSimpleArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_array_of_model_value = ModelWithArrayOfModelValueOperations( + self.xml_client_model_with_array_of_model_value = XmlClientModelWithArrayOfModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_optional_field_value = ModelWithOptionalFieldValueOperations( + self.xml_client_model_with_optional_field_value = XmlClientModelWithOptionalFieldValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_attributes_value = ModelWithAttributesValueOperations( + self.xml_client_model_with_attributes_value = XmlClientModelWithAttributesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_unwrapped_array_value = ModelWithUnwrappedArrayValueOperations( + self.xml_client_model_with_unwrapped_array_value = XmlClientModelWithUnwrappedArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_arrays_value = ModelWithRenamedArraysValueOperations( + self.xml_client_model_with_renamed_arrays_value = XmlClientModelWithRenamedArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_fields_value = ModelWithRenamedFieldsValueOperations( + self.xml_client_model_with_renamed_fields_value = XmlClientModelWithRenamedFieldsValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_empty_array_value = ModelWithEmptyArrayValueOperations( + self.xml_client_model_with_empty_array_value = XmlClientModelWithEmptyArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_text_value = ModelWithTextValueOperations( + self.xml_client_model_with_text_value = XmlClientModelWithTextValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_dictionary_value = ModelWithDictionaryValueOperations( + self.xml_client_model_with_dictionary_value = XmlClientModelWithDictionaryValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_encoded_names_value = ModelWithEncodedNamesValueOperations( + self.xml_client_model_with_encoded_names_value = XmlClientModelWithEncodedNamesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_enum_value = ModelWithEnumValueOperations( + self.xml_client_xml_error_value = XmlClientXmlErrorValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_datetime_value = ModelWithDatetimeValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.xml_error_value = XmlErrorValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/__init__.py index 115dd22e44..45c12cbcab 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/__init__.py @@ -12,42 +12,38 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SimpleModelValueOperations # type: ignore -from ._operations import ModelWithSimpleArraysValueOperations # type: ignore -from ._operations import ModelWithArrayOfModelValueOperations # type: ignore -from ._operations import ModelWithOptionalFieldValueOperations # type: ignore -from ._operations import ModelWithAttributesValueOperations # type: ignore -from ._operations import ModelWithUnwrappedArrayValueOperations # type: ignore -from ._operations import ModelWithRenamedArraysValueOperations # type: ignore -from ._operations import ModelWithRenamedFieldsValueOperations # type: ignore -from ._operations import ModelWithEmptyArrayValueOperations # type: ignore -from ._operations import ModelWithTextValueOperations # type: ignore -from ._operations import ModelWithDictionaryValueOperations # type: ignore -from ._operations import ModelWithEncodedNamesValueOperations # type: ignore -from ._operations import ModelWithEnumValueOperations # type: ignore -from ._operations import ModelWithDatetimeValueOperations # type: ignore -from ._operations import XmlErrorValueOperations # type: ignore +from ._operations import XmlClientSimpleModelValueOperations # type: ignore +from ._operations import XmlClientModelWithSimpleArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithArrayOfModelValueOperations # type: ignore +from ._operations import XmlClientModelWithOptionalFieldValueOperations # type: ignore +from ._operations import XmlClientModelWithAttributesValueOperations # type: ignore +from ._operations import XmlClientModelWithUnwrappedArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedFieldsValueOperations # type: ignore +from ._operations import XmlClientModelWithEmptyArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithTextValueOperations # type: ignore +from ._operations import XmlClientModelWithDictionaryValueOperations # type: ignore +from ._operations import XmlClientModelWithEncodedNamesValueOperations # type: ignore +from ._operations import XmlClientXmlErrorValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SimpleModelValueOperations", - "ModelWithSimpleArraysValueOperations", - "ModelWithArrayOfModelValueOperations", - "ModelWithOptionalFieldValueOperations", - "ModelWithAttributesValueOperations", - "ModelWithUnwrappedArrayValueOperations", - "ModelWithRenamedArraysValueOperations", - "ModelWithRenamedFieldsValueOperations", - "ModelWithEmptyArrayValueOperations", - "ModelWithTextValueOperations", - "ModelWithDictionaryValueOperations", - "ModelWithEncodedNamesValueOperations", - "ModelWithEnumValueOperations", - "ModelWithDatetimeValueOperations", - "XmlErrorValueOperations", + "XmlClientSimpleModelValueOperations", + "XmlClientModelWithSimpleArraysValueOperations", + "XmlClientModelWithArrayOfModelValueOperations", + "XmlClientModelWithOptionalFieldValueOperations", + "XmlClientModelWithAttributesValueOperations", + "XmlClientModelWithUnwrappedArrayValueOperations", + "XmlClientModelWithRenamedArraysValueOperations", + "XmlClientModelWithRenamedFieldsValueOperations", + "XmlClientModelWithEmptyArrayValueOperations", + "XmlClientModelWithTextValueOperations", + "XmlClientModelWithDictionaryValueOperations", + "XmlClientModelWithEncodedNamesValueOperations", + "XmlClientXmlErrorValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py index 1bedbb9be9..8019050b85 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/aio/operations/_operations.py @@ -29,35 +29,31 @@ from ..._utils.model_base import _deserialize_xml, _failsafe_deserialize_xml, _get_element from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_model_with_array_of_model_value_get_request, - build_model_with_array_of_model_value_put_request, - build_model_with_attributes_value_get_request, - build_model_with_attributes_value_put_request, - build_model_with_datetime_value_get_request, - build_model_with_datetime_value_put_request, - build_model_with_dictionary_value_get_request, - build_model_with_dictionary_value_put_request, - build_model_with_empty_array_value_get_request, - build_model_with_empty_array_value_put_request, - build_model_with_encoded_names_value_get_request, - build_model_with_encoded_names_value_put_request, - build_model_with_enum_value_get_request, - build_model_with_enum_value_put_request, - build_model_with_optional_field_value_get_request, - build_model_with_optional_field_value_put_request, - build_model_with_renamed_arrays_value_get_request, - build_model_with_renamed_arrays_value_put_request, - build_model_with_renamed_fields_value_get_request, - build_model_with_renamed_fields_value_put_request, - build_model_with_simple_arrays_value_get_request, - build_model_with_simple_arrays_value_put_request, - build_model_with_text_value_get_request, - build_model_with_text_value_put_request, - build_model_with_unwrapped_array_value_get_request, - build_model_with_unwrapped_array_value_put_request, - build_simple_model_value_get_request, - build_simple_model_value_put_request, - build_xml_error_value_get_request, + build_xml_client_model_with_array_of_model_value_get_request, + build_xml_client_model_with_array_of_model_value_put_request, + build_xml_client_model_with_attributes_value_get_request, + build_xml_client_model_with_attributes_value_put_request, + build_xml_client_model_with_dictionary_value_get_request, + build_xml_client_model_with_dictionary_value_put_request, + build_xml_client_model_with_empty_array_value_get_request, + build_xml_client_model_with_empty_array_value_put_request, + build_xml_client_model_with_encoded_names_value_get_request, + build_xml_client_model_with_encoded_names_value_put_request, + build_xml_client_model_with_optional_field_value_get_request, + build_xml_client_model_with_optional_field_value_put_request, + build_xml_client_model_with_renamed_arrays_value_get_request, + build_xml_client_model_with_renamed_arrays_value_put_request, + build_xml_client_model_with_renamed_fields_value_get_request, + build_xml_client_model_with_renamed_fields_value_put_request, + build_xml_client_model_with_simple_arrays_value_get_request, + build_xml_client_model_with_simple_arrays_value_put_request, + build_xml_client_model_with_text_value_get_request, + build_xml_client_model_with_text_value_put_request, + build_xml_client_model_with_unwrapped_array_value_get_request, + build_xml_client_model_with_unwrapped_array_value_put_request, + build_xml_client_simple_model_value_get_request, + build_xml_client_simple_model_value_put_request, + build_xml_client_xml_error_value_get_request, ) from .._configuration import XmlClientConfiguration @@ -65,14 +61,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class SimpleModelValueOperations: +class XmlClientSimpleModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`simple_model_value` attribute. + :attr:`xml_client_simple_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -103,7 +99,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_simple_model_value_get_request( + _request = build_xml_client_simple_model_value_get_request( headers=_headers, params=_params, ) @@ -167,7 +163,7 @@ async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_simple_model_value_put_request( + _request = build_xml_client_simple_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -193,14 +189,14 @@ async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithSimpleArraysValueOperations: +class XmlClientModelWithSimpleArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_simple_arrays_value` attribute. + :attr:`xml_client_model_with_simple_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -231,7 +227,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: cls: ClsType[_models.ModelWithSimpleArrays] = kwargs.pop("cls", None) - _request = build_model_with_simple_arrays_value_get_request( + _request = build_xml_client_model_with_simple_arrays_value_get_request( headers=_headers, params=_params, ) @@ -295,7 +291,7 @@ async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_simple_arrays_value_put_request( + _request = build_xml_client_model_with_simple_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -321,14 +317,14 @@ async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithArrayOfModelValueOperations: +class XmlClientModelWithArrayOfModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_array_of_model_value` attribute. + :attr:`xml_client_model_with_array_of_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -359,7 +355,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: cls: ClsType[_models.ModelWithArrayOfModel] = kwargs.pop("cls", None) - _request = build_model_with_array_of_model_value_get_request( + _request = build_xml_client_model_with_array_of_model_value_get_request( headers=_headers, params=_params, ) @@ -423,7 +419,7 @@ async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_array_of_model_value_put_request( + _request = build_xml_client_model_with_array_of_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -449,14 +445,14 @@ async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithOptionalFieldValueOperations: +class XmlClientModelWithOptionalFieldValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_optional_field_value` attribute. + :attr:`xml_client_model_with_optional_field_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -487,7 +483,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: cls: ClsType[_models.ModelWithOptionalField] = kwargs.pop("cls", None) - _request = build_model_with_optional_field_value_get_request( + _request = build_xml_client_model_with_optional_field_value_get_request( headers=_headers, params=_params, ) @@ -551,7 +547,7 @@ async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_optional_field_value_put_request( + _request = build_xml_client_model_with_optional_field_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -577,14 +573,14 @@ async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithAttributesValueOperations: +class XmlClientModelWithAttributesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_attributes_value` attribute. + :attr:`xml_client_model_with_attributes_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -615,7 +611,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: cls: ClsType[_models.ModelWithAttributes] = kwargs.pop("cls", None) - _request = build_model_with_attributes_value_get_request( + _request = build_xml_client_model_with_attributes_value_get_request( headers=_headers, params=_params, ) @@ -679,7 +675,7 @@ async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_attributes_value_put_request( + _request = build_xml_client_model_with_attributes_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -705,14 +701,14 @@ async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithUnwrappedArrayValueOperations: +class XmlClientModelWithUnwrappedArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_unwrapped_array_value` attribute. + :attr:`xml_client_model_with_unwrapped_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -743,7 +739,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: cls: ClsType[_models.ModelWithUnwrappedArray] = kwargs.pop("cls", None) - _request = build_model_with_unwrapped_array_value_get_request( + _request = build_xml_client_model_with_unwrapped_array_value_get_request( headers=_headers, params=_params, ) @@ -807,7 +803,7 @@ async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> No _content = _get_element(input) - _request = build_model_with_unwrapped_array_value_put_request( + _request = build_xml_client_model_with_unwrapped_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -833,14 +829,14 @@ async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedArraysValueOperations: +class XmlClientModelWithRenamedArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_renamed_arrays_value` attribute. + :attr:`xml_client_model_with_renamed_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -871,7 +867,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: cls: ClsType[_models.ModelWithRenamedArrays] = kwargs.pop("cls", None) - _request = build_model_with_renamed_arrays_value_get_request( + _request = build_xml_client_model_with_renamed_arrays_value_get_request( headers=_headers, params=_params, ) @@ -935,7 +931,7 @@ async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_renamed_arrays_value_put_request( + _request = build_xml_client_model_with_renamed_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -961,14 +957,14 @@ async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedFieldsValueOperations: +class XmlClientModelWithRenamedFieldsValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_renamed_fields_value` attribute. + :attr:`xml_client_model_with_renamed_fields_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -999,7 +995,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: cls: ClsType[_models.ModelWithRenamedFields] = kwargs.pop("cls", None) - _request = build_model_with_renamed_fields_value_get_request( + _request = build_xml_client_model_with_renamed_fields_value_get_request( headers=_headers, params=_params, ) @@ -1063,7 +1059,7 @@ async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_renamed_fields_value_put_request( + _request = build_xml_client_model_with_renamed_fields_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1089,14 +1085,14 @@ async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEmptyArrayValueOperations: +class XmlClientModelWithEmptyArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_empty_array_value` attribute. + :attr:`xml_client_model_with_empty_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1127,7 +1123,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: cls: ClsType[_models.ModelWithEmptyArray] = kwargs.pop("cls", None) - _request = build_model_with_empty_array_value_get_request( + _request = build_xml_client_model_with_empty_array_value_get_request( headers=_headers, params=_params, ) @@ -1191,7 +1187,7 @@ async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_empty_array_value_put_request( + _request = build_xml_client_model_with_empty_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1217,14 +1213,14 @@ async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithTextValueOperations: +class XmlClientModelWithTextValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_text_value` attribute. + :attr:`xml_client_model_with_text_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1255,7 +1251,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: cls: ClsType[_models.ModelWithText] = kwargs.pop("cls", None) - _request = build_model_with_text_value_get_request( + _request = build_xml_client_model_with_text_value_get_request( headers=_headers, params=_params, ) @@ -1319,7 +1315,7 @@ async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_text_value_put_request( + _request = build_xml_client_model_with_text_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1345,14 +1341,14 @@ async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithDictionaryValueOperations: +class XmlClientModelWithDictionaryValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_dictionary_value` attribute. + :attr:`xml_client_model_with_dictionary_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1383,7 +1379,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: cls: ClsType[_models.ModelWithDictionary] = kwargs.pop("cls", None) - _request = build_model_with_dictionary_value_get_request( + _request = build_xml_client_model_with_dictionary_value_get_request( headers=_headers, params=_params, ) @@ -1447,7 +1443,7 @@ async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_dictionary_value_put_request( + _request = build_xml_client_model_with_dictionary_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1473,14 +1469,14 @@ async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEncodedNamesValueOperations: +class XmlClientModelWithEncodedNamesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_encoded_names_value` attribute. + :attr:`xml_client_model_with_encoded_names_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1511,7 +1507,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: cls: ClsType[_models.ModelWithEncodedNames] = kwargs.pop("cls", None) - _request = build_model_with_encoded_names_value_get_request( + _request = build_xml_client_model_with_encoded_names_value_get_request( headers=_headers, params=_params, ) @@ -1575,7 +1571,7 @@ async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_encoded_names_value_put_request( + _request = build_xml_client_model_with_encoded_names_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1601,270 +1597,14 @@ async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEnumValueOperations: +class XmlClientXmlErrorValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_enum_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> _models.ModelWithEnum: - """get. - - :return: ModelWithEnum. The ModelWithEnum is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithEnum - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithEnum] = kwargs.pop("cls", None) - - _request = build_model_with_enum_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithEnum, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def put(self, input: _models.ModelWithEnum, **kwargs: Any) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithEnum - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_enum_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithDatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, **kwargs: Any) -> _models.ModelWithDatetime: - """get. - - :return: ModelWithDatetime. The ModelWithDatetime is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithDatetime - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithDatetime] = kwargs.pop("cls", None) - - _request = build_model_with_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithDatetime, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def put(self, input: _models.ModelWithDatetime, **kwargs: Any) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithDatetime - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_datetime_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class XmlErrorValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.aio.XmlClient`'s - :attr:`xml_error_value` attribute. + :attr:`xml_client_xml_error_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1895,7 +1635,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_xml_error_value_get_request( + _request = build_xml_client_xml_error_value_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/__init__.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/__init__.py index aa125a5922..a85a751bf9 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/__init__.py @@ -16,11 +16,9 @@ from ._models import ( # type: ignore ModelWithArrayOfModel, ModelWithAttributes, - ModelWithDatetime, ModelWithDictionary, ModelWithEmptyArray, ModelWithEncodedNames, - ModelWithEnum, ModelWithOptionalField, ModelWithRenamedArrays, ModelWithRenamedFields, @@ -30,10 +28,6 @@ SimpleModel, XmlErrorBody, ) - -from ._enums import ( # type: ignore - Status, -) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk @@ -41,11 +35,9 @@ __all__ = [ "ModelWithArrayOfModel", "ModelWithAttributes", - "ModelWithDatetime", "ModelWithDictionary", "ModelWithEmptyArray", "ModelWithEncodedNames", - "ModelWithEnum", "ModelWithOptionalField", "ModelWithRenamedArrays", "ModelWithRenamedFields", @@ -54,7 +46,6 @@ "ModelWithUnwrappedArray", "SimpleModel", "XmlErrorBody", - "Status", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py index 5fcba77a78..d1b430a546 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/models/_models.py @@ -7,8 +7,7 @@ # -------------------------------------------------------------------------- # pylint: disable=useless-super-delegation -import datetime -from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, overload from .._utils.model_base import Model as _Model, rest_field @@ -100,49 +99,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ModelWithDatetime(_Model): - """Contains datetime properties with different encodings. - - :ivar rfc3339: DateTime value with rfc3339 encoding. Required. - :vartype rfc3339: ~datetime.datetime - :ivar rfc7231: DateTime value with rfc7231 encoding. Required. - :vartype rfc7231: ~datetime.datetime - """ - - rfc3339: datetime.datetime = rest_field( - visibility=["read", "create", "update", "delete", "query"], - format="rfc3339", - xml={"attribute": False, "name": "rfc3339", "text": False, "unwrapped": False}, - ) - """DateTime value with rfc3339 encoding. Required.""" - rfc7231: datetime.datetime = rest_field( - visibility=["read", "create", "update", "delete", "query"], - format="rfc7231", - xml={"attribute": False, "name": "rfc7231", "text": False, "unwrapped": False}, - ) - """DateTime value with rfc7231 encoding. Required.""" - - _xml = {"attribute": False, "name": "ModelWithDatetime", "text": False, "unwrapped": False} - - @overload - def __init__( - self, - *, - rfc3339: datetime.datetime, - rfc7231: datetime.datetime, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ModelWithDictionary(_Model): """Contains a dictionary of key value pairs. @@ -253,39 +209,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ModelWithEnum(_Model): - """Contains a single property with an enum value. - - :ivar status: Required. Known values are: "pending", "success", and "error". - :vartype status: str or ~payload.xml.models.Status - """ - - status: Union[str, "_models.Status"] = rest_field( - visibility=["read", "create", "update", "delete", "query"], - xml={"attribute": False, "name": "status", "text": False, "unwrapped": False}, - ) - """Required. Known values are: \"pending\", \"success\", and \"error\".""" - - _xml = {"attribute": False, "name": "ModelWithEnum", "text": False, "unwrapped": False} - - @overload - def __init__( - self, - *, - status: Union[str, "_models.Status"], - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ModelWithOptionalField(_Model): """Contains an optional field. diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/__init__.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/__init__.py index 115dd22e44..45c12cbcab 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/__init__.py @@ -12,42 +12,38 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SimpleModelValueOperations # type: ignore -from ._operations import ModelWithSimpleArraysValueOperations # type: ignore -from ._operations import ModelWithArrayOfModelValueOperations # type: ignore -from ._operations import ModelWithOptionalFieldValueOperations # type: ignore -from ._operations import ModelWithAttributesValueOperations # type: ignore -from ._operations import ModelWithUnwrappedArrayValueOperations # type: ignore -from ._operations import ModelWithRenamedArraysValueOperations # type: ignore -from ._operations import ModelWithRenamedFieldsValueOperations # type: ignore -from ._operations import ModelWithEmptyArrayValueOperations # type: ignore -from ._operations import ModelWithTextValueOperations # type: ignore -from ._operations import ModelWithDictionaryValueOperations # type: ignore -from ._operations import ModelWithEncodedNamesValueOperations # type: ignore -from ._operations import ModelWithEnumValueOperations # type: ignore -from ._operations import ModelWithDatetimeValueOperations # type: ignore -from ._operations import XmlErrorValueOperations # type: ignore +from ._operations import XmlClientSimpleModelValueOperations # type: ignore +from ._operations import XmlClientModelWithSimpleArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithArrayOfModelValueOperations # type: ignore +from ._operations import XmlClientModelWithOptionalFieldValueOperations # type: ignore +from ._operations import XmlClientModelWithAttributesValueOperations # type: ignore +from ._operations import XmlClientModelWithUnwrappedArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedFieldsValueOperations # type: ignore +from ._operations import XmlClientModelWithEmptyArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithTextValueOperations # type: ignore +from ._operations import XmlClientModelWithDictionaryValueOperations # type: ignore +from ._operations import XmlClientModelWithEncodedNamesValueOperations # type: ignore +from ._operations import XmlClientXmlErrorValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SimpleModelValueOperations", - "ModelWithSimpleArraysValueOperations", - "ModelWithArrayOfModelValueOperations", - "ModelWithOptionalFieldValueOperations", - "ModelWithAttributesValueOperations", - "ModelWithUnwrappedArrayValueOperations", - "ModelWithRenamedArraysValueOperations", - "ModelWithRenamedFieldsValueOperations", - "ModelWithEmptyArrayValueOperations", - "ModelWithTextValueOperations", - "ModelWithDictionaryValueOperations", - "ModelWithEncodedNamesValueOperations", - "ModelWithEnumValueOperations", - "ModelWithDatetimeValueOperations", - "XmlErrorValueOperations", + "XmlClientSimpleModelValueOperations", + "XmlClientModelWithSimpleArraysValueOperations", + "XmlClientModelWithArrayOfModelValueOperations", + "XmlClientModelWithOptionalFieldValueOperations", + "XmlClientModelWithAttributesValueOperations", + "XmlClientModelWithUnwrappedArrayValueOperations", + "XmlClientModelWithRenamedArraysValueOperations", + "XmlClientModelWithRenamedFieldsValueOperations", + "XmlClientModelWithEmptyArrayValueOperations", + "XmlClientModelWithTextValueOperations", + "XmlClientModelWithDictionaryValueOperations", + "XmlClientModelWithEncodedNamesValueOperations", + "XmlClientXmlErrorValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py index 930f7b9ab9..17558873d7 100644 --- a/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/payload-xml/payload/xml/operations/_operations.py @@ -37,7 +37,7 @@ _SERIALIZER.client_side_validation = False -def build_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -51,7 +51,7 @@ def build_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -64,7 +64,9 @@ def build_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_simple_arrays_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_simple_arrays_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -78,7 +80,9 @@ def build_model_with_simple_arrays_value_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_simple_arrays_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_simple_arrays_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -91,7 +95,9 @@ def build_model_with_simple_arrays_value_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_array_of_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_array_of_model_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -105,7 +111,9 @@ def build_model_with_array_of_model_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_array_of_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_array_of_model_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -118,7 +126,9 @@ def build_model_with_array_of_model_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_optional_field_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_optional_field_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -132,7 +142,9 @@ def build_model_with_optional_field_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_optional_field_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_optional_field_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -145,7 +157,9 @@ def build_model_with_optional_field_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_attributes_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_attributes_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -159,7 +173,9 @@ def build_model_with_attributes_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_attributes_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_attributes_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -172,7 +188,9 @@ def build_model_with_attributes_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_unwrapped_array_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_unwrapped_array_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -186,7 +204,9 @@ def build_model_with_unwrapped_array_value_get_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_unwrapped_array_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_unwrapped_array_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -199,7 +219,9 @@ def build_model_with_unwrapped_array_value_put_request(**kwargs: Any) -> HttpReq return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_arrays_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_arrays_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -213,7 +235,9 @@ def build_model_with_renamed_arrays_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_arrays_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_arrays_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -226,7 +250,9 @@ def build_model_with_renamed_arrays_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_fields_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_fields_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -240,7 +266,9 @@ def build_model_with_renamed_fields_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_fields_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_fields_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -253,7 +281,9 @@ def build_model_with_renamed_fields_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_empty_array_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_empty_array_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -267,7 +297,9 @@ def build_model_with_empty_array_value_get_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_empty_array_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_empty_array_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -280,7 +312,7 @@ def build_model_with_empty_array_value_put_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -294,7 +326,7 @@ def build_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -307,7 +339,9 @@ def build_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_dictionary_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_dictionary_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -321,7 +355,9 @@ def build_model_with_dictionary_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_dictionary_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_dictionary_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -334,7 +370,9 @@ def build_model_with_dictionary_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_encoded_names_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_encoded_names_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -348,7 +386,9 @@ def build_model_with_encoded_names_value_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_encoded_names_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_encoded_names_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -361,61 +401,7 @@ def build_model_with_encoded_names_value_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_enum_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/xml") - - # Construct URL - _url = "/payload/xml/modelWithEnum" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_model_with_enum_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: str = kwargs.pop("content_type") - # Construct URL - _url = "/payload/xml/modelWithEnum" - - # Construct headers - _headers["content-type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_model_with_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/xml") - - # Construct URL - _url = "/payload/xml/modelWithDatetime" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_model_with_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: str = kwargs.pop("content_type") - # Construct URL - _url = "/payload/xml/modelWithDatetime" - - # Construct headers - _headers["content-type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -429,14 +415,14 @@ def build_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class SimpleModelValueOperations: +class XmlClientSimpleModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`simple_model_value` attribute. + :attr:`xml_client_simple_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -467,7 +453,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_simple_model_value_get_request( + _request = build_xml_client_simple_model_value_get_request( headers=_headers, params=_params, ) @@ -531,7 +517,7 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis _content = _get_element(input) - _request = build_simple_model_value_put_request( + _request = build_xml_client_simple_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -557,14 +543,14 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore -class ModelWithSimpleArraysValueOperations: +class XmlClientModelWithSimpleArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_simple_arrays_value` attribute. + :attr:`xml_client_model_with_simple_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -595,7 +581,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: cls: ClsType[_models.ModelWithSimpleArrays] = kwargs.pop("cls", None) - _request = build_model_with_simple_arrays_value_get_request( + _request = build_xml_client_model_with_simple_arrays_value_get_request( headers=_headers, params=_params, ) @@ -661,7 +647,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_simple_arrays_value_put_request( + _request = build_xml_client_model_with_simple_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -687,14 +673,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithArrayOfModelValueOperations: +class XmlClientModelWithArrayOfModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_array_of_model_value` attribute. + :attr:`xml_client_model_with_array_of_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -725,7 +711,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: cls: ClsType[_models.ModelWithArrayOfModel] = kwargs.pop("cls", None) - _request = build_model_with_array_of_model_value_get_request( + _request = build_xml_client_model_with_array_of_model_value_get_request( headers=_headers, params=_params, ) @@ -791,7 +777,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_array_of_model_value_put_request( + _request = build_xml_client_model_with_array_of_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -817,14 +803,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithOptionalFieldValueOperations: +class XmlClientModelWithOptionalFieldValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_optional_field_value` attribute. + :attr:`xml_client_model_with_optional_field_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -855,7 +841,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: cls: ClsType[_models.ModelWithOptionalField] = kwargs.pop("cls", None) - _request = build_model_with_optional_field_value_get_request( + _request = build_xml_client_model_with_optional_field_value_get_request( headers=_headers, params=_params, ) @@ -921,7 +907,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_optional_field_value_put_request( + _request = build_xml_client_model_with_optional_field_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -947,14 +933,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithAttributesValueOperations: +class XmlClientModelWithAttributesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_attributes_value` attribute. + :attr:`xml_client_model_with_attributes_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -985,7 +971,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithAttributes: cls: ClsType[_models.ModelWithAttributes] = kwargs.pop("cls", None) - _request = build_model_with_attributes_value_get_request( + _request = build_xml_client_model_with_attributes_value_get_request( headers=_headers, params=_params, ) @@ -1051,7 +1037,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_attributes_value_put_request( + _request = build_xml_client_model_with_attributes_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1077,14 +1063,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithUnwrappedArrayValueOperations: +class XmlClientModelWithUnwrappedArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_unwrapped_array_value` attribute. + :attr:`xml_client_model_with_unwrapped_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1115,7 +1101,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: cls: ClsType[_models.ModelWithUnwrappedArray] = kwargs.pop("cls", None) - _request = build_model_with_unwrapped_array_value_get_request( + _request = build_xml_client_model_with_unwrapped_array_value_get_request( headers=_headers, params=_params, ) @@ -1181,7 +1167,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_unwrapped_array_value_put_request( + _request = build_xml_client_model_with_unwrapped_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1207,14 +1193,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedArraysValueOperations: +class XmlClientModelWithRenamedArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_renamed_arrays_value` attribute. + :attr:`xml_client_model_with_renamed_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1245,7 +1231,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: cls: ClsType[_models.ModelWithRenamedArrays] = kwargs.pop("cls", None) - _request = build_model_with_renamed_arrays_value_get_request( + _request = build_xml_client_model_with_renamed_arrays_value_get_request( headers=_headers, params=_params, ) @@ -1311,7 +1297,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_renamed_arrays_value_put_request( + _request = build_xml_client_model_with_renamed_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1337,14 +1323,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedFieldsValueOperations: +class XmlClientModelWithRenamedFieldsValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_renamed_fields_value` attribute. + :attr:`xml_client_model_with_renamed_fields_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1375,7 +1361,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: cls: ClsType[_models.ModelWithRenamedFields] = kwargs.pop("cls", None) - _request = build_model_with_renamed_fields_value_get_request( + _request = build_xml_client_model_with_renamed_fields_value_get_request( headers=_headers, params=_params, ) @@ -1441,7 +1427,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_renamed_fields_value_put_request( + _request = build_xml_client_model_with_renamed_fields_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1467,14 +1453,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEmptyArrayValueOperations: +class XmlClientModelWithEmptyArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_empty_array_value` attribute. + :attr:`xml_client_model_with_empty_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1505,7 +1491,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: cls: ClsType[_models.ModelWithEmptyArray] = kwargs.pop("cls", None) - _request = build_model_with_empty_array_value_get_request( + _request = build_xml_client_model_with_empty_array_value_get_request( headers=_headers, params=_params, ) @@ -1571,7 +1557,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_empty_array_value_put_request( + _request = build_xml_client_model_with_empty_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1597,14 +1583,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithTextValueOperations: +class XmlClientModelWithTextValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_text_value` attribute. + :attr:`xml_client_model_with_text_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1635,7 +1621,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithText: cls: ClsType[_models.ModelWithText] = kwargs.pop("cls", None) - _request = build_model_with_text_value_get_request( + _request = build_xml_client_model_with_text_value_get_request( headers=_headers, params=_params, ) @@ -1701,7 +1687,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_text_value_put_request( + _request = build_xml_client_model_with_text_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1727,14 +1713,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithDictionaryValueOperations: +class XmlClientModelWithDictionaryValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_dictionary_value` attribute. + :attr:`xml_client_model_with_dictionary_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1765,7 +1751,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithDictionary: cls: ClsType[_models.ModelWithDictionary] = kwargs.pop("cls", None) - _request = build_model_with_dictionary_value_get_request( + _request = build_xml_client_model_with_dictionary_value_get_request( headers=_headers, params=_params, ) @@ -1831,7 +1817,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_dictionary_value_put_request( + _request = build_xml_client_model_with_dictionary_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1857,14 +1843,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEncodedNamesValueOperations: +class XmlClientModelWithEncodedNamesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_encoded_names_value` attribute. + :attr:`xml_client_model_with_encoded_names_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1895,7 +1881,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: cls: ClsType[_models.ModelWithEncodedNames] = kwargs.pop("cls", None) - _request = build_model_with_encoded_names_value_get_request( + _request = build_xml_client_model_with_encoded_names_value_get_request( headers=_headers, params=_params, ) @@ -1961,267 +1947,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_encoded_names_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithEnumValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.XmlClient`'s - :attr:`model_with_enum_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> _models.ModelWithEnum: - """get. - - :return: ModelWithEnum. The ModelWithEnum is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithEnum - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithEnum] = kwargs.pop("cls", None) - - _request = build_model_with_enum_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithEnum, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEnum, **kwargs: Any - ) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithEnum - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_enum_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithDatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.XmlClient`'s - :attr:`model_with_datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, **kwargs: Any) -> _models.ModelWithDatetime: - """get. - - :return: ModelWithDatetime. The ModelWithDatetime is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithDatetime - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithDatetime] = kwargs.pop("cls", None) - - _request = build_model_with_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithDatetime, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithDatetime, **kwargs: Any - ) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithDatetime - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_datetime_value_put_request( + _request = build_xml_client_model_with_encoded_names_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2247,14 +1973,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class XmlErrorValueOperations: +class XmlClientXmlErrorValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`xml_error_value` attribute. + :attr:`xml_client_xml_error_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2285,7 +2011,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_xml_error_value_get_request( + _request = build_xml_client_xml_error_value_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/routes/apiview-properties.json b/packages/typespec-python/test/azure/generated/routes/apiview-properties.json index e1e658dfa2..4c5f91749e 100644 --- a/packages/typespec-python/test/azure/generated/routes/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/routes/apiview-properties.json @@ -1,20 +1,20 @@ { "CrossLanguagePackageId": "Routes", "CrossLanguageDefinitionId": { - "routes.operations.PathParametersOperations.template_only": "Routes.PathParameters.templateOnly", - "routes.aio.operations.PathParametersOperations.template_only": "Routes.PathParameters.templateOnly", - "routes.operations.PathParametersOperations.explicit": "Routes.PathParameters.explicit", - "routes.aio.operations.PathParametersOperations.explicit": "Routes.PathParameters.explicit", - "routes.operations.PathParametersOperations.annotation_only": "Routes.PathParameters.annotationOnly", - "routes.aio.operations.PathParametersOperations.annotation_only": "Routes.PathParameters.annotationOnly", - "routes.operations.QueryParametersOperations.template_only": "Routes.QueryParameters.templateOnly", - "routes.aio.operations.QueryParametersOperations.template_only": "Routes.QueryParameters.templateOnly", - "routes.operations.QueryParametersOperations.explicit": "Routes.QueryParameters.explicit", - "routes.aio.operations.QueryParametersOperations.explicit": "Routes.QueryParameters.explicit", - "routes.operations.QueryParametersOperations.annotation_only": "Routes.QueryParameters.annotationOnly", - "routes.aio.operations.QueryParametersOperations.annotation_only": "Routes.QueryParameters.annotationOnly", - "routes.operations.InInterfaceOperations.fixed": "Routes.InInterface.fixed", - "routes.aio.operations.InInterfaceOperations.fixed": "Routes.InInterface.fixed", + "routes.operations.RoutesClientPathParametersOperations.template_only": "Routes.PathParameters.templateOnly", + "routes.aio.operations.RoutesClientPathParametersOperations.template_only": "Routes.PathParameters.templateOnly", + "routes.operations.RoutesClientPathParametersOperations.explicit": "Routes.PathParameters.explicit", + "routes.aio.operations.RoutesClientPathParametersOperations.explicit": "Routes.PathParameters.explicit", + "routes.operations.RoutesClientPathParametersOperations.annotation_only": "Routes.PathParameters.annotationOnly", + "routes.aio.operations.RoutesClientPathParametersOperations.annotation_only": "Routes.PathParameters.annotationOnly", + "routes.operations.RoutesClientQueryParametersOperations.template_only": "Routes.QueryParameters.templateOnly", + "routes.aio.operations.RoutesClientQueryParametersOperations.template_only": "Routes.QueryParameters.templateOnly", + "routes.operations.RoutesClientQueryParametersOperations.explicit": "Routes.QueryParameters.explicit", + "routes.aio.operations.RoutesClientQueryParametersOperations.explicit": "Routes.QueryParameters.explicit", + "routes.operations.RoutesClientQueryParametersOperations.annotation_only": "Routes.QueryParameters.annotationOnly", + "routes.aio.operations.RoutesClientQueryParametersOperations.annotation_only": "Routes.QueryParameters.annotationOnly", + "routes.operations.RoutesClientInInterfaceOperations.fixed": "Routes.InInterface.fixed", + "routes.aio.operations.RoutesClientInInterfaceOperations.fixed": "Routes.InInterface.fixed", "routes.RoutesClient.fixed": "Routes.fixed", "routes.aio.RoutesClient.fixed": "Routes.fixed" } diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations.py new file mode 100644 index 0000000000..fef3a49d56 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations.py @@ -0,0 +1,22 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RoutesClientTestBase, RoutesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientInInterfaceOperations(RoutesClientTestBase): + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_in_interface_fixed(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_in_interface.fixed() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations_async.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations_async.py new file mode 100644 index 0000000000..662bc7c9ea --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_in_interface_operations_async.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RoutesPreparer +from testpreparer_async import RoutesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientInInterfaceOperationsAsync(RoutesClientTestBaseAsync): + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_in_interface_fixed(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_in_interface.fixed() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations.py new file mode 100644 index 0000000000..a89a4d50b2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations.py @@ -0,0 +1,385 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RoutesClientTestBase, RoutesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientPathParametersOperations(RoutesClientTestBase): + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_template_only(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.template_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_explicit(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.explicit( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_annotation_only(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.annotation_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_reserved_expansion_template( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_reserved_expansion.template( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_reserved_expansion_annotation( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_reserved_expansion.annotation( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations_async.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations_async.py new file mode 100644 index 0000000000..e27fdc3b12 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_path_parameters_operations_async.py @@ -0,0 +1,388 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RoutesPreparer +from testpreparer_async import RoutesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientPathParametersOperationsAsync(RoutesClientTestBaseAsync): + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_template_only(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.template_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_explicit(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.explicit( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_annotation_only(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.annotation_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_reserved_expansion_template( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_reserved_expansion.template( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_reserved_expansion_annotation( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = ( + await client.routes_client_path_parameters.routes_client_path_parameters_reserved_expansion.annotation( + param="str", + ) + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_simple_expansion_routes_client_path_parameters_simple_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_simple_expansion.routes_client_path_parameters_simple_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_path_expansion_routes_client_path_parameters_path_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_path_expansion.routes_client_path_parameters_path_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_label_expansion_routes_client_path_parameters_label_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_label_expansion.routes_client_path_parameters_label_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_path_parameters_routes_client_path_parameters_matrix_expansion_routes_client_path_parameters_matrix_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_path_parameters.routes_client_path_parameters_matrix_expansion.routes_client_path_parameters_matrix_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations.py new file mode 100644 index 0000000000..3ca1e60b4f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations.py @@ -0,0 +1,203 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RoutesClientTestBase, RoutesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientQueryParametersOperations(RoutesClientTestBase): + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_template_only(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.template_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_explicit(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.explicit( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_annotation_only(self, routes_endpoint): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.annotation_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_primitive( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_array( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy + def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_record( + self, routes_endpoint + ): + client = self.create_client(endpoint=routes_endpoint) + response = client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations_async.py b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations_async.py new file mode 100644 index 0000000000..1798765f6b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/routes/generated_tests/test_routes_routes_client_query_parameters_operations_async.py @@ -0,0 +1,204 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RoutesPreparer +from testpreparer_async import RoutesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRoutesRoutesClientQueryParametersOperationsAsync(RoutesClientTestBaseAsync): + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_template_only(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.template_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_explicit(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.explicit( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_annotation_only(self, routes_endpoint): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.annotation_only( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_expansion_routes_client_query_parameters_query_expansion_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_expansion.routes_client_query_parameters_query_expansion_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_standard_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_standard.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_primitive( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.primitive( + param="str", + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_array( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.array( + param=["str"], + ) + + # please add some check logic here by yourself + # ... + + @RoutesPreparer() + @recorded_by_proxy_async + async def test_routes_client_query_parameters_routes_client_query_parameters_query_continuation_routes_client_query_parameters_query_continuation_explode_record( + self, routes_endpoint + ): + client = self.create_async_client(endpoint=routes_endpoint) + response = await client.routes_client_query_parameters.routes_client_query_parameters_query_continuation.routes_client_query_parameters_query_continuation_explode.record( + param={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/routes/routes/_client.py b/packages/typespec-python/test/azure/generated/routes/routes/_client.py index ea84f981a1..720925ede6 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/_client.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/_client.py @@ -16,20 +16,21 @@ from ._configuration import RoutesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InInterfaceOperations, _RoutesClientOperationsMixin -from .pathparameters.operations import PathParametersOperations -from .queryparameters.operations import QueryParametersOperations +from .operations import RoutesClientInInterfaceOperations, _RoutesClientOperationsMixin +from .pathparameters.operations import RoutesClientPathParametersOperations +from .queryparameters.operations import RoutesClientQueryParametersOperations class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Define scenario in building the http route/uri. - :ivar path_parameters: PathParametersOperations operations - :vartype path_parameters: routes.operations.PathParametersOperations - :ivar query_parameters: QueryParametersOperations operations - :vartype query_parameters: routes.operations.QueryParametersOperations - :ivar in_interface: InInterfaceOperations operations - :vartype in_interface: routes.operations.InInterfaceOperations + :ivar routes_client_path_parameters: RoutesClientPathParametersOperations operations + :vartype routes_client_path_parameters: routes.operations.RoutesClientPathParametersOperations + :ivar routes_client_query_parameters: RoutesClientQueryParametersOperations operations + :vartype routes_client_query_parameters: + routes.operations.RoutesClientQueryParametersOperations + :ivar routes_client_in_interface: RoutesClientInInterfaceOperations operations + :vartype routes_client_in_interface: routes.operations.RoutesClientInInterfaceOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -62,11 +63,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.path_parameters = PathParametersOperations(self._client, self._config, self._serialize, self._deserialize) - self.query_parameters = QueryParametersOperations( + self.routes_client_path_parameters = RoutesClientPathParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_query_parameters = RoutesClientQueryParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_in_interface = RoutesClientInInterfaceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.in_interface = InInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py index 7ca64d8eb7..3e11381c9e 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/_client.py @@ -15,21 +15,23 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..pathparameters.aio.operations import PathParametersOperations -from ..queryparameters.aio.operations import QueryParametersOperations +from ..pathparameters.aio.operations import RoutesClientPathParametersOperations +from ..queryparameters.aio.operations import RoutesClientQueryParametersOperations from ._configuration import RoutesClientConfiguration -from .operations import InInterfaceOperations, _RoutesClientOperationsMixin +from .operations import RoutesClientInInterfaceOperations, _RoutesClientOperationsMixin class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Define scenario in building the http route/uri. - :ivar path_parameters: PathParametersOperations operations - :vartype path_parameters: routes.aio.operations.PathParametersOperations - :ivar query_parameters: QueryParametersOperations operations - :vartype query_parameters: routes.aio.operations.QueryParametersOperations - :ivar in_interface: InInterfaceOperations operations - :vartype in_interface: routes.aio.operations.InInterfaceOperations + :ivar routes_client_path_parameters: RoutesClientPathParametersOperations operations + :vartype routes_client_path_parameters: + routes.aio.operations.RoutesClientPathParametersOperations + :ivar routes_client_query_parameters: RoutesClientQueryParametersOperations operations + :vartype routes_client_query_parameters: + routes.aio.operations.RoutesClientQueryParametersOperations + :ivar routes_client_in_interface: RoutesClientInInterfaceOperations operations + :vartype routes_client_in_interface: routes.aio.operations.RoutesClientInInterfaceOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -62,11 +64,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.path_parameters = PathParametersOperations(self._client, self._config, self._serialize, self._deserialize) - self.query_parameters = QueryParametersOperations( + self.routes_client_path_parameters = RoutesClientPathParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_query_parameters = RoutesClientQueryParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_in_interface = RoutesClientInInterfaceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.in_interface = InInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py index 84c8a2ceb2..64c80d18cb 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InInterfaceOperations # type: ignore +from ._operations import RoutesClientInInterfaceOperations # type: ignore from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InInterfaceOperations", + "RoutesClientInInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py index ed2db3405f..052f8fae3b 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/aio/operations/_operations.py @@ -24,21 +24,21 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC -from ...operations._operations import build_in_interface_fixed_request, build_routes_fixed_request +from ...operations._operations import build_routes_client_in_interface_fixed_request, build_routes_fixed_request from .._configuration import RoutesClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class InInterfaceOperations: +class RoutesClientInInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`in_interface` attribute. + :attr:`routes_client_in_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,7 +69,7 @@ async def fixed(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_in_interface_fixed_request( + _request = build_routes_client_in_interface_fixed_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py index 84c8a2ceb2..64c80d18cb 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InInterfaceOperations # type: ignore +from ._operations import RoutesClientInInterfaceOperations # type: ignore from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InInterfaceOperations", + "RoutesClientInInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py index 17b66e5165..2d088a597b 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_in_interface_fixed_request(**kwargs: Any) -> HttpRequest: +def build_routes_client_in_interface_fixed_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/routes/in-interface/fixed" @@ -46,14 +46,14 @@ def build_routes_fixed_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, **kwargs) -class InInterfaceOperations: +class RoutesClientInInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`in_interface` attribute. + :attr:`routes_client_in_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,7 +84,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_in_interface_fixed_request( + _request = build_routes_client_in_interface_fixed_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/__init__.py index fc6dacce9a..04218fbe16 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PathParametersOperations # type: ignore +from ._operations import RoutesClientPathParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PathParametersOperations", + "RoutesClientPathParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/_operations.py index d1e05d046b..b3d92e3f11 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/aio/operations/_operations.py @@ -23,29 +23,29 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import RoutesClientConfiguration -from ...labelexpansion.aio.operations._operations import PathParametersLabelExpansionOperations -from ...matrixexpansion.aio.operations._operations import PathParametersMatrixExpansionOperations +from ...labelexpansion.aio.operations._operations import RoutesClientPathParametersLabelExpansionOperations +from ...matrixexpansion.aio.operations._operations import RoutesClientPathParametersMatrixExpansionOperations from ...operations._operations import ( - build_path_parameters_annotation_only_request, - build_path_parameters_explicit_request, - build_path_parameters_template_only_request, + build_routes_client_path_parameters_annotation_only_request, + build_routes_client_path_parameters_explicit_request, + build_routes_client_path_parameters_template_only_request, ) -from ...pathexpansion.aio.operations._operations import PathParametersPathExpansionOperations -from ...reservedexpansion.aio.operations._operations import PathParametersReservedExpansionOperations -from ...simpleexpansion.aio.operations._operations import PathParametersSimpleExpansionOperations +from ...pathexpansion.aio.operations._operations import RoutesClientPathParametersPathExpansionOperations +from ...reservedexpansion.aio.operations._operations import RoutesClientPathParametersReservedExpansionOperations +from ...simpleexpansion.aio.operations._operations import RoutesClientPathParametersSimpleExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersOperations: +class RoutesClientPathParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`path_parameters` attribute. + :attr:`routes_client_path_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -55,19 +55,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.reserved_expansion = PathParametersReservedExpansionOperations( + self.routes_client_path_parameters_reserved_expansion = RoutesClientPathParametersReservedExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.simple_expansion = PathParametersSimpleExpansionOperations( + self.routes_client_path_parameters_simple_expansion = RoutesClientPathParametersSimpleExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.path_expansion = PathParametersPathExpansionOperations( + self.routes_client_path_parameters_path_expansion = RoutesClientPathParametersPathExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.label_expansion = PathParametersLabelExpansionOperations( + self.routes_client_path_parameters_label_expansion = RoutesClientPathParametersLabelExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.matrix_expansion = PathParametersMatrixExpansionOperations( + self.routes_client_path_parameters_matrix_expansion = RoutesClientPathParametersMatrixExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -94,7 +94,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_template_only_request( + _request = build_routes_client_path_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -141,7 +141,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_explicit_request( + _request = build_routes_client_path_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -188,7 +188,7 @@ async def annotation_only(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_annotation_only_request( + _request = build_routes_client_path_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py index 6811b57ded..dab6c257d6 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersLabelExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersLabelExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersLabelExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersLabelExpansionStandardOperations -class PathParametersLabelExpansionOperations: +class RoutesClientPathParametersLabelExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`label_expansion` attribute. + :attr:`routes_client_path_parameters_label_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersLabelExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_standard = ( + RoutesClientPathParametersLabelExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersLabelExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_explode = ( + RoutesClientPathParametersLabelExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py index 15c0bcc435..293123549c 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_label_expansion_explode_array_request, - build_path_parameters_label_expansion_explode_primitive_request, - build_path_parameters_label_expansion_explode_record_request, + build_routes_client_path_parameters_label_expansion_explode_array_request, + build_routes_client_path_parameters_label_expansion_explode_primitive_request, + build_routes_client_path_parameters_label_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_label_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_array_request( + _request = build_routes_client_path_parameters_label_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_record_request( + _request = build_routes_client_path_parameters_label_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py index b0e1fe60f7..b6aa97d9c1 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_label_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_label_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_label_expansion_explode_array_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_label_expansion_explode_record_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_label_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_array_request( + _request = build_routes_client_path_parameters_label_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_record_request( + _request = build_routes_client_path_parameters_label_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py index d0e30e1f8b..3d439f9a92 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersLabelExpansionExplodeOperations -from ..standard.operations._operations import PathParametersLabelExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersLabelExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersLabelExpansionStandardOperations -class PathParametersLabelExpansionOperations: +class RoutesClientPathParametersLabelExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`label_expansion` attribute. + :attr:`routes_client_path_parameters_label_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersLabelExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_standard = ( + RoutesClientPathParametersLabelExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersLabelExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_explode = ( + RoutesClientPathParametersLabelExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py index 2eb70b605c..9167f46fb6 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_label_expansion_standard_array_request, - build_path_parameters_label_expansion_standard_primitive_request, - build_path_parameters_label_expansion_standard_record_request, + build_routes_client_path_parameters_label_expansion_standard_array_request, + build_routes_client_path_parameters_label_expansion_standard_primitive_request, + build_routes_client_path_parameters_label_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_label_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_array_request( + _request = build_routes_client_path_parameters_label_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_record_request( + _request = build_routes_client_path_parameters_label_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py index 84424ba70e..3f67b3a146 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_label_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_label_expansion_standard_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_label_expansion_standard_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_label_expansion_standard_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_label_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_array_request( + _request = build_routes_client_path_parameters_label_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_record_request( + _request = build_routes_client_path_parameters_label_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py index f5ffc5e949..097c9ec68c 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersMatrixExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersMatrixExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersMatrixExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersMatrixExpansionStandardOperations -class PathParametersMatrixExpansionOperations: +class RoutesClientPathParametersMatrixExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`matrix_expansion` attribute. + :attr:`routes_client_path_parameters_matrix_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersMatrixExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_standard = ( + RoutesClientPathParametersMatrixExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersMatrixExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_explode = ( + RoutesClientPathParametersMatrixExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py index 8b31afc861..b10f54a851 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_matrix_expansion_explode_array_request, - build_path_parameters_matrix_expansion_explode_primitive_request, - build_path_parameters_matrix_expansion_explode_record_request, + build_routes_client_path_parameters_matrix_expansion_explode_array_request, + build_routes_client_path_parameters_matrix_expansion_explode_primitive_request, + build_routes_client_path_parameters_matrix_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py index 2aa3509956..0c9f8e5ea6 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_matrix_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_matrix_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_matrix_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_matrix_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py index 698ff30722..5344b5ea8e 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersMatrixExpansionExplodeOperations -from ..standard.operations._operations import PathParametersMatrixExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersMatrixExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersMatrixExpansionStandardOperations -class PathParametersMatrixExpansionOperations: +class RoutesClientPathParametersMatrixExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`matrix_expansion` attribute. + :attr:`routes_client_path_parameters_matrix_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersMatrixExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_standard = ( + RoutesClientPathParametersMatrixExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersMatrixExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_explode = ( + RoutesClientPathParametersMatrixExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py index d3bee0ba56..a8a9655554 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_matrix_expansion_standard_array_request, - build_path_parameters_matrix_expansion_standard_primitive_request, - build_path_parameters_matrix_expansion_standard_record_request, + build_routes_client_path_parameters_matrix_expansion_standard_array_request, + build_routes_client_path_parameters_matrix_expansion_standard_primitive_request, + build_routes_client_path_parameters_matrix_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py index 5534de1d7a..276a5a58da 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_matrix_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_matrix_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_matrix_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_matrix_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/__init__.py index fc6dacce9a..04218fbe16 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PathParametersOperations # type: ignore +from ._operations import RoutesClientPathParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PathParametersOperations", + "RoutesClientPathParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/_operations.py index 0402ba1855..95ee9f6e01 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/operations/_operations.py @@ -23,11 +23,11 @@ from ..._configuration import RoutesClientConfiguration from ..._utils.serialization import Deserializer, Serializer -from ..labelexpansion.operations._operations import PathParametersLabelExpansionOperations -from ..matrixexpansion.operations._operations import PathParametersMatrixExpansionOperations -from ..pathexpansion.operations._operations import PathParametersPathExpansionOperations -from ..reservedexpansion.operations._operations import PathParametersReservedExpansionOperations -from ..simpleexpansion.operations._operations import PathParametersSimpleExpansionOperations +from ..labelexpansion.operations._operations import RoutesClientPathParametersLabelExpansionOperations +from ..matrixexpansion.operations._operations import RoutesClientPathParametersMatrixExpansionOperations +from ..pathexpansion.operations._operations import RoutesClientPathParametersPathExpansionOperations +from ..reservedexpansion.operations._operations import RoutesClientPathParametersReservedExpansionOperations +from ..simpleexpansion.operations._operations import RoutesClientPathParametersSimpleExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -36,7 +36,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_template_only_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_template_only_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -50,7 +50,9 @@ def build_path_parameters_template_only_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_explicit_request(param: str, **kwargs: Any) -> HttpRequest: +def build_routes_client_path_parameters_explicit_request( # pylint: disable=name-too-long + param: str, **kwargs: Any +) -> HttpRequest: # Construct URL _url = "/routes/path/explicit/{param}" path_format_arguments = { @@ -62,7 +64,7 @@ def build_path_parameters_explicit_request(param: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_annotation_only_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_annotation_only_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -76,14 +78,14 @@ def build_path_parameters_annotation_only_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersOperations: +class RoutesClientPathParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`path_parameters` attribute. + :attr:`routes_client_path_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -93,19 +95,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.reserved_expansion = PathParametersReservedExpansionOperations( + self.routes_client_path_parameters_reserved_expansion = RoutesClientPathParametersReservedExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.simple_expansion = PathParametersSimpleExpansionOperations( + self.routes_client_path_parameters_simple_expansion = RoutesClientPathParametersSimpleExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.path_expansion = PathParametersPathExpansionOperations( + self.routes_client_path_parameters_path_expansion = RoutesClientPathParametersPathExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.label_expansion = PathParametersLabelExpansionOperations( + self.routes_client_path_parameters_label_expansion = RoutesClientPathParametersLabelExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.matrix_expansion = PathParametersMatrixExpansionOperations( + self.routes_client_path_parameters_matrix_expansion = RoutesClientPathParametersMatrixExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -132,7 +134,7 @@ def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_template_only_request( + _request = build_routes_client_path_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -179,7 +181,7 @@ def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_explicit_request( + _request = build_routes_client_path_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -226,7 +228,7 @@ def annotation_only(self, param: str, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_annotation_only_request( + _request = build_routes_client_path_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py index 6ff52ca99c..2908c9d292 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersPathExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersPathExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersPathExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersPathExpansionStandardOperations -class PathParametersPathExpansionOperations: +class RoutesClientPathParametersPathExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`path_expansion` attribute. + :attr:`routes_client_path_parameters_path_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersPathExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_standard = ( + RoutesClientPathParametersPathExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersPathExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_explode = ( + RoutesClientPathParametersPathExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py index 05faba6325..001799b461 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_path_expansion_explode_array_request, - build_path_parameters_path_expansion_explode_primitive_request, - build_path_parameters_path_expansion_explode_record_request, + build_routes_client_path_parameters_path_expansion_explode_array_request, + build_routes_client_path_parameters_path_expansion_explode_primitive_request, + build_routes_client_path_parameters_path_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_path_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_array_request( + _request = build_routes_client_path_parameters_path_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_record_request( + _request = build_routes_client_path_parameters_path_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py index 34c0ee73bc..b98f7e8dba 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_path_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_path_expansion_explode_primitive_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_path_expansion_explode_array_request( # pylint: disab return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_path_expansion_explode_record_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_path_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_array_request( + _request = build_routes_client_path_parameters_path_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_record_request( + _request = build_routes_client_path_parameters_path_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py index 8981e2ed36..f5d874d635 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersPathExpansionExplodeOperations -from ..standard.operations._operations import PathParametersPathExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersPathExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersPathExpansionStandardOperations -class PathParametersPathExpansionOperations: +class RoutesClientPathParametersPathExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`path_expansion` attribute. + :attr:`routes_client_path_parameters_path_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersPathExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_standard = ( + RoutesClientPathParametersPathExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersPathExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_explode = ( + RoutesClientPathParametersPathExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py index e9e53c86d6..75376cf8fa 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_path_expansion_standard_array_request, - build_path_parameters_path_expansion_standard_primitive_request, - build_path_parameters_path_expansion_standard_record_request, + build_routes_client_path_parameters_path_expansion_standard_array_request, + build_routes_client_path_parameters_path_expansion_standard_primitive_request, + build_routes_client_path_parameters_path_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_path_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_array_request( + _request = build_routes_client_path_parameters_path_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_record_request( + _request = build_routes_client_path_parameters_path_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py index 7b142e35b1..9fa09fe748 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_path_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_path_expansion_standard_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_path_expansion_standard_array_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_path_expansion_standard_record_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_path_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_array_request( + _request = build_routes_client_path_parameters_path_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_record_request( + _request = build_routes_client_path_parameters_path_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py index d649bf8308..b4e94f2b2d 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py @@ -24,22 +24,22 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_reserved_expansion_annotation_request, - build_path_parameters_reserved_expansion_template_request, + build_routes_client_path_parameters_reserved_expansion_annotation_request, + build_routes_client_path_parameters_reserved_expansion_template_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersReservedExpansionOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersReservedExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`reserved_expansion` attribute. + :attr:`routes_client_path_parameters_reserved_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -72,7 +72,7 @@ async def template(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_template_request( + _request = build_routes_client_path_parameters_reserved_expansion_template_request( param=param, headers=_headers, params=_params, @@ -119,7 +119,7 @@ async def annotation(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_annotation_request( + _request = build_routes_client_path_parameters_reserved_expansion_annotation_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py index a57b813df7..6ba99eedb7 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_reserved_expansion_template_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_reserved_expansion_template_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_reserved_expansion_template_request( # pylint: disabl return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_reserved_expansion_annotation_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_reserved_expansion_annotation_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,14 +59,14 @@ def build_path_parameters_reserved_expansion_annotation_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersReservedExpansionOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersReservedExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`reserved_expansion` attribute. + :attr:`routes_client_path_parameters_reserved_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -99,7 +99,7 @@ def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_template_request( + _request = build_routes_client_path_parameters_reserved_expansion_template_request( param=param, headers=_headers, params=_params, @@ -146,7 +146,7 @@ def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inco cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_annotation_request( + _request = build_routes_client_path_parameters_reserved_expansion_annotation_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py index fbd5793bed..f570b5031f 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersSimpleExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersSimpleExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersSimpleExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersSimpleExpansionStandardOperations -class PathParametersSimpleExpansionOperations: +class RoutesClientPathParametersSimpleExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`simple_expansion` attribute. + :attr:`routes_client_path_parameters_simple_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersSimpleExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_standard = ( + RoutesClientPathParametersSimpleExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersSimpleExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_explode = ( + RoutesClientPathParametersSimpleExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py index 72d1c6ed32..c7905e98fb 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_simple_expansion_explode_array_request, - build_path_parameters_simple_expansion_explode_primitive_request, - build_path_parameters_simple_expansion_explode_record_request, + build_routes_client_path_parameters_simple_expansion_explode_array_request, + build_routes_client_path_parameters_simple_expansion_explode_primitive_request, + build_routes_client_path_parameters_simple_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_simple_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_array_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_record_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py index aa70d37e50..53154f5110 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_simple_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_simple_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_simple_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_simple_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_simple_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_array_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_record_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py index 5d4faa3e29..9899ba56a5 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersSimpleExpansionExplodeOperations -from ..standard.operations._operations import PathParametersSimpleExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersSimpleExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersSimpleExpansionStandardOperations -class PathParametersSimpleExpansionOperations: +class RoutesClientPathParametersSimpleExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`simple_expansion` attribute. + :attr:`routes_client_path_parameters_simple_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersSimpleExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_standard = ( + RoutesClientPathParametersSimpleExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersSimpleExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_explode = ( + RoutesClientPathParametersSimpleExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py index e6ce49c8a4..1636ab4618 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_simple_expansion_standard_array_request, - build_path_parameters_simple_expansion_standard_primitive_request, - build_path_parameters_simple_expansion_standard_record_request, + build_routes_client_path_parameters_simple_expansion_standard_array_request, + build_routes_client_path_parameters_simple_expansion_standard_primitive_request, + build_routes_client_path_parameters_simple_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_simple_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_array_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_record_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py index 7c8bca2209..0b21f08d3b 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_simple_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -45,7 +45,7 @@ def build_path_parameters_simple_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -59,7 +59,7 @@ def build_path_parameters_simple_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -73,14 +73,14 @@ def build_path_parameters_simple_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_simple_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -113,7 +113,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -160,7 +160,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_array_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -207,7 +207,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_record_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/__init__.py index 2a3caa32ea..dda2a49f64 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryParametersOperations # type: ignore +from ._operations import RoutesClientQueryParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryParametersOperations", + "RoutesClientQueryParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/_operations.py index 97543fbdde..b09918ab6a 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/aio/operations/_operations.py @@ -24,25 +24,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_annotation_only_request, - build_query_parameters_explicit_request, - build_query_parameters_template_only_request, + build_routes_client_query_parameters_annotation_only_request, + build_routes_client_query_parameters_explicit_request, + build_routes_client_query_parameters_template_only_request, ) -from ...querycontinuation.aio.operations._operations import QueryParametersQueryContinuationOperations -from ...queryexpansion.aio.operations._operations import QueryParametersQueryExpansionOperations +from ...querycontinuation.aio.operations._operations import RoutesClientQueryParametersQueryContinuationOperations +from ...queryexpansion.aio.operations._operations import RoutesClientQueryParametersQueryExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersOperations: +class RoutesClientQueryParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_parameters` attribute. + :attr:`routes_client_query_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -52,10 +52,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.query_expansion = QueryParametersQueryExpansionOperations( + self.routes_client_query_parameters_query_expansion = RoutesClientQueryParametersQueryExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.query_continuation = QueryParametersQueryContinuationOperations( + self.routes_client_query_parameters_query_continuation = RoutesClientQueryParametersQueryContinuationOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -82,7 +82,7 @@ async def template_only(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_template_only_request( + _request = build_routes_client_query_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -129,7 +129,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_explicit_request( + _request = build_routes_client_query_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -176,7 +176,7 @@ async def annotation_only(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_annotation_only_request( + _request = build_routes_client_query_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/__init__.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/__init__.py index 2a3caa32ea..dda2a49f64 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryParametersOperations # type: ignore +from ._operations import RoutesClientQueryParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryParametersOperations", + "RoutesClientQueryParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/_operations.py index 55764eff13..1edf1b58c3 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/operations/_operations.py @@ -24,8 +24,8 @@ from ..._configuration import RoutesClientConfiguration from ..._utils.serialization import Deserializer, Serializer -from ..querycontinuation.operations._operations import QueryParametersQueryContinuationOperations -from ..queryexpansion.operations._operations import QueryParametersQueryExpansionOperations +from ..querycontinuation.operations._operations import RoutesClientQueryParametersQueryContinuationOperations +from ..queryexpansion.operations._operations import RoutesClientQueryParametersQueryExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_template_only_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_template_only_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -48,7 +48,9 @@ def build_query_parameters_template_only_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_explicit_request(*, param: str, **kwargs: Any) -> HttpRequest: +def build_routes_client_query_parameters_explicit_request( # pylint: disable=name-too-long + *, param: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -60,7 +62,7 @@ def build_query_parameters_explicit_request(*, param: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_annotation_only_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_annotation_only_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -74,14 +76,14 @@ def build_query_parameters_annotation_only_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersOperations: +class RoutesClientQueryParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_parameters` attribute. + :attr:`routes_client_query_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -91,10 +93,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.query_expansion = QueryParametersQueryExpansionOperations( + self.routes_client_query_parameters_query_expansion = RoutesClientQueryParametersQueryExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.query_continuation = QueryParametersQueryContinuationOperations( + self.routes_client_query_parameters_query_continuation = RoutesClientQueryParametersQueryContinuationOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -121,7 +123,7 @@ def template_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disabl cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_template_only_request( + _request = build_routes_client_query_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -168,7 +170,7 @@ def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_explicit_request( + _request = build_routes_client_query_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -215,7 +217,7 @@ def annotation_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disa cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_annotation_only_request( + _request = build_routes_client_query_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py index 7f8c24efcc..e8b2f3ac2b 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import QueryParametersQueryContinuationExplodeOperations -from ...standard.aio.operations._operations import QueryParametersQueryContinuationStandardOperations +from ...explode.aio.operations._operations import RoutesClientQueryParametersQueryContinuationExplodeOperations +from ...standard.aio.operations._operations import RoutesClientQueryParametersQueryContinuationStandardOperations -class QueryParametersQueryContinuationOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_continuation` attribute. + :attr:`routes_client_query_parameters_query_continuation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryContinuationStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_standard = ( + RoutesClientQueryParametersQueryContinuationStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryContinuationExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_explode = ( + RoutesClientQueryParametersQueryContinuationExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py index cce66a98df..0b37c97e1d 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_continuation_explode_array_request, - build_query_parameters_query_continuation_explode_primitive_request, - build_query_parameters_query_continuation_explode_record_request, + build_routes_client_query_parameters_query_continuation_explode_array_request, + build_routes_client_query_parameters_query_continuation_explode_primitive_request, + build_routes_client_query_parameters_query_continuation_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_continuation_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_array_request( + _request = build_routes_client_query_parameters_query_continuation_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_record_request( + _request = build_routes_client_query_parameters_query_continuation_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py index 40dc79b18a..7bf9645ce8 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_continuation_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -46,7 +46,7 @@ def build_query_parameters_query_continuation_explode_primitive_request( # pyli return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -60,7 +60,7 @@ def build_query_parameters_query_continuation_explode_array_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -74,14 +74,14 @@ def build_query_parameters_query_continuation_explode_record_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_continuation_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -114,7 +114,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -161,7 +161,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_array_request( + _request = build_routes_client_query_parameters_query_continuation_explode_array_request( param=param, headers=_headers, params=_params, @@ -208,7 +208,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_record_request( + _request = build_routes_client_query_parameters_query_continuation_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py index 54825f89fb..35426c3116 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import QueryParametersQueryContinuationExplodeOperations -from ..standard.operations._operations import QueryParametersQueryContinuationStandardOperations +from ..explode.operations._operations import RoutesClientQueryParametersQueryContinuationExplodeOperations +from ..standard.operations._operations import RoutesClientQueryParametersQueryContinuationStandardOperations -class QueryParametersQueryContinuationOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_continuation` attribute. + :attr:`routes_client_query_parameters_query_continuation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryContinuationStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_standard = ( + RoutesClientQueryParametersQueryContinuationStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryContinuationExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_explode = ( + RoutesClientQueryParametersQueryContinuationExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py index 75da18e02e..18932cf65d 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_continuation_standard_array_request, - build_query_parameters_query_continuation_standard_primitive_request, - build_query_parameters_query_continuation_standard_record_request, + build_routes_client_query_parameters_query_continuation_standard_array_request, + build_routes_client_query_parameters_query_continuation_standard_primitive_request, + build_routes_client_query_parameters_query_continuation_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_continuation_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_array_request( + _request = build_routes_client_query_parameters_query_continuation_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_record_request( + _request = build_routes_client_query_parameters_query_continuation_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py index 9ab8c27920..b2734f4d1a 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_continuation_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -46,7 +46,7 @@ def build_query_parameters_query_continuation_standard_primitive_request( # pyl return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -60,7 +60,7 @@ def build_query_parameters_query_continuation_standard_array_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -74,14 +74,14 @@ def build_query_parameters_query_continuation_standard_record_request( # pylint return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_continuation_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -114,7 +114,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -161,7 +161,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_array_request( + _request = build_routes_client_query_parameters_query_continuation_standard_array_request( param=param, headers=_headers, params=_params, @@ -208,7 +208,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_record_request( + _request = build_routes_client_query_parameters_query_continuation_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py index db7fc2c3f9..33386354d2 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py @@ -9,18 +9,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import QueryParametersQueryExpansionExplodeOperations -from ...standard.aio.operations._operations import QueryParametersQueryExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientQueryParametersQueryExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientQueryParametersQueryExpansionStandardOperations -class QueryParametersQueryExpansionOperations: +class RoutesClientQueryParametersQueryExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_expansion` attribute. + :attr:`routes_client_query_parameters_query_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_standard = ( + RoutesClientQueryParametersQueryExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_explode = ( + RoutesClientQueryParametersQueryExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py index 72e57055f5..696597ea74 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_expansion_explode_array_request, - build_query_parameters_query_expansion_explode_primitive_request, - build_query_parameters_query_expansion_explode_record_request, + build_routes_client_query_parameters_query_expansion_explode_array_request, + build_routes_client_query_parameters_query_expansion_explode_primitive_request, + build_routes_client_query_parameters_query_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_array_request( + _request = build_routes_client_query_parameters_query_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_record_request( + _request = build_routes_client_query_parameters_query_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py index 4d2eab7ae3..29d441359f 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -46,7 +46,7 @@ def build_query_parameters_query_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -60,7 +60,7 @@ def build_query_parameters_query_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -74,14 +74,14 @@ def build_query_parameters_query_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -114,7 +114,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -161,7 +161,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_array_request( + _request = build_routes_client_query_parameters_query_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -208,7 +208,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_record_request( + _request = build_routes_client_query_parameters_query_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py index 72047e87d6..c26eb50e11 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py @@ -9,18 +9,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import QueryParametersQueryExpansionExplodeOperations -from ..standard.operations._operations import QueryParametersQueryExpansionStandardOperations +from ..explode.operations._operations import RoutesClientQueryParametersQueryExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientQueryParametersQueryExpansionStandardOperations -class QueryParametersQueryExpansionOperations: +class RoutesClientQueryParametersQueryExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_expansion` attribute. + :attr:`routes_client_query_parameters_query_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -30,9 +30,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_standard = ( + RoutesClientQueryParametersQueryExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_explode = ( + RoutesClientQueryParametersQueryExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py index 5f5beb8f1b..74b6b3e2d2 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py @@ -24,23 +24,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_expansion_standard_array_request, - build_query_parameters_query_expansion_standard_primitive_request, - build_query_parameters_query_expansion_standard_record_request, + build_routes_client_query_parameters_query_expansion_standard_array_request, + build_routes_client_query_parameters_query_expansion_standard_primitive_request, + build_routes_client_query_parameters_query_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -120,7 +120,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_array_request( + _request = build_routes_client_query_parameters_query_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -167,7 +167,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_record_request( + _request = build_routes_client_query_parameters_query_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py index 5cad0fee2b..d072cde49b 100644 --- a/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -46,7 +46,7 @@ def build_query_parameters_query_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -60,7 +60,7 @@ def build_query_parameters_query_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -74,14 +74,14 @@ def build_query_parameters_query_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -114,7 +114,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -161,7 +161,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_array_request( + _request = build_routes_client_query_parameters_query_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -208,7 +208,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_record_request( + _request = build_routes_client_query_parameters_query_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/apiview-properties.json b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/apiview-properties.json index 30079d3c14..471fa74313 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/apiview-properties.json @@ -2,9 +2,9 @@ "CrossLanguagePackageId": "Serialization.EncodedName.Json", "CrossLanguageDefinitionId": { "serialization.encodedname.json.models.JsonEncodedNameModel": "Serialization.EncodedName.Json.Property.JsonEncodedNameModel", - "serialization.encodedname.json.operations.PropertyOperations.send": "Serialization.EncodedName.Json.Property.send", - "serialization.encodedname.json.aio.operations.PropertyOperations.send": "Serialization.EncodedName.Json.Property.send", - "serialization.encodedname.json.operations.PropertyOperations.get": "Serialization.EncodedName.Json.Property.get", - "serialization.encodedname.json.aio.operations.PropertyOperations.get": "Serialization.EncodedName.Json.Property.get" + "serialization.encodedname.json.operations.JsonClientPropertyOperations.send": "Serialization.EncodedName.Json.Property.send", + "serialization.encodedname.json.aio.operations.JsonClientPropertyOperations.send": "Serialization.EncodedName.Json.Property.send", + "serialization.encodedname.json.operations.JsonClientPropertyOperations.get": "Serialization.EncodedName.Json.Property.get", + "serialization.encodedname.json.aio.operations.JsonClientPropertyOperations.get": "Serialization.EncodedName.Json.Property.get" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations.py new file mode 100644 index 0000000000..79b382d726 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import JsonClientTestBase, JsonPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestJsonJsonClientPropertyOperations(JsonClientTestBase): + @JsonPreparer() + @recorded_by_proxy + def test_json_client_property_send(self, json_endpoint): + client = self.create_client(endpoint=json_endpoint) + response = client.json_client_property.send( + body={"wireName": bool}, + ) + + # please add some check logic here by yourself + # ... + + @JsonPreparer() + @recorded_by_proxy + def test_json_client_property_get(self, json_endpoint): + client = self.create_client(endpoint=json_endpoint) + response = client.json_client_property.get() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations_async.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations_async.py new file mode 100644 index 0000000000..f86162d5fe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/generated_tests/test_json_json_client_property_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import JsonPreparer +from testpreparer_async import JsonClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestJsonJsonClientPropertyOperationsAsync(JsonClientTestBaseAsync): + @JsonPreparer() + @recorded_by_proxy_async + async def test_json_client_property_send(self, json_endpoint): + client = self.create_async_client(endpoint=json_endpoint) + response = await client.json_client_property.send( + body={"wireName": bool}, + ) + + # please add some check logic here by yourself + # ... + + @JsonPreparer() + @recorded_by_proxy_async + async def test_json_client_property_get(self, json_endpoint): + client = self.create_async_client(endpoint=json_endpoint) + response = await client.json_client_property.get() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py index f64752e55e..5f91c85970 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py @@ -16,14 +16,15 @@ from ._configuration import JsonClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import PropertyOperations +from .operations import JsonClientPropertyOperations class JsonClient: # pylint: disable=client-accepts-api-version-keyword """Encoded names. - :ivar property: PropertyOperations operations - :vartype property: serialization.encodedname.json.operations.PropertyOperations + :ivar json_client_property: JsonClientPropertyOperations operations + :vartype json_client_property: + serialization.encodedname.json.operations.JsonClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.json_client_property = JsonClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py index 2501049d66..b52d017dc0 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py @@ -16,14 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import JsonClientConfiguration -from .operations import PropertyOperations +from .operations import JsonClientPropertyOperations class JsonClient: # pylint: disable=client-accepts-api-version-keyword """Encoded names. - :ivar property: PropertyOperations operations - :vartype property: serialization.encodedname.json.aio.operations.PropertyOperations + :ivar json_client_property: JsonClientPropertyOperations operations + :vartype json_client_property: + serialization.encodedname.json.aio.operations.JsonClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.json_client_property = JsonClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/__init__.py index 22f1107401..5b26d7422a 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import JsonClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "JsonClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py index 938f357294..5c02268881 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/operations/_operations.py @@ -29,7 +29,7 @@ from ... import models as _models from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_property_get_request, build_property_send_request +from ...operations._operations import build_json_client_property_get_request, build_json_client_property_send_request from .._configuration import JsonClientConfiguration JSON = MutableMapping[str, Any] @@ -37,14 +37,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class JsonClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~serialization.encodedname.json.aio.JsonClient`'s - :attr:`property` attribute. + :attr:`json_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -129,7 +129,7 @@ async def send(self, body: Union[_models.JsonEncodedNameModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_send_request( + _request = build_json_client_property_send_request( content_type=content_type, content=_content, headers=_headers, @@ -175,7 +175,7 @@ async def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: cls: ClsType[_models.JsonEncodedNameModel] = kwargs.pop("cls", None) - _request = build_property_get_request( + _request = build_json_client_property_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/__init__.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/__init__.py index 22f1107401..5b26d7422a 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import JsonClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "JsonClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py index 9700da25a0..482a7454b4 100644 --- a/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/serialization-encoded-name-json/serialization/encodedname/json/operations/_operations.py @@ -39,7 +39,7 @@ _SERIALIZER.client_side_validation = False -def build_property_send_request(**kwargs: Any) -> HttpRequest: +def build_json_client_property_send_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -53,7 +53,7 @@ def build_property_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_get_request(**kwargs: Any) -> HttpRequest: +def build_json_client_property_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -67,14 +67,14 @@ def build_property_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class JsonClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~serialization.encodedname.json.JsonClient`'s - :attr:`property` attribute. + :attr:`json_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -161,7 +161,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_send_request( + _request = build_json_client_property_send_request( content_type=content_type, content=_content, headers=_headers, @@ -207,7 +207,7 @@ def get(self, **kwargs: Any) -> _models.JsonEncodedNameModel: cls: ClsType[_models.JsonEncodedNameModel] = kwargs.pop("cls", None) - _request = build_property_get_request( + _request = build_json_client_property_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/apiview-properties.json b/packages/typespec-python/test/azure/generated/service-multi-service/apiview-properties.json index af366570cc..94e065d53a 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/service-multi-service/apiview-properties.json @@ -3,9 +3,9 @@ "CrossLanguageDefinitionId": { "service.multiservice.models.VersionsA": "Service.MultiService.ServiceA.VersionsA", "service.multiservice.models.VersionsB": "Service.MultiService.ServiceB.VersionsB", - "service.multiservice.operations.FooOperations.test": "Service.MultiService.ServiceA.Foo.test", - "service.multiservice.aio.operations.FooOperations.test": "Service.MultiService.ServiceA.Foo.test", - "service.multiservice.operations.BarOperations.test": "Service.MultiService.ServiceB.Bar.test", - "service.multiservice.aio.operations.BarOperations.test": "Service.MultiService.ServiceB.Bar.test" + "service.multiservice.operations.CombinedFooOperations.test": "Service.MultiService.ServiceA.Foo.test", + "service.multiservice.aio.operations.CombinedFooOperations.test": "Service.MultiService.ServiceA.Foo.test", + "service.multiservice.operations.CombinedBarOperations.test": "Service.MultiService.ServiceB.Bar.test", + "service.multiservice.aio.operations.CombinedBarOperations.test": "Service.MultiService.ServiceB.Bar.test" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations.py b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations.py new file mode 100644 index 0000000000..e269ebdce7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import CombinedClientTestBase, CombinedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedBarOperations(CombinedClientTestBase): + @CombinedPreparer() + @recorded_by_proxy + def test_combined_bar_test(self, combined_endpoint): + client = self.create_client(endpoint=combined_endpoint) + response = client.combined_bar.test( + api_version="bv2", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations_async.py b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations_async.py new file mode 100644 index 0000000000..5b671a7039 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_bar_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import CombinedPreparer +from testpreparer_async import CombinedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedBarOperationsAsync(CombinedClientTestBaseAsync): + @CombinedPreparer() + @recorded_by_proxy_async + async def test_combined_bar_test(self, combined_endpoint): + client = self.create_async_client(endpoint=combined_endpoint) + response = await client.combined_bar.test( + api_version="bv2", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations.py b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations.py new file mode 100644 index 0000000000..f383d64b6f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import CombinedClientTestBase, CombinedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedFooOperations(CombinedClientTestBase): + @CombinedPreparer() + @recorded_by_proxy + def test_combined_foo_test(self, combined_endpoint): + client = self.create_client(endpoint=combined_endpoint) + response = client.combined_foo.test( + api_version="av2", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations_async.py b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations_async.py new file mode 100644 index 0000000000..9ed39346bd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/service-multi-service/generated_tests/test_combined_combined_foo_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import CombinedPreparer +from testpreparer_async import CombinedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestCombinedCombinedFooOperationsAsync(CombinedClientTestBaseAsync): + @CombinedPreparer() + @recorded_by_proxy_async + async def test_combined_foo_test(self, combined_endpoint): + client = self.create_async_client(endpoint=combined_endpoint) + response = await client.combined_foo.test( + api_version="av2", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/_client.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/_client.py index 6dd0d05fca..32a6a1eefb 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/_client.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/_client.py @@ -16,16 +16,16 @@ from ._configuration import CombinedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import BarOperations, FooOperations +from .operations import CombinedBarOperations, CombinedFooOperations class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar foo: FooOperations operations - :vartype foo: service.multiservice.operations.FooOperations - :ivar bar: BarOperations operations - :vartype bar: service.multiservice.operations.BarOperations + :ivar combined_foo: CombinedFooOperations operations + :vartype combined_foo: service.multiservice.operations.CombinedFooOperations + :ivar combined_bar: CombinedBarOperations operations + :vartype combined_bar: service.multiservice.operations.CombinedBarOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +58,8 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.foo = FooOperations(self._client, self._config, self._serialize, self._deserialize) - self.bar = BarOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_foo = CombinedFooOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_bar = CombinedBarOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/_client.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/_client.py index 7294b6625b..dc9e333e68 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/_client.py @@ -16,16 +16,16 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import CombinedClientConfiguration -from .operations import BarOperations, FooOperations +from .operations import CombinedBarOperations, CombinedFooOperations class CombinedClient: # pylint: disable=client-accepts-api-version-keyword """CombinedClient. - :ivar foo: FooOperations operations - :vartype foo: service.multiservice.aio.operations.FooOperations - :ivar bar: BarOperations operations - :vartype bar: service.multiservice.aio.operations.BarOperations + :ivar combined_foo: CombinedFooOperations operations + :vartype combined_foo: service.multiservice.aio.operations.CombinedFooOperations + :ivar combined_bar: CombinedBarOperations operations + :vartype combined_bar: service.multiservice.aio.operations.CombinedBarOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +58,8 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.foo = FooOperations(self._client, self._config, self._serialize, self._deserialize) - self.bar = BarOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_foo = CombinedFooOperations(self._client, self._config, self._serialize, self._deserialize) + self.combined_bar = CombinedBarOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/__init__.py index 51a2a7442c..8c1964bdf1 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FooOperations # type: ignore -from ._operations import BarOperations # type: ignore +from ._operations import CombinedFooOperations # type: ignore +from ._operations import CombinedBarOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FooOperations", - "BarOperations", + "CombinedFooOperations", + "CombinedBarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/_operations.py index 6ea02b70af..6af01f33e9 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/aio/operations/_operations.py @@ -23,21 +23,21 @@ from azure.core.utils import case_insensitive_dict from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_bar_test_request, build_foo_test_request +from ...operations._operations import build_combined_bar_test_request, build_combined_foo_test_request from .._configuration import CombinedClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FooOperations: +class CombinedFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~service.multiservice.aio.CombinedClient`'s - :attr:`foo` attribute. + :attr:`combined_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,7 +69,7 @@ async def test(self, **kwargs: Any) -> None: api_version: str = kwargs.pop("api_version", _params.pop("api-version", "av2")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_test_request( + _request = build_combined_foo_test_request( api_version=api_version, headers=_headers, params=_params, @@ -94,14 +94,14 @@ async def test(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BarOperations: +class CombinedBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~service.multiservice.aio.CombinedClient`'s - :attr:`bar` attribute. + :attr:`combined_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +133,7 @@ async def test(self, **kwargs: Any) -> None: api_version: str = kwargs.pop("api_version", _params.pop("api-version", "bv2")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_test_request( + _request = build_combined_bar_test_request( api_version=api_version, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/__init__.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/__init__.py index 51a2a7442c..8c1964bdf1 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FooOperations # type: ignore -from ._operations import BarOperations # type: ignore +from ._operations import CombinedFooOperations # type: ignore +from ._operations import CombinedBarOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FooOperations", - "BarOperations", + "CombinedFooOperations", + "CombinedBarOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/_operations.py b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/_operations.py index bc6bb66a65..eb4349bf07 100644 --- a/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/service-multi-service/service/multiservice/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_foo_test_request(**kwargs: Any) -> HttpRequest: +def build_combined_foo_test_request(**kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "av2")) @@ -45,7 +45,7 @@ def build_foo_test_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_bar_test_request(**kwargs: Any) -> HttpRequest: +def build_combined_bar_test_request(**kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop("api_version", _params.pop("api-version", "bv2")) @@ -58,14 +58,14 @@ def build_bar_test_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class FooOperations: +class CombinedFooOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~service.multiservice.CombinedClient`'s - :attr:`foo` attribute. + :attr:`combined_foo` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -97,7 +97,7 @@ def test(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st api_version: str = kwargs.pop("api_version", _params.pop("api-version", "av2")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_foo_test_request( + _request = build_combined_foo_test_request( api_version=api_version, headers=_headers, params=_params, @@ -122,14 +122,14 @@ def test(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st return cls(pipeline_response, None, {}) # type: ignore -class BarOperations: +class CombinedBarOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~service.multiservice.CombinedClient`'s - :attr:`bar` attribute. + :attr:`combined_bar` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -161,7 +161,7 @@ def test(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st api_version: str = kwargs.pop("api_version", _params.pop("api-version", "bv2")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_bar_test_request( + _request = build_combined_bar_test_request( api_version=api_version, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/special-words/apiview-properties.json b/packages/typespec-python/test/azure/generated/special-words/apiview-properties.json index 6cd45d20f3..42119f2e00 100644 --- a/packages/typespec-python/test/azure/generated/special-words/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/special-words/apiview-properties.json @@ -37,211 +37,211 @@ "specialwords.models.WhileModel": "SpecialWords.Models.while", "specialwords.models.WithModel": "SpecialWords.Models.with", "specialwords.models.YieldModel": "SpecialWords.Models.yield", - "specialwords.operations.ModelsOperations.with_and": "SpecialWords.Models.withAnd", - "specialwords.aio.operations.ModelsOperations.with_and": "SpecialWords.Models.withAnd", - "specialwords.operations.ModelsOperations.with_as": "SpecialWords.Models.withAs", - "specialwords.aio.operations.ModelsOperations.with_as": "SpecialWords.Models.withAs", - "specialwords.operations.ModelsOperations.with_assert": "SpecialWords.Models.withAssert", - "specialwords.aio.operations.ModelsOperations.with_assert": "SpecialWords.Models.withAssert", - "specialwords.operations.ModelsOperations.with_async": "SpecialWords.Models.withAsync", - "specialwords.aio.operations.ModelsOperations.with_async": "SpecialWords.Models.withAsync", - "specialwords.operations.ModelsOperations.with_await": "SpecialWords.Models.withAwait", - "specialwords.aio.operations.ModelsOperations.with_await": "SpecialWords.Models.withAwait", - "specialwords.operations.ModelsOperations.with_break": "SpecialWords.Models.withBreak", - "specialwords.aio.operations.ModelsOperations.with_break": "SpecialWords.Models.withBreak", - "specialwords.operations.ModelsOperations.with_class": "SpecialWords.Models.withClass", - "specialwords.aio.operations.ModelsOperations.with_class": "SpecialWords.Models.withClass", - "specialwords.operations.ModelsOperations.with_constructor": "SpecialWords.Models.withConstructor", - "specialwords.aio.operations.ModelsOperations.with_constructor": "SpecialWords.Models.withConstructor", - "specialwords.operations.ModelsOperations.with_continue": "SpecialWords.Models.withContinue", - "specialwords.aio.operations.ModelsOperations.with_continue": "SpecialWords.Models.withContinue", - "specialwords.operations.ModelsOperations.with_def": "SpecialWords.Models.withDef", - "specialwords.aio.operations.ModelsOperations.with_def": "SpecialWords.Models.withDef", - "specialwords.operations.ModelsOperations.with_del": "SpecialWords.Models.withDel", - "specialwords.aio.operations.ModelsOperations.with_del": "SpecialWords.Models.withDel", - "specialwords.operations.ModelsOperations.with_elif": "SpecialWords.Models.withElif", - "specialwords.aio.operations.ModelsOperations.with_elif": "SpecialWords.Models.withElif", - "specialwords.operations.ModelsOperations.with_else": "SpecialWords.Models.withElse", - "specialwords.aio.operations.ModelsOperations.with_else": "SpecialWords.Models.withElse", - "specialwords.operations.ModelsOperations.with_except": "SpecialWords.Models.withExcept", - "specialwords.aio.operations.ModelsOperations.with_except": "SpecialWords.Models.withExcept", - "specialwords.operations.ModelsOperations.with_exec": "SpecialWords.Models.withExec", - "specialwords.aio.operations.ModelsOperations.with_exec": "SpecialWords.Models.withExec", - "specialwords.operations.ModelsOperations.with_finally": "SpecialWords.Models.withFinally", - "specialwords.aio.operations.ModelsOperations.with_finally": "SpecialWords.Models.withFinally", - "specialwords.operations.ModelsOperations.with_for": "SpecialWords.Models.withFor", - "specialwords.aio.operations.ModelsOperations.with_for": "SpecialWords.Models.withFor", - "specialwords.operations.ModelsOperations.with_from": "SpecialWords.Models.withFrom", - "specialwords.aio.operations.ModelsOperations.with_from": "SpecialWords.Models.withFrom", - "specialwords.operations.ModelsOperations.with_global": "SpecialWords.Models.withGlobal", - "specialwords.aio.operations.ModelsOperations.with_global": "SpecialWords.Models.withGlobal", - "specialwords.operations.ModelsOperations.with_if": "SpecialWords.Models.withIf", - "specialwords.aio.operations.ModelsOperations.with_if": "SpecialWords.Models.withIf", - "specialwords.operations.ModelsOperations.with_import": "SpecialWords.Models.withImport", - "specialwords.aio.operations.ModelsOperations.with_import": "SpecialWords.Models.withImport", - "specialwords.operations.ModelsOperations.with_in": "SpecialWords.Models.withIn", - "specialwords.aio.operations.ModelsOperations.with_in": "SpecialWords.Models.withIn", - "specialwords.operations.ModelsOperations.with_is": "SpecialWords.Models.withIs", - "specialwords.aio.operations.ModelsOperations.with_is": "SpecialWords.Models.withIs", - "specialwords.operations.ModelsOperations.with_lambda": "SpecialWords.Models.withLambda", - "specialwords.aio.operations.ModelsOperations.with_lambda": "SpecialWords.Models.withLambda", - "specialwords.operations.ModelsOperations.with_not": "SpecialWords.Models.withNot", - "specialwords.aio.operations.ModelsOperations.with_not": "SpecialWords.Models.withNot", - "specialwords.operations.ModelsOperations.with_or": "SpecialWords.Models.withOr", - "specialwords.aio.operations.ModelsOperations.with_or": "SpecialWords.Models.withOr", - "specialwords.operations.ModelsOperations.with_pass": "SpecialWords.Models.withPass", - "specialwords.aio.operations.ModelsOperations.with_pass": "SpecialWords.Models.withPass", - "specialwords.operations.ModelsOperations.with_raise": "SpecialWords.Models.withRaise", - "specialwords.aio.operations.ModelsOperations.with_raise": "SpecialWords.Models.withRaise", - "specialwords.operations.ModelsOperations.with_return": "SpecialWords.Models.withReturn", - "specialwords.aio.operations.ModelsOperations.with_return": "SpecialWords.Models.withReturn", - "specialwords.operations.ModelsOperations.with_try": "SpecialWords.Models.withTry", - "specialwords.aio.operations.ModelsOperations.with_try": "SpecialWords.Models.withTry", - "specialwords.operations.ModelsOperations.with_while": "SpecialWords.Models.withWhile", - "specialwords.aio.operations.ModelsOperations.with_while": "SpecialWords.Models.withWhile", - "specialwords.operations.ModelsOperations.with_with": "SpecialWords.Models.withWith", - "specialwords.aio.operations.ModelsOperations.with_with": "SpecialWords.Models.withWith", - "specialwords.operations.ModelsOperations.with_yield": "SpecialWords.Models.withYield", - "specialwords.aio.operations.ModelsOperations.with_yield": "SpecialWords.Models.withYield", - "specialwords.operations.ModelPropertiesOperations.same_as_model": "SpecialWords.ModelProperties.sameAsModel", - "specialwords.aio.operations.ModelPropertiesOperations.same_as_model": "SpecialWords.ModelProperties.sameAsModel", - "specialwords.operations.ModelPropertiesOperations.dict_methods": "SpecialWords.ModelProperties.dictMethods", - "specialwords.aio.operations.ModelPropertiesOperations.dict_methods": "SpecialWords.ModelProperties.dictMethods", - "specialwords.operations.ModelPropertiesOperations.with_list": "SpecialWords.ModelProperties.withList", - "specialwords.aio.operations.ModelPropertiesOperations.with_list": "SpecialWords.ModelProperties.withList", - "specialwords.operations.Operations.and_method": "SpecialWords.Operations.and", - "specialwords.aio.operations.Operations.and_method": "SpecialWords.Operations.and", - "specialwords.operations.Operations.as_method": "SpecialWords.Operations.as", - "specialwords.aio.operations.Operations.as_method": "SpecialWords.Operations.as", - "specialwords.operations.Operations.assert_method": "SpecialWords.Operations.assert", - "specialwords.aio.operations.Operations.assert_method": "SpecialWords.Operations.assert", - "specialwords.operations.Operations.async_method": "SpecialWords.Operations.async", - "specialwords.aio.operations.Operations.async_method": "SpecialWords.Operations.async", - "specialwords.operations.Operations.await_method": "SpecialWords.Operations.await", - "specialwords.aio.operations.Operations.await_method": "SpecialWords.Operations.await", - "specialwords.operations.Operations.break_method": "SpecialWords.Operations.break", - "specialwords.aio.operations.Operations.break_method": "SpecialWords.Operations.break", - "specialwords.operations.Operations.class_method": "SpecialWords.Operations.class", - "specialwords.aio.operations.Operations.class_method": "SpecialWords.Operations.class", - "specialwords.operations.Operations.constructor": "SpecialWords.Operations.constructor", - "specialwords.aio.operations.Operations.constructor": "SpecialWords.Operations.constructor", - "specialwords.operations.Operations.continue_method": "SpecialWords.Operations.continue", - "specialwords.aio.operations.Operations.continue_method": "SpecialWords.Operations.continue", - "specialwords.operations.Operations.def_method": "SpecialWords.Operations.def", - "specialwords.aio.operations.Operations.def_method": "SpecialWords.Operations.def", - "specialwords.operations.Operations.del_method": "SpecialWords.Operations.del", - "specialwords.aio.operations.Operations.del_method": "SpecialWords.Operations.del", - "specialwords.operations.Operations.elif_method": "SpecialWords.Operations.elif", - "specialwords.aio.operations.Operations.elif_method": "SpecialWords.Operations.elif", - "specialwords.operations.Operations.else_method": "SpecialWords.Operations.else", - "specialwords.aio.operations.Operations.else_method": "SpecialWords.Operations.else", - "specialwords.operations.Operations.except_method": "SpecialWords.Operations.except", - "specialwords.aio.operations.Operations.except_method": "SpecialWords.Operations.except", - "specialwords.operations.Operations.exec_method": "SpecialWords.Operations.exec", - "specialwords.aio.operations.Operations.exec_method": "SpecialWords.Operations.exec", - "specialwords.operations.Operations.finally_method": "SpecialWords.Operations.finally", - "specialwords.aio.operations.Operations.finally_method": "SpecialWords.Operations.finally", - "specialwords.operations.Operations.for_method": "SpecialWords.Operations.for", - "specialwords.aio.operations.Operations.for_method": "SpecialWords.Operations.for", - "specialwords.operations.Operations.from_method": "SpecialWords.Operations.from", - "specialwords.aio.operations.Operations.from_method": "SpecialWords.Operations.from", - "specialwords.operations.Operations.global_method": "SpecialWords.Operations.global", - "specialwords.aio.operations.Operations.global_method": "SpecialWords.Operations.global", - "specialwords.operations.Operations.if_method": "SpecialWords.Operations.if", - "specialwords.aio.operations.Operations.if_method": "SpecialWords.Operations.if", - "specialwords.operations.Operations.import_method": "SpecialWords.Operations.import", - "specialwords.aio.operations.Operations.import_method": "SpecialWords.Operations.import", - "specialwords.operations.Operations.in_method": "SpecialWords.Operations.in", - "specialwords.aio.operations.Operations.in_method": "SpecialWords.Operations.in", - "specialwords.operations.Operations.is_method": "SpecialWords.Operations.is", - "specialwords.aio.operations.Operations.is_method": "SpecialWords.Operations.is", - "specialwords.operations.Operations.lambda_method": "SpecialWords.Operations.lambda", - "specialwords.aio.operations.Operations.lambda_method": "SpecialWords.Operations.lambda", - "specialwords.operations.Operations.not_method": "SpecialWords.Operations.not", - "specialwords.aio.operations.Operations.not_method": "SpecialWords.Operations.not", - "specialwords.operations.Operations.or_method": "SpecialWords.Operations.or", - "specialwords.aio.operations.Operations.or_method": "SpecialWords.Operations.or", - "specialwords.operations.Operations.pass_method": "SpecialWords.Operations.pass", - "specialwords.aio.operations.Operations.pass_method": "SpecialWords.Operations.pass", - "specialwords.operations.Operations.raise_method": "SpecialWords.Operations.raise", - "specialwords.aio.operations.Operations.raise_method": "SpecialWords.Operations.raise", - "specialwords.operations.Operations.return_method": "SpecialWords.Operations.return", - "specialwords.aio.operations.Operations.return_method": "SpecialWords.Operations.return", - "specialwords.operations.Operations.try_method": "SpecialWords.Operations.try", - "specialwords.aio.operations.Operations.try_method": "SpecialWords.Operations.try", - "specialwords.operations.Operations.while_method": "SpecialWords.Operations.while", - "specialwords.aio.operations.Operations.while_method": "SpecialWords.Operations.while", - "specialwords.operations.Operations.with_method": "SpecialWords.Operations.with", - "specialwords.aio.operations.Operations.with_method": "SpecialWords.Operations.with", - "specialwords.operations.Operations.yield_method": "SpecialWords.Operations.yield", - "specialwords.aio.operations.Operations.yield_method": "SpecialWords.Operations.yield", - "specialwords.operations.ParametersOperations.with_and": "SpecialWords.Parameters.withAnd", - "specialwords.aio.operations.ParametersOperations.with_and": "SpecialWords.Parameters.withAnd", - "specialwords.operations.ParametersOperations.with_as": "SpecialWords.Parameters.withAs", - "specialwords.aio.operations.ParametersOperations.with_as": "SpecialWords.Parameters.withAs", - "specialwords.operations.ParametersOperations.with_assert": "SpecialWords.Parameters.withAssert", - "specialwords.aio.operations.ParametersOperations.with_assert": "SpecialWords.Parameters.withAssert", - "specialwords.operations.ParametersOperations.with_async": "SpecialWords.Parameters.withAsync", - "specialwords.aio.operations.ParametersOperations.with_async": "SpecialWords.Parameters.withAsync", - "specialwords.operations.ParametersOperations.with_await": "SpecialWords.Parameters.withAwait", - "specialwords.aio.operations.ParametersOperations.with_await": "SpecialWords.Parameters.withAwait", - "specialwords.operations.ParametersOperations.with_break": "SpecialWords.Parameters.withBreak", - "specialwords.aio.operations.ParametersOperations.with_break": "SpecialWords.Parameters.withBreak", - "specialwords.operations.ParametersOperations.with_class": "SpecialWords.Parameters.withClass", - "specialwords.aio.operations.ParametersOperations.with_class": "SpecialWords.Parameters.withClass", - "specialwords.operations.ParametersOperations.with_constructor": "SpecialWords.Parameters.withConstructor", - "specialwords.aio.operations.ParametersOperations.with_constructor": "SpecialWords.Parameters.withConstructor", - "specialwords.operations.ParametersOperations.with_continue": "SpecialWords.Parameters.withContinue", - "specialwords.aio.operations.ParametersOperations.with_continue": "SpecialWords.Parameters.withContinue", - "specialwords.operations.ParametersOperations.with_def": "SpecialWords.Parameters.withDef", - "specialwords.aio.operations.ParametersOperations.with_def": "SpecialWords.Parameters.withDef", - "specialwords.operations.ParametersOperations.with_del": "SpecialWords.Parameters.withDel", - "specialwords.aio.operations.ParametersOperations.with_del": "SpecialWords.Parameters.withDel", - "specialwords.operations.ParametersOperations.with_elif": "SpecialWords.Parameters.withElif", - "specialwords.aio.operations.ParametersOperations.with_elif": "SpecialWords.Parameters.withElif", - "specialwords.operations.ParametersOperations.with_else": "SpecialWords.Parameters.withElse", - "specialwords.aio.operations.ParametersOperations.with_else": "SpecialWords.Parameters.withElse", - "specialwords.operations.ParametersOperations.with_except": "SpecialWords.Parameters.withExcept", - "specialwords.aio.operations.ParametersOperations.with_except": "SpecialWords.Parameters.withExcept", - "specialwords.operations.ParametersOperations.with_exec": "SpecialWords.Parameters.withExec", - "specialwords.aio.operations.ParametersOperations.with_exec": "SpecialWords.Parameters.withExec", - "specialwords.operations.ParametersOperations.with_finally": "SpecialWords.Parameters.withFinally", - "specialwords.aio.operations.ParametersOperations.with_finally": "SpecialWords.Parameters.withFinally", - "specialwords.operations.ParametersOperations.with_for": "SpecialWords.Parameters.withFor", - "specialwords.aio.operations.ParametersOperations.with_for": "SpecialWords.Parameters.withFor", - "specialwords.operations.ParametersOperations.with_from": "SpecialWords.Parameters.withFrom", - "specialwords.aio.operations.ParametersOperations.with_from": "SpecialWords.Parameters.withFrom", - "specialwords.operations.ParametersOperations.with_global": "SpecialWords.Parameters.withGlobal", - "specialwords.aio.operations.ParametersOperations.with_global": "SpecialWords.Parameters.withGlobal", - "specialwords.operations.ParametersOperations.with_if": "SpecialWords.Parameters.withIf", - "specialwords.aio.operations.ParametersOperations.with_if": "SpecialWords.Parameters.withIf", - "specialwords.operations.ParametersOperations.with_import": "SpecialWords.Parameters.withImport", - "specialwords.aio.operations.ParametersOperations.with_import": "SpecialWords.Parameters.withImport", - "specialwords.operations.ParametersOperations.with_in": "SpecialWords.Parameters.withIn", - "specialwords.aio.operations.ParametersOperations.with_in": "SpecialWords.Parameters.withIn", - "specialwords.operations.ParametersOperations.with_is": "SpecialWords.Parameters.withIs", - "specialwords.aio.operations.ParametersOperations.with_is": "SpecialWords.Parameters.withIs", - "specialwords.operations.ParametersOperations.with_lambda": "SpecialWords.Parameters.withLambda", - "specialwords.aio.operations.ParametersOperations.with_lambda": "SpecialWords.Parameters.withLambda", - "specialwords.operations.ParametersOperations.with_not": "SpecialWords.Parameters.withNot", - "specialwords.aio.operations.ParametersOperations.with_not": "SpecialWords.Parameters.withNot", - "specialwords.operations.ParametersOperations.with_or": "SpecialWords.Parameters.withOr", - "specialwords.aio.operations.ParametersOperations.with_or": "SpecialWords.Parameters.withOr", - "specialwords.operations.ParametersOperations.with_pass": "SpecialWords.Parameters.withPass", - "specialwords.aio.operations.ParametersOperations.with_pass": "SpecialWords.Parameters.withPass", - "specialwords.operations.ParametersOperations.with_raise": "SpecialWords.Parameters.withRaise", - "specialwords.aio.operations.ParametersOperations.with_raise": "SpecialWords.Parameters.withRaise", - "specialwords.operations.ParametersOperations.with_return": "SpecialWords.Parameters.withReturn", - "specialwords.aio.operations.ParametersOperations.with_return": "SpecialWords.Parameters.withReturn", - "specialwords.operations.ParametersOperations.with_try": "SpecialWords.Parameters.withTry", - "specialwords.aio.operations.ParametersOperations.with_try": "SpecialWords.Parameters.withTry", - "specialwords.operations.ParametersOperations.with_while": "SpecialWords.Parameters.withWhile", - "specialwords.aio.operations.ParametersOperations.with_while": "SpecialWords.Parameters.withWhile", - "specialwords.operations.ParametersOperations.with_with": "SpecialWords.Parameters.withWith", - "specialwords.aio.operations.ParametersOperations.with_with": "SpecialWords.Parameters.withWith", - "specialwords.operations.ParametersOperations.with_yield": "SpecialWords.Parameters.withYield", - "specialwords.aio.operations.ParametersOperations.with_yield": "SpecialWords.Parameters.withYield", - "specialwords.operations.ParametersOperations.with_cancellation_token": "SpecialWords.Parameters.withCancellationToken", - "specialwords.aio.operations.ParametersOperations.with_cancellation_token": "SpecialWords.Parameters.withCancellationToken" + "specialwords.operations.SpecialWordsClientModelsOperations.with_and": "SpecialWords.Models.withAnd", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_and": "SpecialWords.Models.withAnd", + "specialwords.operations.SpecialWordsClientModelsOperations.with_as": "SpecialWords.Models.withAs", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_as": "SpecialWords.Models.withAs", + "specialwords.operations.SpecialWordsClientModelsOperations.with_assert": "SpecialWords.Models.withAssert", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_assert": "SpecialWords.Models.withAssert", + "specialwords.operations.SpecialWordsClientModelsOperations.with_async": "SpecialWords.Models.withAsync", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_async": "SpecialWords.Models.withAsync", + "specialwords.operations.SpecialWordsClientModelsOperations.with_await": "SpecialWords.Models.withAwait", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_await": "SpecialWords.Models.withAwait", + "specialwords.operations.SpecialWordsClientModelsOperations.with_break": "SpecialWords.Models.withBreak", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_break": "SpecialWords.Models.withBreak", + "specialwords.operations.SpecialWordsClientModelsOperations.with_class": "SpecialWords.Models.withClass", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_class": "SpecialWords.Models.withClass", + "specialwords.operations.SpecialWordsClientModelsOperations.with_constructor": "SpecialWords.Models.withConstructor", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_constructor": "SpecialWords.Models.withConstructor", + "specialwords.operations.SpecialWordsClientModelsOperations.with_continue": "SpecialWords.Models.withContinue", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_continue": "SpecialWords.Models.withContinue", + "specialwords.operations.SpecialWordsClientModelsOperations.with_def": "SpecialWords.Models.withDef", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_def": "SpecialWords.Models.withDef", + "specialwords.operations.SpecialWordsClientModelsOperations.with_del": "SpecialWords.Models.withDel", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_del": "SpecialWords.Models.withDel", + "specialwords.operations.SpecialWordsClientModelsOperations.with_elif": "SpecialWords.Models.withElif", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_elif": "SpecialWords.Models.withElif", + "specialwords.operations.SpecialWordsClientModelsOperations.with_else": "SpecialWords.Models.withElse", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_else": "SpecialWords.Models.withElse", + "specialwords.operations.SpecialWordsClientModelsOperations.with_except": "SpecialWords.Models.withExcept", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_except": "SpecialWords.Models.withExcept", + "specialwords.operations.SpecialWordsClientModelsOperations.with_exec": "SpecialWords.Models.withExec", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_exec": "SpecialWords.Models.withExec", + "specialwords.operations.SpecialWordsClientModelsOperations.with_finally": "SpecialWords.Models.withFinally", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_finally": "SpecialWords.Models.withFinally", + "specialwords.operations.SpecialWordsClientModelsOperations.with_for": "SpecialWords.Models.withFor", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_for": "SpecialWords.Models.withFor", + "specialwords.operations.SpecialWordsClientModelsOperations.with_from": "SpecialWords.Models.withFrom", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_from": "SpecialWords.Models.withFrom", + "specialwords.operations.SpecialWordsClientModelsOperations.with_global": "SpecialWords.Models.withGlobal", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_global": "SpecialWords.Models.withGlobal", + "specialwords.operations.SpecialWordsClientModelsOperations.with_if": "SpecialWords.Models.withIf", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_if": "SpecialWords.Models.withIf", + "specialwords.operations.SpecialWordsClientModelsOperations.with_import": "SpecialWords.Models.withImport", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_import": "SpecialWords.Models.withImport", + "specialwords.operations.SpecialWordsClientModelsOperations.with_in": "SpecialWords.Models.withIn", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_in": "SpecialWords.Models.withIn", + "specialwords.operations.SpecialWordsClientModelsOperations.with_is": "SpecialWords.Models.withIs", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_is": "SpecialWords.Models.withIs", + "specialwords.operations.SpecialWordsClientModelsOperations.with_lambda": "SpecialWords.Models.withLambda", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_lambda": "SpecialWords.Models.withLambda", + "specialwords.operations.SpecialWordsClientModelsOperations.with_not": "SpecialWords.Models.withNot", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_not": "SpecialWords.Models.withNot", + "specialwords.operations.SpecialWordsClientModelsOperations.with_or": "SpecialWords.Models.withOr", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_or": "SpecialWords.Models.withOr", + "specialwords.operations.SpecialWordsClientModelsOperations.with_pass": "SpecialWords.Models.withPass", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_pass": "SpecialWords.Models.withPass", + "specialwords.operations.SpecialWordsClientModelsOperations.with_raise": "SpecialWords.Models.withRaise", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_raise": "SpecialWords.Models.withRaise", + "specialwords.operations.SpecialWordsClientModelsOperations.with_return": "SpecialWords.Models.withReturn", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_return": "SpecialWords.Models.withReturn", + "specialwords.operations.SpecialWordsClientModelsOperations.with_try": "SpecialWords.Models.withTry", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_try": "SpecialWords.Models.withTry", + "specialwords.operations.SpecialWordsClientModelsOperations.with_while": "SpecialWords.Models.withWhile", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_while": "SpecialWords.Models.withWhile", + "specialwords.operations.SpecialWordsClientModelsOperations.with_with": "SpecialWords.Models.withWith", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_with": "SpecialWords.Models.withWith", + "specialwords.operations.SpecialWordsClientModelsOperations.with_yield": "SpecialWords.Models.withYield", + "specialwords.aio.operations.SpecialWordsClientModelsOperations.with_yield": "SpecialWords.Models.withYield", + "specialwords.operations.SpecialWordsClientModelPropertiesOperations.same_as_model": "SpecialWords.ModelProperties.sameAsModel", + "specialwords.aio.operations.SpecialWordsClientModelPropertiesOperations.same_as_model": "SpecialWords.ModelProperties.sameAsModel", + "specialwords.operations.SpecialWordsClientModelPropertiesOperations.dict_methods": "SpecialWords.ModelProperties.dictMethods", + "specialwords.aio.operations.SpecialWordsClientModelPropertiesOperations.dict_methods": "SpecialWords.ModelProperties.dictMethods", + "specialwords.operations.SpecialWordsClientModelPropertiesOperations.with_list": "SpecialWords.ModelProperties.withList", + "specialwords.aio.operations.SpecialWordsClientModelPropertiesOperations.with_list": "SpecialWords.ModelProperties.withList", + "specialwords.operations.SpecialWordsClientOperationsOperations.and_method": "SpecialWords.Operations.and", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.and_method": "SpecialWords.Operations.and", + "specialwords.operations.SpecialWordsClientOperationsOperations.as_method": "SpecialWords.Operations.as", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.as_method": "SpecialWords.Operations.as", + "specialwords.operations.SpecialWordsClientOperationsOperations.assert_method": "SpecialWords.Operations.assert", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.assert_method": "SpecialWords.Operations.assert", + "specialwords.operations.SpecialWordsClientOperationsOperations.async_method": "SpecialWords.Operations.async", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.async_method": "SpecialWords.Operations.async", + "specialwords.operations.SpecialWordsClientOperationsOperations.await_method": "SpecialWords.Operations.await", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.await_method": "SpecialWords.Operations.await", + "specialwords.operations.SpecialWordsClientOperationsOperations.break_method": "SpecialWords.Operations.break", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.break_method": "SpecialWords.Operations.break", + "specialwords.operations.SpecialWordsClientOperationsOperations.class_method": "SpecialWords.Operations.class", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.class_method": "SpecialWords.Operations.class", + "specialwords.operations.SpecialWordsClientOperationsOperations.constructor": "SpecialWords.Operations.constructor", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.constructor": "SpecialWords.Operations.constructor", + "specialwords.operations.SpecialWordsClientOperationsOperations.continue_method": "SpecialWords.Operations.continue", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.continue_method": "SpecialWords.Operations.continue", + "specialwords.operations.SpecialWordsClientOperationsOperations.def_method": "SpecialWords.Operations.def", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.def_method": "SpecialWords.Operations.def", + "specialwords.operations.SpecialWordsClientOperationsOperations.del_method": "SpecialWords.Operations.del", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.del_method": "SpecialWords.Operations.del", + "specialwords.operations.SpecialWordsClientOperationsOperations.elif_method": "SpecialWords.Operations.elif", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.elif_method": "SpecialWords.Operations.elif", + "specialwords.operations.SpecialWordsClientOperationsOperations.else_method": "SpecialWords.Operations.else", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.else_method": "SpecialWords.Operations.else", + "specialwords.operations.SpecialWordsClientOperationsOperations.except_method": "SpecialWords.Operations.except", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.except_method": "SpecialWords.Operations.except", + "specialwords.operations.SpecialWordsClientOperationsOperations.exec_method": "SpecialWords.Operations.exec", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.exec_method": "SpecialWords.Operations.exec", + "specialwords.operations.SpecialWordsClientOperationsOperations.finally_method": "SpecialWords.Operations.finally", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.finally_method": "SpecialWords.Operations.finally", + "specialwords.operations.SpecialWordsClientOperationsOperations.for_method": "SpecialWords.Operations.for", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.for_method": "SpecialWords.Operations.for", + "specialwords.operations.SpecialWordsClientOperationsOperations.from_method": "SpecialWords.Operations.from", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.from_method": "SpecialWords.Operations.from", + "specialwords.operations.SpecialWordsClientOperationsOperations.global_method": "SpecialWords.Operations.global", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.global_method": "SpecialWords.Operations.global", + "specialwords.operations.SpecialWordsClientOperationsOperations.if_method": "SpecialWords.Operations.if", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.if_method": "SpecialWords.Operations.if", + "specialwords.operations.SpecialWordsClientOperationsOperations.import_method": "SpecialWords.Operations.import", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.import_method": "SpecialWords.Operations.import", + "specialwords.operations.SpecialWordsClientOperationsOperations.in_method": "SpecialWords.Operations.in", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.in_method": "SpecialWords.Operations.in", + "specialwords.operations.SpecialWordsClientOperationsOperations.is_method": "SpecialWords.Operations.is", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.is_method": "SpecialWords.Operations.is", + "specialwords.operations.SpecialWordsClientOperationsOperations.lambda_method": "SpecialWords.Operations.lambda", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.lambda_method": "SpecialWords.Operations.lambda", + "specialwords.operations.SpecialWordsClientOperationsOperations.not_method": "SpecialWords.Operations.not", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.not_method": "SpecialWords.Operations.not", + "specialwords.operations.SpecialWordsClientOperationsOperations.or_method": "SpecialWords.Operations.or", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.or_method": "SpecialWords.Operations.or", + "specialwords.operations.SpecialWordsClientOperationsOperations.pass_method": "SpecialWords.Operations.pass", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.pass_method": "SpecialWords.Operations.pass", + "specialwords.operations.SpecialWordsClientOperationsOperations.raise_method": "SpecialWords.Operations.raise", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.raise_method": "SpecialWords.Operations.raise", + "specialwords.operations.SpecialWordsClientOperationsOperations.return_method": "SpecialWords.Operations.return", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.return_method": "SpecialWords.Operations.return", + "specialwords.operations.SpecialWordsClientOperationsOperations.try_method": "SpecialWords.Operations.try", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.try_method": "SpecialWords.Operations.try", + "specialwords.operations.SpecialWordsClientOperationsOperations.while_method": "SpecialWords.Operations.while", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.while_method": "SpecialWords.Operations.while", + "specialwords.operations.SpecialWordsClientOperationsOperations.with_method": "SpecialWords.Operations.with", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.with_method": "SpecialWords.Operations.with", + "specialwords.operations.SpecialWordsClientOperationsOperations.yield_method": "SpecialWords.Operations.yield", + "specialwords.aio.operations.SpecialWordsClientOperationsOperations.yield_method": "SpecialWords.Operations.yield", + "specialwords.operations.SpecialWordsClientParametersOperations.with_and": "SpecialWords.Parameters.withAnd", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_and": "SpecialWords.Parameters.withAnd", + "specialwords.operations.SpecialWordsClientParametersOperations.with_as": "SpecialWords.Parameters.withAs", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_as": "SpecialWords.Parameters.withAs", + "specialwords.operations.SpecialWordsClientParametersOperations.with_assert": "SpecialWords.Parameters.withAssert", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_assert": "SpecialWords.Parameters.withAssert", + "specialwords.operations.SpecialWordsClientParametersOperations.with_async": "SpecialWords.Parameters.withAsync", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_async": "SpecialWords.Parameters.withAsync", + "specialwords.operations.SpecialWordsClientParametersOperations.with_await": "SpecialWords.Parameters.withAwait", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_await": "SpecialWords.Parameters.withAwait", + "specialwords.operations.SpecialWordsClientParametersOperations.with_break": "SpecialWords.Parameters.withBreak", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_break": "SpecialWords.Parameters.withBreak", + "specialwords.operations.SpecialWordsClientParametersOperations.with_class": "SpecialWords.Parameters.withClass", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_class": "SpecialWords.Parameters.withClass", + "specialwords.operations.SpecialWordsClientParametersOperations.with_constructor": "SpecialWords.Parameters.withConstructor", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_constructor": "SpecialWords.Parameters.withConstructor", + "specialwords.operations.SpecialWordsClientParametersOperations.with_continue": "SpecialWords.Parameters.withContinue", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_continue": "SpecialWords.Parameters.withContinue", + "specialwords.operations.SpecialWordsClientParametersOperations.with_def": "SpecialWords.Parameters.withDef", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_def": "SpecialWords.Parameters.withDef", + "specialwords.operations.SpecialWordsClientParametersOperations.with_del": "SpecialWords.Parameters.withDel", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_del": "SpecialWords.Parameters.withDel", + "specialwords.operations.SpecialWordsClientParametersOperations.with_elif": "SpecialWords.Parameters.withElif", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_elif": "SpecialWords.Parameters.withElif", + "specialwords.operations.SpecialWordsClientParametersOperations.with_else": "SpecialWords.Parameters.withElse", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_else": "SpecialWords.Parameters.withElse", + "specialwords.operations.SpecialWordsClientParametersOperations.with_except": "SpecialWords.Parameters.withExcept", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_except": "SpecialWords.Parameters.withExcept", + "specialwords.operations.SpecialWordsClientParametersOperations.with_exec": "SpecialWords.Parameters.withExec", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_exec": "SpecialWords.Parameters.withExec", + "specialwords.operations.SpecialWordsClientParametersOperations.with_finally": "SpecialWords.Parameters.withFinally", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_finally": "SpecialWords.Parameters.withFinally", + "specialwords.operations.SpecialWordsClientParametersOperations.with_for": "SpecialWords.Parameters.withFor", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_for": "SpecialWords.Parameters.withFor", + "specialwords.operations.SpecialWordsClientParametersOperations.with_from": "SpecialWords.Parameters.withFrom", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_from": "SpecialWords.Parameters.withFrom", + "specialwords.operations.SpecialWordsClientParametersOperations.with_global": "SpecialWords.Parameters.withGlobal", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_global": "SpecialWords.Parameters.withGlobal", + "specialwords.operations.SpecialWordsClientParametersOperations.with_if": "SpecialWords.Parameters.withIf", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_if": "SpecialWords.Parameters.withIf", + "specialwords.operations.SpecialWordsClientParametersOperations.with_import": "SpecialWords.Parameters.withImport", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_import": "SpecialWords.Parameters.withImport", + "specialwords.operations.SpecialWordsClientParametersOperations.with_in": "SpecialWords.Parameters.withIn", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_in": "SpecialWords.Parameters.withIn", + "specialwords.operations.SpecialWordsClientParametersOperations.with_is": "SpecialWords.Parameters.withIs", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_is": "SpecialWords.Parameters.withIs", + "specialwords.operations.SpecialWordsClientParametersOperations.with_lambda": "SpecialWords.Parameters.withLambda", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_lambda": "SpecialWords.Parameters.withLambda", + "specialwords.operations.SpecialWordsClientParametersOperations.with_not": "SpecialWords.Parameters.withNot", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_not": "SpecialWords.Parameters.withNot", + "specialwords.operations.SpecialWordsClientParametersOperations.with_or": "SpecialWords.Parameters.withOr", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_or": "SpecialWords.Parameters.withOr", + "specialwords.operations.SpecialWordsClientParametersOperations.with_pass": "SpecialWords.Parameters.withPass", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_pass": "SpecialWords.Parameters.withPass", + "specialwords.operations.SpecialWordsClientParametersOperations.with_raise": "SpecialWords.Parameters.withRaise", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_raise": "SpecialWords.Parameters.withRaise", + "specialwords.operations.SpecialWordsClientParametersOperations.with_return": "SpecialWords.Parameters.withReturn", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_return": "SpecialWords.Parameters.withReturn", + "specialwords.operations.SpecialWordsClientParametersOperations.with_try": "SpecialWords.Parameters.withTry", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_try": "SpecialWords.Parameters.withTry", + "specialwords.operations.SpecialWordsClientParametersOperations.with_while": "SpecialWords.Parameters.withWhile", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_while": "SpecialWords.Parameters.withWhile", + "specialwords.operations.SpecialWordsClientParametersOperations.with_with": "SpecialWords.Parameters.withWith", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_with": "SpecialWords.Parameters.withWith", + "specialwords.operations.SpecialWordsClientParametersOperations.with_yield": "SpecialWords.Parameters.withYield", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_yield": "SpecialWords.Parameters.withYield", + "specialwords.operations.SpecialWordsClientParametersOperations.with_cancellation_token": "SpecialWords.Parameters.withCancellationToken", + "specialwords.aio.operations.SpecialWordsClientParametersOperations.with_cancellation_token": "SpecialWords.Parameters.withCancellationToken" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations.py new file mode 100644 index 0000000000..a713744e1f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpecialWordsClientTestBase, SpecialWordsPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientModelPropertiesOperations(SpecialWordsClientTestBase): + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_model_properties_same_as_model(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_model_properties.same_as_model( + body={"SameAsModel": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_model_properties_dict_methods(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_model_properties.dict_methods( + body={ + "clear": "str", + "copy": "str", + "get": "str", + "items": "str", + "keys": "str", + "pop": "str", + "popitem": "str", + "setdefault": "str", + "update": "str", + "values": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_model_properties_with_list(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_model_properties.with_list( + body={"list": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations_async.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations_async.py new file mode 100644 index 0000000000..7598ca7c00 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_model_properties_operations_async.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpecialWordsPreparer +from testpreparer_async import SpecialWordsClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientModelPropertiesOperationsAsync(SpecialWordsClientTestBaseAsync): + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_model_properties_same_as_model(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_model_properties.same_as_model( + body={"SameAsModel": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_model_properties_dict_methods(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_model_properties.dict_methods( + body={ + "clear": "str", + "copy": "str", + "get": "str", + "items": "str", + "keys": "str", + "pop": "str", + "popitem": "str", + "setdefault": "str", + "update": "str", + "values": "str", + }, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_model_properties_with_list(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_model_properties.with_list( + body={"list": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations.py new file mode 100644 index 0000000000..7f1beafd50 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations.py @@ -0,0 +1,376 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpecialWordsClientTestBase, SpecialWordsPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientModelsOperations(SpecialWordsClientTestBase): + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_and(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_and( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_as(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_as( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_assert(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_assert( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_async(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_async( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_await(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_await( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_break(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_break( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_class(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_class( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_constructor(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_constructor( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_continue(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_continue( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_def(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_def( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_del(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_del( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_elif(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_elif( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_else(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_else( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_except(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_except( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_exec(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_exec( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_finally(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_finally( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_for(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_for( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_from(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_from( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_global(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_global( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_if(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_if( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_import(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_import( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_in(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_in( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_is(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_is( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_lambda(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_lambda( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_not(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_not( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_or(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_or( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_pass(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_pass( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_raise(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_raise( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_return(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_return( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_try(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_try( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_while(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_while( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_with(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_with( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_models_with_yield(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_models.with_yield( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations_async.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations_async.py new file mode 100644 index 0000000000..65e10a4b5f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_models_operations_async.py @@ -0,0 +1,377 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpecialWordsPreparer +from testpreparer_async import SpecialWordsClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientModelsOperationsAsync(SpecialWordsClientTestBaseAsync): + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_and(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_and( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_as(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_as( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_assert(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_assert( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_async(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_async( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_await(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_await( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_break(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_break( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_class(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_class( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_constructor(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_constructor( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_continue(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_continue( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_def(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_def( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_del(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_del( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_elif(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_elif( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_else(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_else( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_except(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_except( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_exec(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_exec( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_finally(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_finally( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_for(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_for( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_from(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_from( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_global(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_global( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_if(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_if( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_import(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_import( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_in(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_in( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_is(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_is( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_lambda(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_lambda( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_not(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_not( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_or(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_or( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_pass(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_pass( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_raise(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_raise( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_return(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_return( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_try(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_try( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_while(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_while( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_with(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_with( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_models_with_yield(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_models.with_yield( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations.py new file mode 100644 index 0000000000..b0aaccac73 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations.py @@ -0,0 +1,310 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpecialWordsClientTestBase, SpecialWordsPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientOperationsOperations(SpecialWordsClientTestBase): + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_and_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.and_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_as_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.as_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_assert_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.assert_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_async_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.async_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_await_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.await_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_break_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.break_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_class_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.class_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_constructor(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.constructor() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_continue_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.continue_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_def_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.def_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_del_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.del_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_elif_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.elif_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_else_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.else_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_except_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.except_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_exec_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.exec_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_finally_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.finally_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_for_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.for_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_from_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.from_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_global_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.global_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_if_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.if_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_import_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.import_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_in_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.in_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_is_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.is_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_lambda_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.lambda_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_not_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.not_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_or_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.or_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_pass_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.pass_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_raise_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.raise_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_return_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.return_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_try_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.try_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_while_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.while_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_with_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.with_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_operations_yield_method(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_operations.yield_method() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations_async.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations_async.py new file mode 100644 index 0000000000..8f6de58220 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_operations_operations_async.py @@ -0,0 +1,311 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpecialWordsPreparer +from testpreparer_async import SpecialWordsClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientOperationsOperationsAsync(SpecialWordsClientTestBaseAsync): + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_and_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.and_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_as_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.as_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_assert_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.assert_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_async_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.async_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_await_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.await_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_break_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.break_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_class_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.class_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_constructor(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.constructor() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_continue_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.continue_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_def_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.def_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_del_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.del_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_elif_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.elif_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_else_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.else_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_except_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.except_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_exec_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.exec_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_finally_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.finally_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_for_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.for_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_from_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.from_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_global_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.global_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_if_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.if_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_import_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.import_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_in_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.in_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_is_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.is_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_lambda_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.lambda_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_not_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.not_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_or_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.or_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_pass_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.pass_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_raise_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.raise_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_return_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.return_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_try_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.try_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_while_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.while_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_with_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.with_method() + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_operations_yield_method(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_operations.yield_method() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations.py new file mode 100644 index 0000000000..a52a627fdc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations.py @@ -0,0 +1,387 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import SpecialWordsClientTestBase, SpecialWordsPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientParametersOperations(SpecialWordsClientTestBase): + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_and(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_and( + and_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_as(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_as( + as_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_assert(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_assert( + assert_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_async(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_async( + async_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_await(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_await( + await_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_break(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_break( + break_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_class(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_class( + class_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_constructor(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_constructor( + constructor="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_continue(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_continue( + continue_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_def(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_def( + def_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_del(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_del( + del_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_elif(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_elif( + elif_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_else(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_else( + else_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_except(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_except( + except_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_exec(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_exec( + exec_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_finally(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_finally( + finally_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_for(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_for( + for_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_from(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_from( + from_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_global(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_global( + global_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_if(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_if( + if_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_import(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_import( + import_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_in(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_in( + in_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_is(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_is( + is_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_lambda(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_lambda( + lambda_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_not(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_not( + not_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_or(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_or( + or_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_pass(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_pass( + pass_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_raise(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_raise( + raise_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_return(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_return( + return_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_try(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_try( + try_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_while(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_while( + while_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_with(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_with( + with_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_yield(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_yield( + yield_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy + def test_special_words_client_parameters_with_cancellation_token(self, specialwords_endpoint): + client = self.create_client(endpoint=specialwords_endpoint) + response = client.special_words_client_parameters.with_cancellation_token( + cancellation_token="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations_async.py b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations_async.py new file mode 100644 index 0000000000..060cac34ef --- /dev/null +++ b/packages/typespec-python/test/azure/generated/special-words/generated_tests/test_special_words_special_words_client_parameters_operations_async.py @@ -0,0 +1,388 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import SpecialWordsPreparer +from testpreparer_async import SpecialWordsClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestSpecialWordsSpecialWordsClientParametersOperationsAsync(SpecialWordsClientTestBaseAsync): + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_and(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_and( + and_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_as(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_as( + as_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_assert(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_assert( + assert_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_async(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_async( + async_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_await(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_await( + await_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_break(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_break( + break_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_class(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_class( + class_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_constructor(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_constructor( + constructor="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_continue(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_continue( + continue_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_def(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_def( + def_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_del(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_del( + del_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_elif(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_elif( + elif_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_else(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_else( + else_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_except(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_except( + except_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_exec(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_exec( + exec_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_finally(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_finally( + finally_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_for(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_for( + for_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_from(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_from( + from_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_global(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_global( + global_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_if(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_if( + if_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_import(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_import( + import_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_in(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_in( + in_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_is(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_is( + is_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_lambda(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_lambda( + lambda_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_not(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_not( + not_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_or(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_or( + or_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_pass(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_pass( + pass_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_raise(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_raise( + raise_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_return(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_return( + return_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_try(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_try( + try_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_while(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_while( + while_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_with(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_with( + with_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_yield(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_yield( + yield_parameter="str", + ) + + # please add some check logic here by yourself + # ... + + @SpecialWordsPreparer() + @recorded_by_proxy_async + async def test_special_words_client_parameters_with_cancellation_token(self, specialwords_endpoint): + client = self.create_async_client(endpoint=specialwords_endpoint) + response = await client.special_words_client_parameters.with_cancellation_token( + cancellation_token="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py index d6942c05bd..f7d4f9a21b 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/_client.py @@ -16,7 +16,12 @@ from ._configuration import SpecialWordsClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ModelPropertiesOperations, ModelsOperations, Operations, ParametersOperations +from .operations import ( + SpecialWordsClientModelPropertiesOperations, + SpecialWordsClientModelsOperations, + SpecialWordsClientOperationsOperations, + SpecialWordsClientParametersOperations, +) class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword @@ -62,14 +67,19 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword with yield. - :ivar models: ModelsOperations operations - :vartype models: specialwords.operations.ModelsOperations - :ivar model_properties: ModelPropertiesOperations operations - :vartype model_properties: specialwords.operations.ModelPropertiesOperations - :ivar operations: Operations operations - :vartype operations: specialwords.operations.Operations - :ivar parameters: ParametersOperations operations - :vartype parameters: specialwords.operations.ParametersOperations + :ivar special_words_client_models: SpecialWordsClientModelsOperations operations + :vartype special_words_client_models: + specialwords.operations.SpecialWordsClientModelsOperations + :ivar special_words_client_model_properties: SpecialWordsClientModelPropertiesOperations + operations + :vartype special_words_client_model_properties: + specialwords.operations.SpecialWordsClientModelPropertiesOperations + :ivar special_words_client_operations: SpecialWordsClientOperationsOperations operations + :vartype special_words_client_operations: + specialwords.operations.SpecialWordsClientOperationsOperations + :ivar special_words_client_parameters: SpecialWordsClientParametersOperations operations + :vartype special_words_client_parameters: + specialwords.operations.SpecialWordsClientParametersOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -102,12 +112,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_properties = ModelPropertiesOperations( + self.special_words_client_models = SpecialWordsClientModelsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_model_properties = SpecialWordsClientModelPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_operations = SpecialWordsClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_parameters = SpecialWordsClientParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.parameters = ParametersOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py index abb7ee9395..0048bb1d09 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/_client.py @@ -16,7 +16,12 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import SpecialWordsClientConfiguration -from .operations import ModelPropertiesOperations, ModelsOperations, Operations, ParametersOperations +from .operations import ( + SpecialWordsClientModelPropertiesOperations, + SpecialWordsClientModelsOperations, + SpecialWordsClientOperationsOperations, + SpecialWordsClientParametersOperations, +) class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword @@ -62,14 +67,19 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword with yield. - :ivar models: ModelsOperations operations - :vartype models: specialwords.aio.operations.ModelsOperations - :ivar model_properties: ModelPropertiesOperations operations - :vartype model_properties: specialwords.aio.operations.ModelPropertiesOperations - :ivar operations: Operations operations - :vartype operations: specialwords.aio.operations.Operations - :ivar parameters: ParametersOperations operations - :vartype parameters: specialwords.aio.operations.ParametersOperations + :ivar special_words_client_models: SpecialWordsClientModelsOperations operations + :vartype special_words_client_models: + specialwords.aio.operations.SpecialWordsClientModelsOperations + :ivar special_words_client_model_properties: SpecialWordsClientModelPropertiesOperations + operations + :vartype special_words_client_model_properties: + specialwords.aio.operations.SpecialWordsClientModelPropertiesOperations + :ivar special_words_client_operations: SpecialWordsClientOperationsOperations operations + :vartype special_words_client_operations: + specialwords.aio.operations.SpecialWordsClientOperationsOperations + :ivar special_words_client_parameters: SpecialWordsClientParametersOperations operations + :vartype special_words_client_parameters: + specialwords.aio.operations.SpecialWordsClientParametersOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -102,12 +112,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_properties = ModelPropertiesOperations( + self.special_words_client_models = SpecialWordsClientModelsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_model_properties = SpecialWordsClientModelPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_operations = SpecialWordsClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_parameters = SpecialWordsClientParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.parameters = ParametersOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/__init__.py index b4802a9d55..4b45fc8e55 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore -from ._operations import ModelPropertiesOperations # type: ignore -from ._operations import Operations # type: ignore -from ._operations import ParametersOperations # type: ignore +from ._operations import SpecialWordsClientModelsOperations # type: ignore +from ._operations import SpecialWordsClientModelPropertiesOperations # type: ignore +from ._operations import SpecialWordsClientOperationsOperations # type: ignore +from ._operations import SpecialWordsClientParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", - "ModelPropertiesOperations", - "Operations", - "ParametersOperations", + "SpecialWordsClientModelsOperations", + "SpecialWordsClientModelPropertiesOperations", + "SpecialWordsClientOperationsOperations", + "SpecialWordsClientParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py index f5afbb7934..d94e1627b4 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/aio/operations/_operations.py @@ -29,109 +29,109 @@ from ..._utils.model_base import SdkJSONEncoder from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_model_properties_dict_methods_request, - build_model_properties_same_as_model_request, - build_model_properties_with_list_request, - build_models_with_and_request, - build_models_with_as_request, - build_models_with_assert_request, - build_models_with_async_request, - build_models_with_await_request, - build_models_with_break_request, - build_models_with_class_request, - build_models_with_constructor_request, - build_models_with_continue_request, - build_models_with_def_request, - build_models_with_del_request, - build_models_with_elif_request, - build_models_with_else_request, - build_models_with_except_request, - build_models_with_exec_request, - build_models_with_finally_request, - build_models_with_for_request, - build_models_with_from_request, - build_models_with_global_request, - build_models_with_if_request, - build_models_with_import_request, - build_models_with_in_request, - build_models_with_is_request, - build_models_with_lambda_request, - build_models_with_not_request, - build_models_with_or_request, - build_models_with_pass_request, - build_models_with_raise_request, - build_models_with_return_request, - build_models_with_try_request, - build_models_with_while_request, - build_models_with_with_request, - build_models_with_yield_request, - build_operations_and_method_request, - build_operations_as_method_request, - build_operations_assert_method_request, - build_operations_async_method_request, - build_operations_await_method_request, - build_operations_break_method_request, - build_operations_class_method_request, - build_operations_constructor_request, - build_operations_continue_method_request, - build_operations_def_method_request, - build_operations_del_method_request, - build_operations_elif_method_request, - build_operations_else_method_request, - build_operations_except_method_request, - build_operations_exec_method_request, - build_operations_finally_method_request, - build_operations_for_method_request, - build_operations_from_method_request, - build_operations_global_method_request, - build_operations_if_method_request, - build_operations_import_method_request, - build_operations_in_method_request, - build_operations_is_method_request, - build_operations_lambda_method_request, - build_operations_not_method_request, - build_operations_or_method_request, - build_operations_pass_method_request, - build_operations_raise_method_request, - build_operations_return_method_request, - build_operations_try_method_request, - build_operations_while_method_request, - build_operations_with_method_request, - build_operations_yield_method_request, - build_parameters_with_and_request, - build_parameters_with_as_request, - build_parameters_with_assert_request, - build_parameters_with_async_request, - build_parameters_with_await_request, - build_parameters_with_break_request, - build_parameters_with_cancellation_token_request, - build_parameters_with_class_request, - build_parameters_with_constructor_request, - build_parameters_with_continue_request, - build_parameters_with_def_request, - build_parameters_with_del_request, - build_parameters_with_elif_request, - build_parameters_with_else_request, - build_parameters_with_except_request, - build_parameters_with_exec_request, - build_parameters_with_finally_request, - build_parameters_with_for_request, - build_parameters_with_from_request, - build_parameters_with_global_request, - build_parameters_with_if_request, - build_parameters_with_import_request, - build_parameters_with_in_request, - build_parameters_with_is_request, - build_parameters_with_lambda_request, - build_parameters_with_not_request, - build_parameters_with_or_request, - build_parameters_with_pass_request, - build_parameters_with_raise_request, - build_parameters_with_return_request, - build_parameters_with_try_request, - build_parameters_with_while_request, - build_parameters_with_with_request, - build_parameters_with_yield_request, + build_special_words_client_model_properties_dict_methods_request, + build_special_words_client_model_properties_same_as_model_request, + build_special_words_client_model_properties_with_list_request, + build_special_words_client_models_with_and_request, + build_special_words_client_models_with_as_request, + build_special_words_client_models_with_assert_request, + build_special_words_client_models_with_async_request, + build_special_words_client_models_with_await_request, + build_special_words_client_models_with_break_request, + build_special_words_client_models_with_class_request, + build_special_words_client_models_with_constructor_request, + build_special_words_client_models_with_continue_request, + build_special_words_client_models_with_def_request, + build_special_words_client_models_with_del_request, + build_special_words_client_models_with_elif_request, + build_special_words_client_models_with_else_request, + build_special_words_client_models_with_except_request, + build_special_words_client_models_with_exec_request, + build_special_words_client_models_with_finally_request, + build_special_words_client_models_with_for_request, + build_special_words_client_models_with_from_request, + build_special_words_client_models_with_global_request, + build_special_words_client_models_with_if_request, + build_special_words_client_models_with_import_request, + build_special_words_client_models_with_in_request, + build_special_words_client_models_with_is_request, + build_special_words_client_models_with_lambda_request, + build_special_words_client_models_with_not_request, + build_special_words_client_models_with_or_request, + build_special_words_client_models_with_pass_request, + build_special_words_client_models_with_raise_request, + build_special_words_client_models_with_return_request, + build_special_words_client_models_with_try_request, + build_special_words_client_models_with_while_request, + build_special_words_client_models_with_with_request, + build_special_words_client_models_with_yield_request, + build_special_words_client_operations_and_method_request, + build_special_words_client_operations_as_method_request, + build_special_words_client_operations_assert_method_request, + build_special_words_client_operations_async_method_request, + build_special_words_client_operations_await_method_request, + build_special_words_client_operations_break_method_request, + build_special_words_client_operations_class_method_request, + build_special_words_client_operations_constructor_request, + build_special_words_client_operations_continue_method_request, + build_special_words_client_operations_def_method_request, + build_special_words_client_operations_del_method_request, + build_special_words_client_operations_elif_method_request, + build_special_words_client_operations_else_method_request, + build_special_words_client_operations_except_method_request, + build_special_words_client_operations_exec_method_request, + build_special_words_client_operations_finally_method_request, + build_special_words_client_operations_for_method_request, + build_special_words_client_operations_from_method_request, + build_special_words_client_operations_global_method_request, + build_special_words_client_operations_if_method_request, + build_special_words_client_operations_import_method_request, + build_special_words_client_operations_in_method_request, + build_special_words_client_operations_is_method_request, + build_special_words_client_operations_lambda_method_request, + build_special_words_client_operations_not_method_request, + build_special_words_client_operations_or_method_request, + build_special_words_client_operations_pass_method_request, + build_special_words_client_operations_raise_method_request, + build_special_words_client_operations_return_method_request, + build_special_words_client_operations_try_method_request, + build_special_words_client_operations_while_method_request, + build_special_words_client_operations_with_method_request, + build_special_words_client_operations_yield_method_request, + build_special_words_client_parameters_with_and_request, + build_special_words_client_parameters_with_as_request, + build_special_words_client_parameters_with_assert_request, + build_special_words_client_parameters_with_async_request, + build_special_words_client_parameters_with_await_request, + build_special_words_client_parameters_with_break_request, + build_special_words_client_parameters_with_cancellation_token_request, + build_special_words_client_parameters_with_class_request, + build_special_words_client_parameters_with_constructor_request, + build_special_words_client_parameters_with_continue_request, + build_special_words_client_parameters_with_def_request, + build_special_words_client_parameters_with_del_request, + build_special_words_client_parameters_with_elif_request, + build_special_words_client_parameters_with_else_request, + build_special_words_client_parameters_with_except_request, + build_special_words_client_parameters_with_exec_request, + build_special_words_client_parameters_with_finally_request, + build_special_words_client_parameters_with_for_request, + build_special_words_client_parameters_with_from_request, + build_special_words_client_parameters_with_global_request, + build_special_words_client_parameters_with_if_request, + build_special_words_client_parameters_with_import_request, + build_special_words_client_parameters_with_in_request, + build_special_words_client_parameters_with_is_request, + build_special_words_client_parameters_with_lambda_request, + build_special_words_client_parameters_with_not_request, + build_special_words_client_parameters_with_or_request, + build_special_words_client_parameters_with_pass_request, + build_special_words_client_parameters_with_raise_request, + build_special_words_client_parameters_with_return_request, + build_special_words_client_parameters_with_try_request, + build_special_words_client_parameters_with_while_request, + build_special_words_client_parameters_with_with_request, + build_special_words_client_parameters_with_yield_request, ) from .._configuration import SpecialWordsClientConfiguration @@ -140,14 +140,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelsOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientModelsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`models` attribute. + :attr:`special_words_client_models` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -230,7 +230,7 @@ async def with_and(self, body: Union[_models.AndModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_and_request( + _request = build_special_words_client_models_with_and_request( content_type=content_type, content=_content, headers=_headers, @@ -328,7 +328,7 @@ async def with_as(self, body: Union[_models.AsModel, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_as_request( + _request = build_special_words_client_models_with_as_request( content_type=content_type, content=_content, headers=_headers, @@ -428,7 +428,7 @@ async def with_assert(self, body: Union[_models.AssertModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_assert_request( + _request = build_special_words_client_models_with_assert_request( content_type=content_type, content=_content, headers=_headers, @@ -528,7 +528,7 @@ async def with_async(self, body: Union[_models.AsyncModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_async_request( + _request = build_special_words_client_models_with_async_request( content_type=content_type, content=_content, headers=_headers, @@ -628,7 +628,7 @@ async def with_await(self, body: Union[_models.AwaitModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_await_request( + _request = build_special_words_client_models_with_await_request( content_type=content_type, content=_content, headers=_headers, @@ -728,7 +728,7 @@ async def with_break(self, body: Union[_models.BreakModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_break_request( + _request = build_special_words_client_models_with_break_request( content_type=content_type, content=_content, headers=_headers, @@ -828,7 +828,7 @@ async def with_class(self, body: Union[_models.ClassModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_class_request( + _request = build_special_words_client_models_with_class_request( content_type=content_type, content=_content, headers=_headers, @@ -928,7 +928,7 @@ async def with_constructor(self, body: Union[_models.Constructor, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_constructor_request( + _request = build_special_words_client_models_with_constructor_request( content_type=content_type, content=_content, headers=_headers, @@ -1028,7 +1028,7 @@ async def with_continue(self, body: Union[_models.ContinueModel, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_continue_request( + _request = build_special_words_client_models_with_continue_request( content_type=content_type, content=_content, headers=_headers, @@ -1126,7 +1126,7 @@ async def with_def(self, body: Union[_models.DefModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_def_request( + _request = build_special_words_client_models_with_def_request( content_type=content_type, content=_content, headers=_headers, @@ -1224,7 +1224,7 @@ async def with_del(self, body: Union[_models.DelModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_del_request( + _request = build_special_words_client_models_with_del_request( content_type=content_type, content=_content, headers=_headers, @@ -1324,7 +1324,7 @@ async def with_elif(self, body: Union[_models.ElifModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_elif_request( + _request = build_special_words_client_models_with_elif_request( content_type=content_type, content=_content, headers=_headers, @@ -1424,7 +1424,7 @@ async def with_else(self, body: Union[_models.ElseModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_else_request( + _request = build_special_words_client_models_with_else_request( content_type=content_type, content=_content, headers=_headers, @@ -1524,7 +1524,7 @@ async def with_except(self, body: Union[_models.ExceptModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_except_request( + _request = build_special_words_client_models_with_except_request( content_type=content_type, content=_content, headers=_headers, @@ -1624,7 +1624,7 @@ async def with_exec(self, body: Union[_models.ExecModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_exec_request( + _request = build_special_words_client_models_with_exec_request( content_type=content_type, content=_content, headers=_headers, @@ -1724,7 +1724,7 @@ async def with_finally(self, body: Union[_models.FinallyModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_finally_request( + _request = build_special_words_client_models_with_finally_request( content_type=content_type, content=_content, headers=_headers, @@ -1822,7 +1822,7 @@ async def with_for(self, body: Union[_models.ForModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_for_request( + _request = build_special_words_client_models_with_for_request( content_type=content_type, content=_content, headers=_headers, @@ -1922,7 +1922,7 @@ async def with_from(self, body: Union[_models.FromModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_from_request( + _request = build_special_words_client_models_with_from_request( content_type=content_type, content=_content, headers=_headers, @@ -2022,7 +2022,7 @@ async def with_global(self, body: Union[_models.GlobalModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_global_request( + _request = build_special_words_client_models_with_global_request( content_type=content_type, content=_content, headers=_headers, @@ -2120,7 +2120,7 @@ async def with_if(self, body: Union[_models.IfModel, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_if_request( + _request = build_special_words_client_models_with_if_request( content_type=content_type, content=_content, headers=_headers, @@ -2220,7 +2220,7 @@ async def with_import(self, body: Union[_models.ImportModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_import_request( + _request = build_special_words_client_models_with_import_request( content_type=content_type, content=_content, headers=_headers, @@ -2318,7 +2318,7 @@ async def with_in(self, body: Union[_models.InModel, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_in_request( + _request = build_special_words_client_models_with_in_request( content_type=content_type, content=_content, headers=_headers, @@ -2416,7 +2416,7 @@ async def with_is(self, body: Union[_models.IsModel, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_is_request( + _request = build_special_words_client_models_with_is_request( content_type=content_type, content=_content, headers=_headers, @@ -2516,7 +2516,7 @@ async def with_lambda(self, body: Union[_models.LambdaModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_lambda_request( + _request = build_special_words_client_models_with_lambda_request( content_type=content_type, content=_content, headers=_headers, @@ -2614,7 +2614,7 @@ async def with_not(self, body: Union[_models.NotModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_not_request( + _request = build_special_words_client_models_with_not_request( content_type=content_type, content=_content, headers=_headers, @@ -2712,7 +2712,7 @@ async def with_or(self, body: Union[_models.OrModel, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_or_request( + _request = build_special_words_client_models_with_or_request( content_type=content_type, content=_content, headers=_headers, @@ -2812,7 +2812,7 @@ async def with_pass(self, body: Union[_models.PassModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_pass_request( + _request = build_special_words_client_models_with_pass_request( content_type=content_type, content=_content, headers=_headers, @@ -2912,7 +2912,7 @@ async def with_raise(self, body: Union[_models.RaiseModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_raise_request( + _request = build_special_words_client_models_with_raise_request( content_type=content_type, content=_content, headers=_headers, @@ -3012,7 +3012,7 @@ async def with_return(self, body: Union[_models.ReturnModel, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_return_request( + _request = build_special_words_client_models_with_return_request( content_type=content_type, content=_content, headers=_headers, @@ -3110,7 +3110,7 @@ async def with_try(self, body: Union[_models.TryModel, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_try_request( + _request = build_special_words_client_models_with_try_request( content_type=content_type, content=_content, headers=_headers, @@ -3210,7 +3210,7 @@ async def with_while(self, body: Union[_models.WhileModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_while_request( + _request = build_special_words_client_models_with_while_request( content_type=content_type, content=_content, headers=_headers, @@ -3310,7 +3310,7 @@ async def with_with(self, body: Union[_models.WithModel, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_with_request( + _request = build_special_words_client_models_with_with_request( content_type=content_type, content=_content, headers=_headers, @@ -3410,7 +3410,7 @@ async def with_yield(self, body: Union[_models.YieldModel, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_yield_request( + _request = build_special_words_client_models_with_yield_request( content_type=content_type, content=_content, headers=_headers, @@ -3436,14 +3436,14 @@ async def with_yield(self, body: Union[_models.YieldModel, JSON, IO[bytes]], **k return cls(pipeline_response, None, {}) # type: ignore -class ModelPropertiesOperations: +class SpecialWordsClientModelPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`model_properties` attribute. + :attr:`special_words_client_model_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3528,7 +3528,7 @@ async def same_as_model(self, body: Union[_models.SameAsModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_same_as_model_request( + _request = build_special_words_client_model_properties_same_as_model_request( content_type=content_type, content=_content, headers=_headers, @@ -3628,7 +3628,7 @@ async def dict_methods(self, body: Union[_models.DictMethods, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_dict_methods_request( + _request = build_special_words_client_model_properties_dict_methods_request( content_type=content_type, content=_content, headers=_headers, @@ -3728,7 +3728,7 @@ async def with_list(self, body: Union[_models.ModelWithList, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_with_list_request( + _request = build_special_words_client_model_properties_with_list_request( content_type=content_type, content=_content, headers=_headers, @@ -3754,14 +3754,14 @@ async def with_list(self, body: Union[_models.ModelWithList, JSON, IO[bytes]], * return cls(pipeline_response, None, {}) # type: ignore -class Operations: # pylint: disable=too-many-public-methods +class SpecialWordsClientOperationsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`operations` attribute. + :attr:`special_words_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3792,7 +3792,7 @@ async def and_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_and_method_request( + _request = build_special_words_client_operations_and_method_request( headers=_headers, params=_params, ) @@ -3836,7 +3836,7 @@ async def as_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_as_method_request( + _request = build_special_words_client_operations_as_method_request( headers=_headers, params=_params, ) @@ -3880,7 +3880,7 @@ async def assert_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_assert_method_request( + _request = build_special_words_client_operations_assert_method_request( headers=_headers, params=_params, ) @@ -3924,7 +3924,7 @@ async def async_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_async_method_request( + _request = build_special_words_client_operations_async_method_request( headers=_headers, params=_params, ) @@ -3968,7 +3968,7 @@ async def await_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_await_method_request( + _request = build_special_words_client_operations_await_method_request( headers=_headers, params=_params, ) @@ -4012,7 +4012,7 @@ async def break_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_break_method_request( + _request = build_special_words_client_operations_break_method_request( headers=_headers, params=_params, ) @@ -4056,7 +4056,7 @@ async def class_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_class_method_request( + _request = build_special_words_client_operations_class_method_request( headers=_headers, params=_params, ) @@ -4100,7 +4100,7 @@ async def constructor(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_constructor_request( + _request = build_special_words_client_operations_constructor_request( headers=_headers, params=_params, ) @@ -4144,7 +4144,7 @@ async def continue_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_continue_method_request( + _request = build_special_words_client_operations_continue_method_request( headers=_headers, params=_params, ) @@ -4188,7 +4188,7 @@ async def def_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_def_method_request( + _request = build_special_words_client_operations_def_method_request( headers=_headers, params=_params, ) @@ -4232,7 +4232,7 @@ async def del_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_del_method_request( + _request = build_special_words_client_operations_del_method_request( headers=_headers, params=_params, ) @@ -4276,7 +4276,7 @@ async def elif_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_elif_method_request( + _request = build_special_words_client_operations_elif_method_request( headers=_headers, params=_params, ) @@ -4320,7 +4320,7 @@ async def else_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_else_method_request( + _request = build_special_words_client_operations_else_method_request( headers=_headers, params=_params, ) @@ -4364,7 +4364,7 @@ async def except_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_except_method_request( + _request = build_special_words_client_operations_except_method_request( headers=_headers, params=_params, ) @@ -4408,7 +4408,7 @@ async def exec_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_exec_method_request( + _request = build_special_words_client_operations_exec_method_request( headers=_headers, params=_params, ) @@ -4452,7 +4452,7 @@ async def finally_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_finally_method_request( + _request = build_special_words_client_operations_finally_method_request( headers=_headers, params=_params, ) @@ -4496,7 +4496,7 @@ async def for_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_for_method_request( + _request = build_special_words_client_operations_for_method_request( headers=_headers, params=_params, ) @@ -4540,7 +4540,7 @@ async def from_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_from_method_request( + _request = build_special_words_client_operations_from_method_request( headers=_headers, params=_params, ) @@ -4584,7 +4584,7 @@ async def global_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_global_method_request( + _request = build_special_words_client_operations_global_method_request( headers=_headers, params=_params, ) @@ -4628,7 +4628,7 @@ async def if_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_if_method_request( + _request = build_special_words_client_operations_if_method_request( headers=_headers, params=_params, ) @@ -4672,7 +4672,7 @@ async def import_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_import_method_request( + _request = build_special_words_client_operations_import_method_request( headers=_headers, params=_params, ) @@ -4716,7 +4716,7 @@ async def in_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_in_method_request( + _request = build_special_words_client_operations_in_method_request( headers=_headers, params=_params, ) @@ -4760,7 +4760,7 @@ async def is_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_is_method_request( + _request = build_special_words_client_operations_is_method_request( headers=_headers, params=_params, ) @@ -4804,7 +4804,7 @@ async def lambda_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_lambda_method_request( + _request = build_special_words_client_operations_lambda_method_request( headers=_headers, params=_params, ) @@ -4848,7 +4848,7 @@ async def not_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_not_method_request( + _request = build_special_words_client_operations_not_method_request( headers=_headers, params=_params, ) @@ -4892,7 +4892,7 @@ async def or_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_or_method_request( + _request = build_special_words_client_operations_or_method_request( headers=_headers, params=_params, ) @@ -4936,7 +4936,7 @@ async def pass_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_pass_method_request( + _request = build_special_words_client_operations_pass_method_request( headers=_headers, params=_params, ) @@ -4980,7 +4980,7 @@ async def raise_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_raise_method_request( + _request = build_special_words_client_operations_raise_method_request( headers=_headers, params=_params, ) @@ -5024,7 +5024,7 @@ async def return_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_return_method_request( + _request = build_special_words_client_operations_return_method_request( headers=_headers, params=_params, ) @@ -5068,7 +5068,7 @@ async def try_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_try_method_request( + _request = build_special_words_client_operations_try_method_request( headers=_headers, params=_params, ) @@ -5112,7 +5112,7 @@ async def while_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_while_method_request( + _request = build_special_words_client_operations_while_method_request( headers=_headers, params=_params, ) @@ -5156,7 +5156,7 @@ async def with_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_with_method_request( + _request = build_special_words_client_operations_with_method_request( headers=_headers, params=_params, ) @@ -5200,7 +5200,7 @@ async def yield_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_yield_method_request( + _request = build_special_words_client_operations_yield_method_request( headers=_headers, params=_params, ) @@ -5224,14 +5224,14 @@ async def yield_method(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ParametersOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientParametersOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`parameters` attribute. + :attr:`special_words_client_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5264,7 +5264,7 @@ async def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_and_request( + _request = build_special_words_client_parameters_with_and_request( and_parameter=and_parameter, headers=_headers, params=_params, @@ -5311,7 +5311,7 @@ async def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_as_request( + _request = build_special_words_client_parameters_with_as_request( as_parameter=as_parameter, headers=_headers, params=_params, @@ -5358,7 +5358,7 @@ async def with_assert(self, *, assert_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_assert_request( + _request = build_special_words_client_parameters_with_assert_request( assert_parameter=assert_parameter, headers=_headers, params=_params, @@ -5405,7 +5405,7 @@ async def with_async(self, *, async_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_async_request( + _request = build_special_words_client_parameters_with_async_request( async_parameter=async_parameter, headers=_headers, params=_params, @@ -5452,7 +5452,7 @@ async def with_await(self, *, await_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_await_request( + _request = build_special_words_client_parameters_with_await_request( await_parameter=await_parameter, headers=_headers, params=_params, @@ -5499,7 +5499,7 @@ async def with_break(self, *, break_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_break_request( + _request = build_special_words_client_parameters_with_break_request( break_parameter=break_parameter, headers=_headers, params=_params, @@ -5546,7 +5546,7 @@ async def with_class(self, *, class_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_class_request( + _request = build_special_words_client_parameters_with_class_request( class_parameter=class_parameter, headers=_headers, params=_params, @@ -5593,7 +5593,7 @@ async def with_constructor(self, *, constructor: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_constructor_request( + _request = build_special_words_client_parameters_with_constructor_request( constructor=constructor, headers=_headers, params=_params, @@ -5640,7 +5640,7 @@ async def with_continue(self, *, continue_parameter: str, **kwargs: Any) -> None cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_continue_request( + _request = build_special_words_client_parameters_with_continue_request( continue_parameter=continue_parameter, headers=_headers, params=_params, @@ -5687,7 +5687,7 @@ async def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_def_request( + _request = build_special_words_client_parameters_with_def_request( def_parameter=def_parameter, headers=_headers, params=_params, @@ -5734,7 +5734,7 @@ async def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_del_request( + _request = build_special_words_client_parameters_with_del_request( del_parameter=del_parameter, headers=_headers, params=_params, @@ -5781,7 +5781,7 @@ async def with_elif(self, *, elif_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_elif_request( + _request = build_special_words_client_parameters_with_elif_request( elif_parameter=elif_parameter, headers=_headers, params=_params, @@ -5828,7 +5828,7 @@ async def with_else(self, *, else_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_else_request( + _request = build_special_words_client_parameters_with_else_request( else_parameter=else_parameter, headers=_headers, params=_params, @@ -5875,7 +5875,7 @@ async def with_except(self, *, except_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_except_request( + _request = build_special_words_client_parameters_with_except_request( except_parameter=except_parameter, headers=_headers, params=_params, @@ -5922,7 +5922,7 @@ async def with_exec(self, *, exec_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_exec_request( + _request = build_special_words_client_parameters_with_exec_request( exec_parameter=exec_parameter, headers=_headers, params=_params, @@ -5969,7 +5969,7 @@ async def with_finally(self, *, finally_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_finally_request( + _request = build_special_words_client_parameters_with_finally_request( finally_parameter=finally_parameter, headers=_headers, params=_params, @@ -6016,7 +6016,7 @@ async def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_for_request( + _request = build_special_words_client_parameters_with_for_request( for_parameter=for_parameter, headers=_headers, params=_params, @@ -6063,7 +6063,7 @@ async def with_from(self, *, from_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_from_request( + _request = build_special_words_client_parameters_with_from_request( from_parameter=from_parameter, headers=_headers, params=_params, @@ -6110,7 +6110,7 @@ async def with_global(self, *, global_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_global_request( + _request = build_special_words_client_parameters_with_global_request( global_parameter=global_parameter, headers=_headers, params=_params, @@ -6157,7 +6157,7 @@ async def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_if_request( + _request = build_special_words_client_parameters_with_if_request( if_parameter=if_parameter, headers=_headers, params=_params, @@ -6204,7 +6204,7 @@ async def with_import(self, *, import_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_import_request( + _request = build_special_words_client_parameters_with_import_request( import_parameter=import_parameter, headers=_headers, params=_params, @@ -6251,7 +6251,7 @@ async def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_in_request( + _request = build_special_words_client_parameters_with_in_request( in_parameter=in_parameter, headers=_headers, params=_params, @@ -6298,7 +6298,7 @@ async def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_is_request( + _request = build_special_words_client_parameters_with_is_request( is_parameter=is_parameter, headers=_headers, params=_params, @@ -6345,7 +6345,7 @@ async def with_lambda(self, *, lambda_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_lambda_request( + _request = build_special_words_client_parameters_with_lambda_request( lambda_parameter=lambda_parameter, headers=_headers, params=_params, @@ -6392,7 +6392,7 @@ async def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_not_request( + _request = build_special_words_client_parameters_with_not_request( not_parameter=not_parameter, headers=_headers, params=_params, @@ -6439,7 +6439,7 @@ async def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_or_request( + _request = build_special_words_client_parameters_with_or_request( or_parameter=or_parameter, headers=_headers, params=_params, @@ -6486,7 +6486,7 @@ async def with_pass(self, *, pass_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_pass_request( + _request = build_special_words_client_parameters_with_pass_request( pass_parameter=pass_parameter, headers=_headers, params=_params, @@ -6533,7 +6533,7 @@ async def with_raise(self, *, raise_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_raise_request( + _request = build_special_words_client_parameters_with_raise_request( raise_parameter=raise_parameter, headers=_headers, params=_params, @@ -6580,7 +6580,7 @@ async def with_return(self, *, return_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_return_request( + _request = build_special_words_client_parameters_with_return_request( return_parameter=return_parameter, headers=_headers, params=_params, @@ -6627,7 +6627,7 @@ async def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_try_request( + _request = build_special_words_client_parameters_with_try_request( try_parameter=try_parameter, headers=_headers, params=_params, @@ -6674,7 +6674,7 @@ async def with_while(self, *, while_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_while_request( + _request = build_special_words_client_parameters_with_while_request( while_parameter=while_parameter, headers=_headers, params=_params, @@ -6721,7 +6721,7 @@ async def with_with(self, *, with_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_with_request( + _request = build_special_words_client_parameters_with_with_request( with_parameter=with_parameter, headers=_headers, params=_params, @@ -6768,7 +6768,7 @@ async def with_yield(self, *, yield_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_yield_request( + _request = build_special_words_client_parameters_with_yield_request( yield_parameter=yield_parameter, headers=_headers, params=_params, @@ -6815,7 +6815,7 @@ async def with_cancellation_token(self, *, cancellation_token: str, **kwargs: An cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_cancellation_token_request( + _request = build_special_words_client_parameters_with_cancellation_token_request( cancellation_token=cancellation_token, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/__init__.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/__init__.py index b4802a9d55..4b45fc8e55 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/__init__.py @@ -12,20 +12,20 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore -from ._operations import ModelPropertiesOperations # type: ignore -from ._operations import Operations # type: ignore -from ._operations import ParametersOperations # type: ignore +from ._operations import SpecialWordsClientModelsOperations # type: ignore +from ._operations import SpecialWordsClientModelPropertiesOperations # type: ignore +from ._operations import SpecialWordsClientOperationsOperations # type: ignore +from ._operations import SpecialWordsClientParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", - "ModelPropertiesOperations", - "Operations", - "ParametersOperations", + "SpecialWordsClientModelsOperations", + "SpecialWordsClientModelPropertiesOperations", + "SpecialWordsClientOperationsOperations", + "SpecialWordsClientParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py index d002e46f28..4508fd96b1 100644 --- a/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/special-words/specialwords/operations/_operations.py @@ -38,7 +38,7 @@ _SERIALIZER.client_side_validation = False -def build_models_with_and_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_and_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -52,7 +52,7 @@ def build_models_with_and_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_as_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_as_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -66,7 +66,9 @@ def build_models_with_as_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_assert_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_assert_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -80,7 +82,7 @@ def build_models_with_assert_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_async_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_async_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -94,7 +96,7 @@ def build_models_with_async_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_await_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_await_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -108,7 +110,7 @@ def build_models_with_await_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_break_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_break_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -122,7 +124,7 @@ def build_models_with_break_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_class_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_class_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -136,7 +138,9 @@ def build_models_with_class_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_constructor_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_constructor_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -150,7 +154,9 @@ def build_models_with_constructor_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_continue_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_continue_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -164,7 +170,7 @@ def build_models_with_continue_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_def_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_def_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -178,7 +184,7 @@ def build_models_with_def_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_del_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_del_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -192,7 +198,7 @@ def build_models_with_del_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_elif_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_elif_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -206,7 +212,7 @@ def build_models_with_elif_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_else_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_else_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -220,7 +226,9 @@ def build_models_with_else_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_except_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_except_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -234,7 +242,7 @@ def build_models_with_except_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_exec_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_exec_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -248,7 +256,9 @@ def build_models_with_exec_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_finally_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_finally_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -262,7 +272,7 @@ def build_models_with_finally_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_for_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_for_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -276,7 +286,7 @@ def build_models_with_for_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_from_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_from_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -290,7 +300,9 @@ def build_models_with_from_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_global_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_global_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -304,7 +316,7 @@ def build_models_with_global_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_if_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_if_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -318,7 +330,9 @@ def build_models_with_if_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_import_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_import_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -332,7 +346,7 @@ def build_models_with_import_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_in_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -346,7 +360,7 @@ def build_models_with_in_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_is_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_is_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -360,7 +374,9 @@ def build_models_with_is_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_lambda_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_lambda_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -374,7 +390,7 @@ def build_models_with_lambda_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_not_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_not_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -388,7 +404,7 @@ def build_models_with_not_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_or_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_or_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -402,7 +418,7 @@ def build_models_with_or_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_pass_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_pass_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -416,7 +432,7 @@ def build_models_with_pass_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_raise_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_raise_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -430,7 +446,9 @@ def build_models_with_raise_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_return_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_return_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -444,7 +462,7 @@ def build_models_with_return_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_try_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_try_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -458,7 +476,7 @@ def build_models_with_try_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_while_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_while_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -472,7 +490,7 @@ def build_models_with_while_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_with_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_with_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -486,7 +504,7 @@ def build_models_with_with_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_yield_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_yield_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -500,7 +518,9 @@ def build_models_with_yield_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_properties_same_as_model_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_special_words_client_model_properties_same_as_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -514,7 +534,9 @@ def build_model_properties_same_as_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_properties_dict_methods_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_special_words_client_model_properties_dict_methods_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -528,7 +550,9 @@ def build_model_properties_dict_methods_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_properties_with_list_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_model_properties_with_list_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -542,238 +566,306 @@ def build_model_properties_with_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_operations_and_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_and_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/and" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_as_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_as_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/as" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_assert_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_assert_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/assert" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_async_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_async_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/async" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_await_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_await_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/await" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_break_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_break_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/break" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_class_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_class_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/class" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_constructor_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_constructor_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/constructor" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_continue_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_continue_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/continue" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_def_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_def_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/def" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_del_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_del_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/del" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_elif_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_elif_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/elif" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_else_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_else_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/else" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_except_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_except_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/except" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_exec_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_exec_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/exec" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_finally_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_finally_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/finally" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_for_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_for_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/for" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_from_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_from_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/from" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_global_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_global_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/global" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_if_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_if_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/if" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_import_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_import_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/import" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_in_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_in_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/in" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_is_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_is_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/is" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_lambda_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_lambda_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/lambda" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_not_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_not_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/not" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_or_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_or_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/or" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_pass_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_pass_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/pass" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_raise_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_raise_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/raise" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_return_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_return_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/return" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_try_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_try_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/try" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_while_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_while_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/while" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_with_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_with_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/with" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_yield_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_yield_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/yield" return HttpRequest(method="GET", url=_url, **kwargs) -def build_parameters_with_and_request(*, and_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_and_request( # pylint: disable=name-too-long + *, and_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -785,7 +877,9 @@ def build_parameters_with_and_request(*, and_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_as_request(*, as_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_as_request( # pylint: disable=name-too-long + *, as_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -797,7 +891,9 @@ def build_parameters_with_as_request(*, as_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_assert_request(*, assert_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_assert_request( # pylint: disable=name-too-long + *, assert_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -809,7 +905,9 @@ def build_parameters_with_assert_request(*, assert_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_async_request(*, async_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_async_request( # pylint: disable=name-too-long + *, async_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -821,7 +919,9 @@ def build_parameters_with_async_request(*, async_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_await_request(*, await_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_await_request( # pylint: disable=name-too-long + *, await_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -833,7 +933,9 @@ def build_parameters_with_await_request(*, await_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_break_request(*, break_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_break_request( # pylint: disable=name-too-long + *, break_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -845,7 +947,9 @@ def build_parameters_with_break_request(*, break_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_class_request(*, class_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_class_request( # pylint: disable=name-too-long + *, class_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -857,7 +961,7 @@ def build_parameters_with_class_request(*, class_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_constructor_request( # pylint: disable=name-too-long +def build_special_words_client_parameters_with_constructor_request( # pylint: disable=name-too-long *, constructor: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -871,7 +975,9 @@ def build_parameters_with_constructor_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_continue_request(*, continue_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_continue_request( # pylint: disable=name-too-long + *, continue_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -883,7 +989,9 @@ def build_parameters_with_continue_request(*, continue_parameter: str, **kwargs: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_def_request(*, def_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_def_request( # pylint: disable=name-too-long + *, def_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -895,7 +1003,9 @@ def build_parameters_with_def_request(*, def_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_del_request(*, del_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_del_request( # pylint: disable=name-too-long + *, del_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -907,7 +1017,9 @@ def build_parameters_with_del_request(*, del_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_elif_request(*, elif_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_elif_request( # pylint: disable=name-too-long + *, elif_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -919,7 +1031,9 @@ def build_parameters_with_elif_request(*, elif_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_else_request(*, else_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_else_request( # pylint: disable=name-too-long + *, else_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -931,7 +1045,9 @@ def build_parameters_with_else_request(*, else_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_except_request(*, except_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_except_request( # pylint: disable=name-too-long + *, except_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -943,7 +1059,9 @@ def build_parameters_with_except_request(*, except_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_exec_request(*, exec_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_exec_request( # pylint: disable=name-too-long + *, exec_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -955,7 +1073,9 @@ def build_parameters_with_exec_request(*, exec_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_finally_request(*, finally_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_finally_request( # pylint: disable=name-too-long + *, finally_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -967,7 +1087,9 @@ def build_parameters_with_finally_request(*, finally_parameter: str, **kwargs: A return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_for_request(*, for_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_for_request( # pylint: disable=name-too-long + *, for_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -979,7 +1101,9 @@ def build_parameters_with_for_request(*, for_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_from_request(*, from_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_from_request( # pylint: disable=name-too-long + *, from_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -991,7 +1115,9 @@ def build_parameters_with_from_request(*, from_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_global_request(*, global_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_global_request( # pylint: disable=name-too-long + *, global_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1003,7 +1129,9 @@ def build_parameters_with_global_request(*, global_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_if_request(*, if_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_if_request( # pylint: disable=name-too-long + *, if_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1015,7 +1143,9 @@ def build_parameters_with_if_request(*, if_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_import_request(*, import_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_import_request( # pylint: disable=name-too-long + *, import_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1027,7 +1157,9 @@ def build_parameters_with_import_request(*, import_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_in_request(*, in_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_in_request( # pylint: disable=name-too-long + *, in_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1039,7 +1171,9 @@ def build_parameters_with_in_request(*, in_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_is_request(*, is_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_is_request( # pylint: disable=name-too-long + *, is_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1051,7 +1185,9 @@ def build_parameters_with_is_request(*, is_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_lambda_request(*, lambda_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_lambda_request( # pylint: disable=name-too-long + *, lambda_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1063,7 +1199,9 @@ def build_parameters_with_lambda_request(*, lambda_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_not_request(*, not_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_not_request( # pylint: disable=name-too-long + *, not_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1075,7 +1213,9 @@ def build_parameters_with_not_request(*, not_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_or_request(*, or_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_or_request( # pylint: disable=name-too-long + *, or_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1087,7 +1227,9 @@ def build_parameters_with_or_request(*, or_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_pass_request(*, pass_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_pass_request( # pylint: disable=name-too-long + *, pass_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1099,7 +1241,9 @@ def build_parameters_with_pass_request(*, pass_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_raise_request(*, raise_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_raise_request( # pylint: disable=name-too-long + *, raise_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1111,7 +1255,9 @@ def build_parameters_with_raise_request(*, raise_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_return_request(*, return_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_return_request( # pylint: disable=name-too-long + *, return_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1123,7 +1269,9 @@ def build_parameters_with_return_request(*, return_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_try_request(*, try_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_try_request( # pylint: disable=name-too-long + *, try_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1135,7 +1283,9 @@ def build_parameters_with_try_request(*, try_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_while_request(*, while_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_while_request( # pylint: disable=name-too-long + *, while_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1147,7 +1297,9 @@ def build_parameters_with_while_request(*, while_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_with_request(*, with_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_with_request( # pylint: disable=name-too-long + *, with_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1159,7 +1311,9 @@ def build_parameters_with_with_request(*, with_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_yield_request(*, yield_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_yield_request( # pylint: disable=name-too-long + *, yield_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -1171,7 +1325,7 @@ def build_parameters_with_yield_request(*, yield_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_cancellation_token_request( # pylint: disable=name-too-long +def build_special_words_client_parameters_with_cancellation_token_request( # pylint: disable=name-too-long *, cancellation_token: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1185,14 +1339,14 @@ def build_parameters_with_cancellation_token_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class ModelsOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientModelsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`models` attribute. + :attr:`special_words_client_models` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1277,7 +1431,7 @@ def with_and( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_and_request( + _request = build_special_words_client_models_with_and_request( content_type=content_type, content=_content, headers=_headers, @@ -1377,7 +1531,7 @@ def with_as( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_as_request( + _request = build_special_words_client_models_with_as_request( content_type=content_type, content=_content, headers=_headers, @@ -1477,7 +1631,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_assert_request( + _request = build_special_words_client_models_with_assert_request( content_type=content_type, content=_content, headers=_headers, @@ -1577,7 +1731,7 @@ def with_async( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_async_request( + _request = build_special_words_client_models_with_async_request( content_type=content_type, content=_content, headers=_headers, @@ -1677,7 +1831,7 @@ def with_await( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_await_request( + _request = build_special_words_client_models_with_await_request( content_type=content_type, content=_content, headers=_headers, @@ -1777,7 +1931,7 @@ def with_break( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_break_request( + _request = build_special_words_client_models_with_break_request( content_type=content_type, content=_content, headers=_headers, @@ -1877,7 +2031,7 @@ def with_class( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_class_request( + _request = build_special_words_client_models_with_class_request( content_type=content_type, content=_content, headers=_headers, @@ -1979,7 +2133,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_constructor_request( + _request = build_special_words_client_models_with_constructor_request( content_type=content_type, content=_content, headers=_headers, @@ -2081,7 +2235,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_continue_request( + _request = build_special_words_client_models_with_continue_request( content_type=content_type, content=_content, headers=_headers, @@ -2181,7 +2335,7 @@ def with_def( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_def_request( + _request = build_special_words_client_models_with_def_request( content_type=content_type, content=_content, headers=_headers, @@ -2281,7 +2435,7 @@ def with_del( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_del_request( + _request = build_special_words_client_models_with_del_request( content_type=content_type, content=_content, headers=_headers, @@ -2381,7 +2535,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_elif_request( + _request = build_special_words_client_models_with_elif_request( content_type=content_type, content=_content, headers=_headers, @@ -2481,7 +2635,7 @@ def with_else( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_else_request( + _request = build_special_words_client_models_with_else_request( content_type=content_type, content=_content, headers=_headers, @@ -2581,7 +2735,7 @@ def with_except( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_except_request( + _request = build_special_words_client_models_with_except_request( content_type=content_type, content=_content, headers=_headers, @@ -2681,7 +2835,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_exec_request( + _request = build_special_words_client_models_with_exec_request( content_type=content_type, content=_content, headers=_headers, @@ -2783,7 +2937,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_finally_request( + _request = build_special_words_client_models_with_finally_request( content_type=content_type, content=_content, headers=_headers, @@ -2883,7 +3037,7 @@ def with_for( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_for_request( + _request = build_special_words_client_models_with_for_request( content_type=content_type, content=_content, headers=_headers, @@ -2983,7 +3137,7 @@ def with_from( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_from_request( + _request = build_special_words_client_models_with_from_request( content_type=content_type, content=_content, headers=_headers, @@ -3083,7 +3237,7 @@ def with_global( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_global_request( + _request = build_special_words_client_models_with_global_request( content_type=content_type, content=_content, headers=_headers, @@ -3183,7 +3337,7 @@ def with_if( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_if_request( + _request = build_special_words_client_models_with_if_request( content_type=content_type, content=_content, headers=_headers, @@ -3283,7 +3437,7 @@ def with_import( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_import_request( + _request = build_special_words_client_models_with_import_request( content_type=content_type, content=_content, headers=_headers, @@ -3383,7 +3537,7 @@ def with_in( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_in_request( + _request = build_special_words_client_models_with_in_request( content_type=content_type, content=_content, headers=_headers, @@ -3483,7 +3637,7 @@ def with_is( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_is_request( + _request = build_special_words_client_models_with_is_request( content_type=content_type, content=_content, headers=_headers, @@ -3583,7 +3737,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_lambda_request( + _request = build_special_words_client_models_with_lambda_request( content_type=content_type, content=_content, headers=_headers, @@ -3683,7 +3837,7 @@ def with_not( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_not_request( + _request = build_special_words_client_models_with_not_request( content_type=content_type, content=_content, headers=_headers, @@ -3783,7 +3937,7 @@ def with_or( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_or_request( + _request = build_special_words_client_models_with_or_request( content_type=content_type, content=_content, headers=_headers, @@ -3883,7 +4037,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_pass_request( + _request = build_special_words_client_models_with_pass_request( content_type=content_type, content=_content, headers=_headers, @@ -3983,7 +4137,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_raise_request( + _request = build_special_words_client_models_with_raise_request( content_type=content_type, content=_content, headers=_headers, @@ -4083,7 +4237,7 @@ def with_return( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_return_request( + _request = build_special_words_client_models_with_return_request( content_type=content_type, content=_content, headers=_headers, @@ -4183,7 +4337,7 @@ def with_try( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_try_request( + _request = build_special_words_client_models_with_try_request( content_type=content_type, content=_content, headers=_headers, @@ -4283,7 +4437,7 @@ def with_while( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_while_request( + _request = build_special_words_client_models_with_while_request( content_type=content_type, content=_content, headers=_headers, @@ -4383,7 +4537,7 @@ def with_with( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_with_request( + _request = build_special_words_client_models_with_with_request( content_type=content_type, content=_content, headers=_headers, @@ -4483,7 +4637,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_yield_request( + _request = build_special_words_client_models_with_yield_request( content_type=content_type, content=_content, headers=_headers, @@ -4509,14 +4663,14 @@ def with_yield( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelPropertiesOperations: +class SpecialWordsClientModelPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`model_properties` attribute. + :attr:`special_words_client_model_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4603,7 +4757,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_same_as_model_request( + _request = build_special_words_client_model_properties_same_as_model_request( content_type=content_type, content=_content, headers=_headers, @@ -4703,7 +4857,7 @@ def dict_methods( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_dict_methods_request( + _request = build_special_words_client_model_properties_dict_methods_request( content_type=content_type, content=_content, headers=_headers, @@ -4803,7 +4957,7 @@ def with_list( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_with_list_request( + _request = build_special_words_client_model_properties_with_list_request( content_type=content_type, content=_content, headers=_headers, @@ -4829,14 +4983,14 @@ def with_list( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Operations: # pylint: disable=too-many-public-methods +class SpecialWordsClientOperationsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`operations` attribute. + :attr:`special_words_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4867,7 +5021,7 @@ def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_and_method_request( + _request = build_special_words_client_operations_and_method_request( headers=_headers, params=_params, ) @@ -4911,7 +5065,7 @@ def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_as_method_request( + _request = build_special_words_client_operations_as_method_request( headers=_headers, params=_params, ) @@ -4955,7 +5109,7 @@ def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_assert_method_request( + _request = build_special_words_client_operations_assert_method_request( headers=_headers, params=_params, ) @@ -4999,7 +5153,7 @@ def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_async_method_request( + _request = build_special_words_client_operations_async_method_request( headers=_headers, params=_params, ) @@ -5043,7 +5197,7 @@ def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_await_method_request( + _request = build_special_words_client_operations_await_method_request( headers=_headers, params=_params, ) @@ -5087,7 +5241,7 @@ def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_break_method_request( + _request = build_special_words_client_operations_break_method_request( headers=_headers, params=_params, ) @@ -5131,7 +5285,7 @@ def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_class_method_request( + _request = build_special_words_client_operations_class_method_request( headers=_headers, params=_params, ) @@ -5175,7 +5329,7 @@ def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_constructor_request( + _request = build_special_words_client_operations_constructor_request( headers=_headers, params=_params, ) @@ -5219,7 +5373,7 @@ def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_continue_method_request( + _request = build_special_words_client_operations_continue_method_request( headers=_headers, params=_params, ) @@ -5263,7 +5417,7 @@ def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_def_method_request( + _request = build_special_words_client_operations_def_method_request( headers=_headers, params=_params, ) @@ -5307,7 +5461,7 @@ def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_del_method_request( + _request = build_special_words_client_operations_del_method_request( headers=_headers, params=_params, ) @@ -5351,7 +5505,7 @@ def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_elif_method_request( + _request = build_special_words_client_operations_elif_method_request( headers=_headers, params=_params, ) @@ -5395,7 +5549,7 @@ def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_else_method_request( + _request = build_special_words_client_operations_else_method_request( headers=_headers, params=_params, ) @@ -5439,7 +5593,7 @@ def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_except_method_request( + _request = build_special_words_client_operations_except_method_request( headers=_headers, params=_params, ) @@ -5483,7 +5637,7 @@ def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_exec_method_request( + _request = build_special_words_client_operations_exec_method_request( headers=_headers, params=_params, ) @@ -5527,7 +5681,7 @@ def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_finally_method_request( + _request = build_special_words_client_operations_finally_method_request( headers=_headers, params=_params, ) @@ -5571,7 +5725,7 @@ def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_for_method_request( + _request = build_special_words_client_operations_for_method_request( headers=_headers, params=_params, ) @@ -5615,7 +5769,7 @@ def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_from_method_request( + _request = build_special_words_client_operations_from_method_request( headers=_headers, params=_params, ) @@ -5659,7 +5813,7 @@ def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_global_method_request( + _request = build_special_words_client_operations_global_method_request( headers=_headers, params=_params, ) @@ -5703,7 +5857,7 @@ def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_if_method_request( + _request = build_special_words_client_operations_if_method_request( headers=_headers, params=_params, ) @@ -5747,7 +5901,7 @@ def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_import_method_request( + _request = build_special_words_client_operations_import_method_request( headers=_headers, params=_params, ) @@ -5791,7 +5945,7 @@ def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_in_method_request( + _request = build_special_words_client_operations_in_method_request( headers=_headers, params=_params, ) @@ -5835,7 +5989,7 @@ def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_is_method_request( + _request = build_special_words_client_operations_is_method_request( headers=_headers, params=_params, ) @@ -5879,7 +6033,7 @@ def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_lambda_method_request( + _request = build_special_words_client_operations_lambda_method_request( headers=_headers, params=_params, ) @@ -5923,7 +6077,7 @@ def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_not_method_request( + _request = build_special_words_client_operations_not_method_request( headers=_headers, params=_params, ) @@ -5967,7 +6121,7 @@ def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_or_method_request( + _request = build_special_words_client_operations_or_method_request( headers=_headers, params=_params, ) @@ -6011,7 +6165,7 @@ def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_pass_method_request( + _request = build_special_words_client_operations_pass_method_request( headers=_headers, params=_params, ) @@ -6055,7 +6209,7 @@ def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_raise_method_request( + _request = build_special_words_client_operations_raise_method_request( headers=_headers, params=_params, ) @@ -6099,7 +6253,7 @@ def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_return_method_request( + _request = build_special_words_client_operations_return_method_request( headers=_headers, params=_params, ) @@ -6143,7 +6297,7 @@ def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_try_method_request( + _request = build_special_words_client_operations_try_method_request( headers=_headers, params=_params, ) @@ -6187,7 +6341,7 @@ def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_while_method_request( + _request = build_special_words_client_operations_while_method_request( headers=_headers, params=_params, ) @@ -6231,7 +6385,7 @@ def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_with_method_request( + _request = build_special_words_client_operations_with_method_request( headers=_headers, params=_params, ) @@ -6275,7 +6429,7 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_yield_method_request( + _request = build_special_words_client_operations_yield_method_request( headers=_headers, params=_params, ) @@ -6299,14 +6453,14 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore -class ParametersOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientParametersOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`parameters` attribute. + :attr:`special_words_client_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6339,7 +6493,7 @@ def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_and_request( + _request = build_special_words_client_parameters_with_and_request( and_parameter=and_parameter, headers=_headers, params=_params, @@ -6386,7 +6540,7 @@ def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_as_request( + _request = build_special_words_client_parameters_with_as_request( as_parameter=as_parameter, headers=_headers, params=_params, @@ -6435,7 +6589,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_assert_request( + _request = build_special_words_client_parameters_with_assert_request( assert_parameter=assert_parameter, headers=_headers, params=_params, @@ -6484,7 +6638,7 @@ def with_async( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_async_request( + _request = build_special_words_client_parameters_with_async_request( async_parameter=async_parameter, headers=_headers, params=_params, @@ -6533,7 +6687,7 @@ def with_await( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_await_request( + _request = build_special_words_client_parameters_with_await_request( await_parameter=await_parameter, headers=_headers, params=_params, @@ -6582,7 +6736,7 @@ def with_break( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_break_request( + _request = build_special_words_client_parameters_with_break_request( break_parameter=break_parameter, headers=_headers, params=_params, @@ -6631,7 +6785,7 @@ def with_class( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_class_request( + _request = build_special_words_client_parameters_with_class_request( class_parameter=class_parameter, headers=_headers, params=_params, @@ -6680,7 +6834,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_constructor_request( + _request = build_special_words_client_parameters_with_constructor_request( constructor=constructor, headers=_headers, params=_params, @@ -6729,7 +6883,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_continue_request( + _request = build_special_words_client_parameters_with_continue_request( continue_parameter=continue_parameter, headers=_headers, params=_params, @@ -6776,7 +6930,7 @@ def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_def_request( + _request = build_special_words_client_parameters_with_def_request( def_parameter=def_parameter, headers=_headers, params=_params, @@ -6823,7 +6977,7 @@ def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_del_request( + _request = build_special_words_client_parameters_with_del_request( del_parameter=del_parameter, headers=_headers, params=_params, @@ -6872,7 +7026,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_elif_request( + _request = build_special_words_client_parameters_with_elif_request( elif_parameter=elif_parameter, headers=_headers, params=_params, @@ -6921,7 +7075,7 @@ def with_else( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_else_request( + _request = build_special_words_client_parameters_with_else_request( else_parameter=else_parameter, headers=_headers, params=_params, @@ -6970,7 +7124,7 @@ def with_except( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_except_request( + _request = build_special_words_client_parameters_with_except_request( except_parameter=except_parameter, headers=_headers, params=_params, @@ -7019,7 +7173,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_exec_request( + _request = build_special_words_client_parameters_with_exec_request( exec_parameter=exec_parameter, headers=_headers, params=_params, @@ -7068,7 +7222,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_finally_request( + _request = build_special_words_client_parameters_with_finally_request( finally_parameter=finally_parameter, headers=_headers, params=_params, @@ -7115,7 +7269,7 @@ def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_for_request( + _request = build_special_words_client_parameters_with_for_request( for_parameter=for_parameter, headers=_headers, params=_params, @@ -7164,7 +7318,7 @@ def with_from( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_from_request( + _request = build_special_words_client_parameters_with_from_request( from_parameter=from_parameter, headers=_headers, params=_params, @@ -7213,7 +7367,7 @@ def with_global( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_global_request( + _request = build_special_words_client_parameters_with_global_request( global_parameter=global_parameter, headers=_headers, params=_params, @@ -7260,7 +7414,7 @@ def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_if_request( + _request = build_special_words_client_parameters_with_if_request( if_parameter=if_parameter, headers=_headers, params=_params, @@ -7309,7 +7463,7 @@ def with_import( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_import_request( + _request = build_special_words_client_parameters_with_import_request( import_parameter=import_parameter, headers=_headers, params=_params, @@ -7356,7 +7510,7 @@ def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_in_request( + _request = build_special_words_client_parameters_with_in_request( in_parameter=in_parameter, headers=_headers, params=_params, @@ -7403,7 +7557,7 @@ def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_is_request( + _request = build_special_words_client_parameters_with_is_request( is_parameter=is_parameter, headers=_headers, params=_params, @@ -7452,7 +7606,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_lambda_request( + _request = build_special_words_client_parameters_with_lambda_request( lambda_parameter=lambda_parameter, headers=_headers, params=_params, @@ -7499,7 +7653,7 @@ def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_not_request( + _request = build_special_words_client_parameters_with_not_request( not_parameter=not_parameter, headers=_headers, params=_params, @@ -7546,7 +7700,7 @@ def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_or_request( + _request = build_special_words_client_parameters_with_or_request( or_parameter=or_parameter, headers=_headers, params=_params, @@ -7595,7 +7749,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_pass_request( + _request = build_special_words_client_parameters_with_pass_request( pass_parameter=pass_parameter, headers=_headers, params=_params, @@ -7644,7 +7798,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_raise_request( + _request = build_special_words_client_parameters_with_raise_request( raise_parameter=raise_parameter, headers=_headers, params=_params, @@ -7693,7 +7847,7 @@ def with_return( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_return_request( + _request = build_special_words_client_parameters_with_return_request( return_parameter=return_parameter, headers=_headers, params=_params, @@ -7740,7 +7894,7 @@ def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_try_request( + _request = build_special_words_client_parameters_with_try_request( try_parameter=try_parameter, headers=_headers, params=_params, @@ -7789,7 +7943,7 @@ def with_while( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_while_request( + _request = build_special_words_client_parameters_with_while_request( while_parameter=while_parameter, headers=_headers, params=_params, @@ -7838,7 +7992,7 @@ def with_with( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_with_request( + _request = build_special_words_client_parameters_with_with_request( with_parameter=with_parameter, headers=_headers, params=_params, @@ -7887,7 +8041,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_yield_request( + _request = build_special_words_client_parameters_with_yield_request( yield_parameter=yield_parameter, headers=_headers, params=_params, @@ -7936,7 +8090,7 @@ def with_cancellation_token( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_cancellation_token_request( + _request = build_special_words_client_parameters_with_cancellation_token_request( cancellation_token=cancellation_token, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/apiview-properties.json b/packages/typespec-python/test/azure/generated/specs-documentation/apiview-properties.json index fa5fe3bbef..7fab1d9f36 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/specs-documentation/apiview-properties.json @@ -3,17 +3,17 @@ "CrossLanguageDefinitionId": { "specs.documentation.models.BulletPointsModel": "Documentation.Lists.BulletPointsModel", "specs.documentation.models.BulletPointsEnum": "Documentation.Lists.BulletPointsEnum", - "specs.documentation.operations.ListsOperations.bullet_points_op": "Documentation.Lists.bulletPointsOp", - "specs.documentation.aio.operations.ListsOperations.bullet_points_op": "Documentation.Lists.bulletPointsOp", - "specs.documentation.operations.ListsOperations.bullet_points_model": "Documentation.Lists.bulletPointsModel", - "specs.documentation.aio.operations.ListsOperations.bullet_points_model": "Documentation.Lists.bulletPointsModel", - "specs.documentation.operations.ListsOperations.numbered": "Documentation.Lists.numbered", - "specs.documentation.aio.operations.ListsOperations.numbered": "Documentation.Lists.numbered", - "specs.documentation.operations.TextFormattingOperations.bold_text": "Documentation.TextFormatting.boldText", - "specs.documentation.aio.operations.TextFormattingOperations.bold_text": "Documentation.TextFormatting.boldText", - "specs.documentation.operations.TextFormattingOperations.italic_text": "Documentation.TextFormatting.italicText", - "specs.documentation.aio.operations.TextFormattingOperations.italic_text": "Documentation.TextFormatting.italicText", - "specs.documentation.operations.TextFormattingOperations.combined_formatting": "Documentation.TextFormatting.combinedFormatting", - "specs.documentation.aio.operations.TextFormattingOperations.combined_formatting": "Documentation.TextFormatting.combinedFormatting" + "specs.documentation.operations.DocumentationClientListsOperations.bullet_points_op": "Documentation.Lists.bulletPointsOp", + "specs.documentation.aio.operations.DocumentationClientListsOperations.bullet_points_op": "Documentation.Lists.bulletPointsOp", + "specs.documentation.operations.DocumentationClientListsOperations.bullet_points_model": "Documentation.Lists.bulletPointsModel", + "specs.documentation.aio.operations.DocumentationClientListsOperations.bullet_points_model": "Documentation.Lists.bulletPointsModel", + "specs.documentation.operations.DocumentationClientListsOperations.numbered": "Documentation.Lists.numbered", + "specs.documentation.aio.operations.DocumentationClientListsOperations.numbered": "Documentation.Lists.numbered", + "specs.documentation.operations.DocumentationClientTextFormattingOperations.bold_text": "Documentation.TextFormatting.boldText", + "specs.documentation.aio.operations.DocumentationClientTextFormattingOperations.bold_text": "Documentation.TextFormatting.boldText", + "specs.documentation.operations.DocumentationClientTextFormattingOperations.italic_text": "Documentation.TextFormatting.italicText", + "specs.documentation.aio.operations.DocumentationClientTextFormattingOperations.italic_text": "Documentation.TextFormatting.italicText", + "specs.documentation.operations.DocumentationClientTextFormattingOperations.combined_formatting": "Documentation.TextFormatting.combinedFormatting", + "specs.documentation.aio.operations.DocumentationClientTextFormattingOperations.combined_formatting": "Documentation.TextFormatting.combinedFormatting" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations.py b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations.py new file mode 100644 index 0000000000..641bf0f731 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DocumentationClientTestBase, DocumentationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDocumentationDocumentationClientListsOperations(DocumentationClientTestBase): + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_lists_bullet_points_op(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_lists.bullet_points_op() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_lists_bullet_points_model(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_lists.bullet_points_model( + body={"input": {"prop": "str"}}, + input={"prop": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_lists_numbered(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_lists.numbered() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations_async.py b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations_async.py new file mode 100644 index 0000000000..3ba9f4cfcb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_lists_operations_async.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DocumentationPreparer +from testpreparer_async import DocumentationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDocumentationDocumentationClientListsOperationsAsync(DocumentationClientTestBaseAsync): + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_lists_bullet_points_op(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_lists.bullet_points_op() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_lists_bullet_points_model(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_lists.bullet_points_model( + body={"input": {"prop": "str"}}, + input={"prop": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_lists_numbered(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_lists.numbered() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations.py b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations.py new file mode 100644 index 0000000000..c02481717e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DocumentationClientTestBase, DocumentationPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDocumentationDocumentationClientTextFormattingOperations(DocumentationClientTestBase): + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_text_formatting_bold_text(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_text_formatting.bold_text() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_text_formatting_italic_text(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_text_formatting.italic_text() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy + def test_documentation_client_text_formatting_combined_formatting(self, documentation_endpoint): + client = self.create_client(endpoint=documentation_endpoint) + response = client.documentation_client_text_formatting.combined_formatting() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations_async.py b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations_async.py new file mode 100644 index 0000000000..9147e1d6dc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/specs-documentation/generated_tests/test_documentation_documentation_client_text_formatting_operations_async.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DocumentationPreparer +from testpreparer_async import DocumentationClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDocumentationDocumentationClientTextFormattingOperationsAsync(DocumentationClientTestBaseAsync): + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_text_formatting_bold_text(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_text_formatting.bold_text() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_text_formatting_italic_text(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_text_formatting.italic_text() + + # please add some check logic here by yourself + # ... + + @DocumentationPreparer() + @recorded_by_proxy_async + async def test_documentation_client_text_formatting_combined_formatting(self, documentation_endpoint): + client = self.create_async_client(endpoint=documentation_endpoint) + response = await client.documentation_client_text_formatting.combined_formatting() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/_client.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/_client.py index b852921b76..84b4977353 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/_client.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/_client.py @@ -16,16 +16,19 @@ from ._configuration import DocumentationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ListsOperations, TextFormattingOperations +from .operations import DocumentationClientListsOperations, DocumentationClientTextFormattingOperations class DocumentationClient: # pylint: disable=client-accepts-api-version-keyword """Illustrates documentation generation and formatting features. - :ivar lists: ListsOperations operations - :vartype lists: specs.documentation.operations.ListsOperations - :ivar text_formatting: TextFormattingOperations operations - :vartype text_formatting: specs.documentation.operations.TextFormattingOperations + :ivar documentation_client_lists: DocumentationClientListsOperations operations + :vartype documentation_client_lists: + specs.documentation.operations.DocumentationClientListsOperations + :ivar documentation_client_text_formatting: DocumentationClientTextFormattingOperations + operations + :vartype documentation_client_text_formatting: + specs.documentation.operations.DocumentationClientTextFormattingOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +61,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.lists = ListsOperations(self._client, self._config, self._serialize, self._deserialize) - self.text_formatting = TextFormattingOperations(self._client, self._config, self._serialize, self._deserialize) + self.documentation_client_lists = DocumentationClientListsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.documentation_client_text_formatting = DocumentationClientTextFormattingOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/_client.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/_client.py index f20313142f..071e94d211 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/_client.py @@ -16,16 +16,19 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DocumentationClientConfiguration -from .operations import ListsOperations, TextFormattingOperations +from .operations import DocumentationClientListsOperations, DocumentationClientTextFormattingOperations class DocumentationClient: # pylint: disable=client-accepts-api-version-keyword """Illustrates documentation generation and formatting features. - :ivar lists: ListsOperations operations - :vartype lists: specs.documentation.aio.operations.ListsOperations - :ivar text_formatting: TextFormattingOperations operations - :vartype text_formatting: specs.documentation.aio.operations.TextFormattingOperations + :ivar documentation_client_lists: DocumentationClientListsOperations operations + :vartype documentation_client_lists: + specs.documentation.aio.operations.DocumentationClientListsOperations + :ivar documentation_client_text_formatting: DocumentationClientTextFormattingOperations + operations + :vartype documentation_client_text_formatting: + specs.documentation.aio.operations.DocumentationClientTextFormattingOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +61,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.lists = ListsOperations(self._client, self._config, self._serialize, self._deserialize) - self.text_formatting = TextFormattingOperations(self._client, self._config, self._serialize, self._deserialize) + self.documentation_client_lists = DocumentationClientListsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.documentation_client_text_formatting = DocumentationClientTextFormattingOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/__init__.py index 3bdbf3fe03..2a291033ab 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ListsOperations # type: ignore -from ._operations import TextFormattingOperations # type: ignore +from ._operations import DocumentationClientListsOperations # type: ignore +from ._operations import DocumentationClientTextFormattingOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ListsOperations", - "TextFormattingOperations", + "DocumentationClientListsOperations", + "DocumentationClientTextFormattingOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/_operations.py index b783a5ade0..923d11d8d5 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/aio/operations/_operations.py @@ -28,12 +28,12 @@ from ..._utils.model_base import SdkJSONEncoder from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_lists_bullet_points_model_request, - build_lists_bullet_points_op_request, - build_lists_numbered_request, - build_text_formatting_bold_text_request, - build_text_formatting_combined_formatting_request, - build_text_formatting_italic_text_request, + build_documentation_client_lists_bullet_points_model_request, + build_documentation_client_lists_bullet_points_op_request, + build_documentation_client_lists_numbered_request, + build_documentation_client_text_formatting_bold_text_request, + build_documentation_client_text_formatting_combined_formatting_request, + build_documentation_client_text_formatting_italic_text_request, ) from .._configuration import DocumentationClientConfiguration @@ -43,14 +43,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ListsOperations: +class DocumentationClientListsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.aio.DocumentationClient`'s - :attr:`lists` attribute. + :attr:`documentation_client_lists` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -97,7 +97,7 @@ async def bullet_points_op(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_bullet_points_op_request( + _request = build_documentation_client_lists_bullet_points_op_request( headers=_headers, params=_params, ) @@ -206,7 +206,7 @@ async def bullet_points_model( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lists_bullet_points_model_request( + _request = build_documentation_client_lists_bullet_points_model_request( content_type=content_type, content=_content, headers=_headers, @@ -257,7 +257,7 @@ async def numbered(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_numbered_request( + _request = build_documentation_client_lists_numbered_request( headers=_headers, params=_params, ) @@ -281,14 +281,14 @@ async def numbered(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class TextFormattingOperations: +class DocumentationClientTextFormattingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.aio.DocumentationClient`'s - :attr:`text_formatting` attribute. + :attr:`documentation_client_text_formatting` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -320,7 +320,7 @@ async def bold_text(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_bold_text_request( + _request = build_documentation_client_text_formatting_bold_text_request( headers=_headers, params=_params, ) @@ -365,7 +365,7 @@ async def italic_text(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_italic_text_request( + _request = build_documentation_client_text_formatting_italic_text_request( headers=_headers, params=_params, ) @@ -411,7 +411,7 @@ async def combined_formatting(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_combined_formatting_request( + _request = build_documentation_client_text_formatting_combined_formatting_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/__init__.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/__init__.py index 3bdbf3fe03..2a291033ab 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ListsOperations # type: ignore -from ._operations import TextFormattingOperations # type: ignore +from ._operations import DocumentationClientListsOperations # type: ignore +from ._operations import DocumentationClientTextFormattingOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ListsOperations", - "TextFormattingOperations", + "DocumentationClientListsOperations", + "DocumentationClientTextFormattingOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/_operations.py b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/_operations.py index 48f21f0638..6baf67b7a6 100644 --- a/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/specs-documentation/specs/documentation/operations/_operations.py @@ -38,14 +38,18 @@ _SERIALIZER.client_side_validation = False -def build_lists_bullet_points_op_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_bullet_points_op_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/lists/bullet-points/op" return HttpRequest(method="GET", url=_url, **kwargs) -def build_lists_bullet_points_model_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_bullet_points_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -59,42 +63,48 @@ def build_lists_bullet_points_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_lists_numbered_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_numbered_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/documentation/lists/numbered" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_bold_text_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_text_formatting_bold_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/bold" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_italic_text_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_documentation_client_text_formatting_italic_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/italic" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_combined_formatting_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_documentation_client_text_formatting_combined_formatting_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/combined" return HttpRequest(method="GET", url=_url, **kwargs) -class ListsOperations: +class DocumentationClientListsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.DocumentationClient`'s - :attr:`lists` attribute. + :attr:`documentation_client_lists` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -141,7 +151,7 @@ def bullet_points_op(self, **kwargs: Any) -> None: # pylint: disable=inconsiste cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_bullet_points_op_request( + _request = build_documentation_client_lists_bullet_points_op_request( headers=_headers, params=_params, ) @@ -248,7 +258,7 @@ def bullet_points_model( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lists_bullet_points_model_request( + _request = build_documentation_client_lists_bullet_points_model_request( content_type=content_type, content=_content, headers=_headers, @@ -299,7 +309,7 @@ def numbered(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_numbered_request( + _request = build_documentation_client_lists_numbered_request( headers=_headers, params=_params, ) @@ -323,14 +333,14 @@ def numbered(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore -class TextFormattingOperations: +class DocumentationClientTextFormattingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.DocumentationClient`'s - :attr:`text_formatting` attribute. + :attr:`documentation_client_text_formatting` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -362,7 +372,7 @@ def bold_text(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_bold_text_request( + _request = build_documentation_client_text_formatting_bold_text_request( headers=_headers, params=_params, ) @@ -407,7 +417,7 @@ def italic_text(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_italic_text_request( + _request = build_documentation_client_text_formatting_italic_text_request( headers=_headers, params=_params, ) @@ -453,7 +463,7 @@ def combined_formatting(self, **kwargs: Any) -> None: # pylint: disable=inconsi cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_combined_formatting_request( + _request = build_documentation_client_text_formatting_combined_formatting_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/apiview-properties.json b/packages/typespec-python/test/azure/generated/streaming-jsonl/apiview-properties.json index 2d9ab18ed5..a4a5933169 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/apiview-properties.json @@ -1,9 +1,9 @@ { "CrossLanguagePackageId": "Streaming.Jsonl", "CrossLanguageDefinitionId": { - "streaming.jsonl.operations.BasicOperations.send": "Streaming.Jsonl.Basic.send", - "streaming.jsonl.aio.operations.BasicOperations.send": "Streaming.Jsonl.Basic.send", - "streaming.jsonl.operations.BasicOperations.receive": "Streaming.Jsonl.Basic.receive", - "streaming.jsonl.aio.operations.BasicOperations.receive": "Streaming.Jsonl.Basic.receive" + "streaming.jsonl.operations.JsonlClientBasicOperations.send": "Streaming.Jsonl.Basic.send", + "streaming.jsonl.aio.operations.JsonlClientBasicOperations.send": "Streaming.Jsonl.Basic.send", + "streaming.jsonl.operations.JsonlClientBasicOperations.receive": "Streaming.Jsonl.Basic.receive", + "streaming.jsonl.aio.operations.JsonlClientBasicOperations.receive": "Streaming.Jsonl.Basic.receive" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations.py new file mode 100644 index 0000000000..c6edd1820d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import JsonlClientTestBase, JsonlPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestJsonlJsonlClientBasicOperations(JsonlClientTestBase): + @JsonlPreparer() + @recorded_by_proxy + def test_jsonl_client_basic_send(self, jsonl_endpoint): + client = self.create_client(endpoint=jsonl_endpoint) + response = client.jsonl_client_basic.send( + body=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @JsonlPreparer() + @recorded_by_proxy + def test_jsonl_client_basic_receive(self, jsonl_endpoint): + client = self.create_client(endpoint=jsonl_endpoint) + response = client.jsonl_client_basic.receive() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations_async.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations_async.py new file mode 100644 index 0000000000..f6a46820f7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/generated_tests/test_jsonl_jsonl_client_basic_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import JsonlPreparer +from testpreparer_async import JsonlClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestJsonlJsonlClientBasicOperationsAsync(JsonlClientTestBaseAsync): + @JsonlPreparer() + @recorded_by_proxy_async + async def test_jsonl_client_basic_send(self, jsonl_endpoint): + client = self.create_async_client(endpoint=jsonl_endpoint) + response = await client.jsonl_client_basic.send( + body=bytes("bytes", encoding="utf-8"), + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @JsonlPreparer() + @recorded_by_proxy_async + async def test_jsonl_client_basic_receive(self, jsonl_endpoint): + client = self.create_async_client(endpoint=jsonl_endpoint) + response = await client.jsonl_client_basic.receive() + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/_client.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/_client.py index ebb26214dd..86e873306c 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/_client.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/_client.py @@ -16,14 +16,14 @@ from ._configuration import JsonlClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .basic.operations import BasicOperations +from .basic.operations import JsonlClientBasicOperations class JsonlClient: # pylint: disable=client-accepts-api-version-keyword """Test of jsonl streaming. - :ivar basic: BasicOperations operations - :vartype basic: streaming.jsonl.operations.BasicOperations + :ivar jsonl_client_basic: JsonlClientBasicOperations operations + :vartype jsonl_client_basic: streaming.jsonl.operations.JsonlClientBasicOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.basic = BasicOperations(self._client, self._config, self._serialize, self._deserialize) + self.jsonl_client_basic = JsonlClientBasicOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/aio/_client.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/aio/_client.py index 481fc5aa1e..2e64c3b825 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/aio/_client.py @@ -15,15 +15,15 @@ from azure.core.rest import AsyncHttpResponse, HttpRequest from .._utils.serialization import Deserializer, Serializer -from ..basic.aio.operations import BasicOperations +from ..basic.aio.operations import JsonlClientBasicOperations from ._configuration import JsonlClientConfiguration class JsonlClient: # pylint: disable=client-accepts-api-version-keyword """Test of jsonl streaming. - :ivar basic: BasicOperations operations - :vartype basic: streaming.jsonl.aio.operations.BasicOperations + :ivar jsonl_client_basic: JsonlClientBasicOperations operations + :vartype jsonl_client_basic: streaming.jsonl.aio.operations.JsonlClientBasicOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.basic = BasicOperations(self._client, self._config, self._serialize, self._deserialize) + self.jsonl_client_basic = JsonlClientBasicOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py index c9a013c3dd..80dfe488b5 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BasicOperations # type: ignore +from ._operations import JsonlClientBasicOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BasicOperations", + "JsonlClientBasicOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py index b0eb350b98..ba47def2e6 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py @@ -26,20 +26,20 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import JsonlClientConfiguration -from ...operations._operations import build_basic_receive_request, build_basic_send_request +from ...operations._operations import build_jsonl_client_basic_receive_request, build_jsonl_client_basic_send_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BasicOperations: +class JsonlClientBasicOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~streaming.jsonl.aio.JsonlClient`'s - :attr:`basic` attribute. + :attr:`jsonl_client_basic` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -75,7 +75,7 @@ async def send(self, body: bytes, **kwargs: Any) -> None: _content = body - _request = build_basic_send_request( + _request = build_jsonl_client_basic_send_request( content_type=content_type, content=_content, headers=_headers, @@ -121,7 +121,7 @@ async def receive(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_basic_receive_request( + _request = build_jsonl_client_basic_receive_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py index c9a013c3dd..80dfe488b5 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BasicOperations # type: ignore +from ._operations import JsonlClientBasicOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BasicOperations", + "JsonlClientBasicOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py index cc2b235148..0312addd69 100644 --- a/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_basic_send_request(**kwargs: Any) -> HttpRequest: +def build_jsonl_client_basic_send_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -47,7 +47,7 @@ def build_basic_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_basic_receive_request(**kwargs: Any) -> HttpRequest: +def build_jsonl_client_basic_receive_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/jsonl") @@ -61,14 +61,14 @@ def build_basic_receive_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class BasicOperations: +class JsonlClientBasicOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~streaming.jsonl.JsonlClient`'s - :attr:`basic` attribute. + :attr:`jsonl_client_basic` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -104,7 +104,7 @@ def send(self, body: bytes, **kwargs: Any) -> None: # pylint: disable=inconsist _content = body - _request = build_basic_send_request( + _request = build_jsonl_client_basic_send_request( content_type=content_type, content=_content, headers=_headers, @@ -150,7 +150,7 @@ def receive(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_basic_receive_request( + _request = build_jsonl_client_basic_receive_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/azure/generated/typetest-array/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-array/apiview-properties.json index 55c1107ba6..c95a3ebb1b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-array/apiview-properties.json @@ -2,61 +2,61 @@ "CrossLanguagePackageId": "Type.Array", "CrossLanguageDefinitionId": { "typetest.array.models.InnerModel": "Type.Array.InnerModel", - "typetest.array.operations.Int32ValueOperations.get": "Type.Array.Int32Value.get", - "typetest.array.aio.operations.Int32ValueOperations.get": "Type.Array.Int32Value.get", - "typetest.array.operations.Int32ValueOperations.put": "Type.Array.Int32Value.put", - "typetest.array.aio.operations.Int32ValueOperations.put": "Type.Array.Int32Value.put", - "typetest.array.operations.Int64ValueOperations.get": "Type.Array.Int64Value.get", - "typetest.array.aio.operations.Int64ValueOperations.get": "Type.Array.Int64Value.get", - "typetest.array.operations.Int64ValueOperations.put": "Type.Array.Int64Value.put", - "typetest.array.aio.operations.Int64ValueOperations.put": "Type.Array.Int64Value.put", - "typetest.array.operations.BooleanValueOperations.get": "Type.Array.BooleanValue.get", - "typetest.array.aio.operations.BooleanValueOperations.get": "Type.Array.BooleanValue.get", - "typetest.array.operations.BooleanValueOperations.put": "Type.Array.BooleanValue.put", - "typetest.array.aio.operations.BooleanValueOperations.put": "Type.Array.BooleanValue.put", - "typetest.array.operations.StringValueOperations.get": "Type.Array.StringValue.get", - "typetest.array.aio.operations.StringValueOperations.get": "Type.Array.StringValue.get", - "typetest.array.operations.StringValueOperations.put": "Type.Array.StringValue.put", - "typetest.array.aio.operations.StringValueOperations.put": "Type.Array.StringValue.put", - "typetest.array.operations.Float32ValueOperations.get": "Type.Array.Float32Value.get", - "typetest.array.aio.operations.Float32ValueOperations.get": "Type.Array.Float32Value.get", - "typetest.array.operations.Float32ValueOperations.put": "Type.Array.Float32Value.put", - "typetest.array.aio.operations.Float32ValueOperations.put": "Type.Array.Float32Value.put", - "typetest.array.operations.DatetimeValueOperations.get": "Type.Array.DatetimeValue.get", - "typetest.array.aio.operations.DatetimeValueOperations.get": "Type.Array.DatetimeValue.get", - "typetest.array.operations.DatetimeValueOperations.put": "Type.Array.DatetimeValue.put", - "typetest.array.aio.operations.DatetimeValueOperations.put": "Type.Array.DatetimeValue.put", - "typetest.array.operations.DurationValueOperations.get": "Type.Array.DurationValue.get", - "typetest.array.aio.operations.DurationValueOperations.get": "Type.Array.DurationValue.get", - "typetest.array.operations.DurationValueOperations.put": "Type.Array.DurationValue.put", - "typetest.array.aio.operations.DurationValueOperations.put": "Type.Array.DurationValue.put", - "typetest.array.operations.UnknownValueOperations.get": "Type.Array.UnknownValue.get", - "typetest.array.aio.operations.UnknownValueOperations.get": "Type.Array.UnknownValue.get", - "typetest.array.operations.UnknownValueOperations.put": "Type.Array.UnknownValue.put", - "typetest.array.aio.operations.UnknownValueOperations.put": "Type.Array.UnknownValue.put", - "typetest.array.operations.ModelValueOperations.get": "Type.Array.ModelValue.get", - "typetest.array.aio.operations.ModelValueOperations.get": "Type.Array.ModelValue.get", - "typetest.array.operations.ModelValueOperations.put": "Type.Array.ModelValue.put", - "typetest.array.aio.operations.ModelValueOperations.put": "Type.Array.ModelValue.put", - "typetest.array.operations.NullableFloatValueOperations.get": "Type.Array.NullableFloatValue.get", - "typetest.array.aio.operations.NullableFloatValueOperations.get": "Type.Array.NullableFloatValue.get", - "typetest.array.operations.NullableFloatValueOperations.put": "Type.Array.NullableFloatValue.put", - "typetest.array.aio.operations.NullableFloatValueOperations.put": "Type.Array.NullableFloatValue.put", - "typetest.array.operations.NullableInt32ValueOperations.get": "Type.Array.NullableInt32Value.get", - "typetest.array.aio.operations.NullableInt32ValueOperations.get": "Type.Array.NullableInt32Value.get", - "typetest.array.operations.NullableInt32ValueOperations.put": "Type.Array.NullableInt32Value.put", - "typetest.array.aio.operations.NullableInt32ValueOperations.put": "Type.Array.NullableInt32Value.put", - "typetest.array.operations.NullableBooleanValueOperations.get": "Type.Array.NullableBooleanValue.get", - "typetest.array.aio.operations.NullableBooleanValueOperations.get": "Type.Array.NullableBooleanValue.get", - "typetest.array.operations.NullableBooleanValueOperations.put": "Type.Array.NullableBooleanValue.put", - "typetest.array.aio.operations.NullableBooleanValueOperations.put": "Type.Array.NullableBooleanValue.put", - "typetest.array.operations.NullableStringValueOperations.get": "Type.Array.NullableStringValue.get", - "typetest.array.aio.operations.NullableStringValueOperations.get": "Type.Array.NullableStringValue.get", - "typetest.array.operations.NullableStringValueOperations.put": "Type.Array.NullableStringValue.put", - "typetest.array.aio.operations.NullableStringValueOperations.put": "Type.Array.NullableStringValue.put", - "typetest.array.operations.NullableModelValueOperations.get": "Type.Array.NullableModelValue.get", - "typetest.array.aio.operations.NullableModelValueOperations.get": "Type.Array.NullableModelValue.get", - "typetest.array.operations.NullableModelValueOperations.put": "Type.Array.NullableModelValue.put", - "typetest.array.aio.operations.NullableModelValueOperations.put": "Type.Array.NullableModelValue.put" + "typetest.array.operations.ArrayClientInt32ValueOperations.get": "Type.Array.Int32Value.get", + "typetest.array.aio.operations.ArrayClientInt32ValueOperations.get": "Type.Array.Int32Value.get", + "typetest.array.operations.ArrayClientInt32ValueOperations.put": "Type.Array.Int32Value.put", + "typetest.array.aio.operations.ArrayClientInt32ValueOperations.put": "Type.Array.Int32Value.put", + "typetest.array.operations.ArrayClientInt64ValueOperations.get": "Type.Array.Int64Value.get", + "typetest.array.aio.operations.ArrayClientInt64ValueOperations.get": "Type.Array.Int64Value.get", + "typetest.array.operations.ArrayClientInt64ValueOperations.put": "Type.Array.Int64Value.put", + "typetest.array.aio.operations.ArrayClientInt64ValueOperations.put": "Type.Array.Int64Value.put", + "typetest.array.operations.ArrayClientBooleanValueOperations.get": "Type.Array.BooleanValue.get", + "typetest.array.aio.operations.ArrayClientBooleanValueOperations.get": "Type.Array.BooleanValue.get", + "typetest.array.operations.ArrayClientBooleanValueOperations.put": "Type.Array.BooleanValue.put", + "typetest.array.aio.operations.ArrayClientBooleanValueOperations.put": "Type.Array.BooleanValue.put", + "typetest.array.operations.ArrayClientStringValueOperations.get": "Type.Array.StringValue.get", + "typetest.array.aio.operations.ArrayClientStringValueOperations.get": "Type.Array.StringValue.get", + "typetest.array.operations.ArrayClientStringValueOperations.put": "Type.Array.StringValue.put", + "typetest.array.aio.operations.ArrayClientStringValueOperations.put": "Type.Array.StringValue.put", + "typetest.array.operations.ArrayClientFloat32ValueOperations.get": "Type.Array.Float32Value.get", + "typetest.array.aio.operations.ArrayClientFloat32ValueOperations.get": "Type.Array.Float32Value.get", + "typetest.array.operations.ArrayClientFloat32ValueOperations.put": "Type.Array.Float32Value.put", + "typetest.array.aio.operations.ArrayClientFloat32ValueOperations.put": "Type.Array.Float32Value.put", + "typetest.array.operations.ArrayClientDatetimeValueOperations.get": "Type.Array.DatetimeValue.get", + "typetest.array.aio.operations.ArrayClientDatetimeValueOperations.get": "Type.Array.DatetimeValue.get", + "typetest.array.operations.ArrayClientDatetimeValueOperations.put": "Type.Array.DatetimeValue.put", + "typetest.array.aio.operations.ArrayClientDatetimeValueOperations.put": "Type.Array.DatetimeValue.put", + "typetest.array.operations.ArrayClientDurationValueOperations.get": "Type.Array.DurationValue.get", + "typetest.array.aio.operations.ArrayClientDurationValueOperations.get": "Type.Array.DurationValue.get", + "typetest.array.operations.ArrayClientDurationValueOperations.put": "Type.Array.DurationValue.put", + "typetest.array.aio.operations.ArrayClientDurationValueOperations.put": "Type.Array.DurationValue.put", + "typetest.array.operations.ArrayClientUnknownValueOperations.get": "Type.Array.UnknownValue.get", + "typetest.array.aio.operations.ArrayClientUnknownValueOperations.get": "Type.Array.UnknownValue.get", + "typetest.array.operations.ArrayClientUnknownValueOperations.put": "Type.Array.UnknownValue.put", + "typetest.array.aio.operations.ArrayClientUnknownValueOperations.put": "Type.Array.UnknownValue.put", + "typetest.array.operations.ArrayClientModelValueOperations.get": "Type.Array.ModelValue.get", + "typetest.array.aio.operations.ArrayClientModelValueOperations.get": "Type.Array.ModelValue.get", + "typetest.array.operations.ArrayClientModelValueOperations.put": "Type.Array.ModelValue.put", + "typetest.array.aio.operations.ArrayClientModelValueOperations.put": "Type.Array.ModelValue.put", + "typetest.array.operations.ArrayClientNullableFloatValueOperations.get": "Type.Array.NullableFloatValue.get", + "typetest.array.aio.operations.ArrayClientNullableFloatValueOperations.get": "Type.Array.NullableFloatValue.get", + "typetest.array.operations.ArrayClientNullableFloatValueOperations.put": "Type.Array.NullableFloatValue.put", + "typetest.array.aio.operations.ArrayClientNullableFloatValueOperations.put": "Type.Array.NullableFloatValue.put", + "typetest.array.operations.ArrayClientNullableInt32ValueOperations.get": "Type.Array.NullableInt32Value.get", + "typetest.array.aio.operations.ArrayClientNullableInt32ValueOperations.get": "Type.Array.NullableInt32Value.get", + "typetest.array.operations.ArrayClientNullableInt32ValueOperations.put": "Type.Array.NullableInt32Value.put", + "typetest.array.aio.operations.ArrayClientNullableInt32ValueOperations.put": "Type.Array.NullableInt32Value.put", + "typetest.array.operations.ArrayClientNullableBooleanValueOperations.get": "Type.Array.NullableBooleanValue.get", + "typetest.array.aio.operations.ArrayClientNullableBooleanValueOperations.get": "Type.Array.NullableBooleanValue.get", + "typetest.array.operations.ArrayClientNullableBooleanValueOperations.put": "Type.Array.NullableBooleanValue.put", + "typetest.array.aio.operations.ArrayClientNullableBooleanValueOperations.put": "Type.Array.NullableBooleanValue.put", + "typetest.array.operations.ArrayClientNullableStringValueOperations.get": "Type.Array.NullableStringValue.get", + "typetest.array.aio.operations.ArrayClientNullableStringValueOperations.get": "Type.Array.NullableStringValue.get", + "typetest.array.operations.ArrayClientNullableStringValueOperations.put": "Type.Array.NullableStringValue.put", + "typetest.array.aio.operations.ArrayClientNullableStringValueOperations.put": "Type.Array.NullableStringValue.put", + "typetest.array.operations.ArrayClientNullableModelValueOperations.get": "Type.Array.NullableModelValue.get", + "typetest.array.aio.operations.ArrayClientNullableModelValueOperations.get": "Type.Array.NullableModelValue.get", + "typetest.array.operations.ArrayClientNullableModelValueOperations.put": "Type.Array.NullableModelValue.put", + "typetest.array.aio.operations.ArrayClientNullableModelValueOperations.put": "Type.Array.NullableModelValue.put" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations.py new file mode 100644 index 0000000000..8922fa618a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientBooleanValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_boolean_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_boolean_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_boolean_value.put( + body=[bool], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations_async.py new file mode 100644 index 0000000000..b06ee0c6a7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_boolean_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientBooleanValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_boolean_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_boolean_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_boolean_value.put( + body=[bool], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations.py new file mode 100644 index 0000000000..1aa6f676f3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientDatetimeValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_datetime_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_datetime_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_datetime_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_datetime_value.put( + body=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations_async.py new file mode 100644 index 0000000000..653dc7efdc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_datetime_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientDatetimeValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_datetime_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_datetime_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_datetime_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_datetime_value.put( + body=["2020-02-20 00:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations.py new file mode 100644 index 0000000000..753a13b4e0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientDurationValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_duration_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_duration_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_duration_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_duration_value.put( + body=["1 day, 0:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations_async.py new file mode 100644 index 0000000000..5b68a754d0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_duration_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientDurationValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_duration_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_duration_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_duration_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_duration_value.put( + body=["1 day, 0:00:00"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations.py new file mode 100644 index 0000000000..a8063ea040 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientFloat32ValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_float32_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_float32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_float32_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_float32_value.put( + body=[0.0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations_async.py new file mode 100644 index 0000000000..07f224b6ae --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_float32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientFloat32ValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_float32_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_float32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_float32_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_float32_value.put( + body=[0.0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations.py new file mode 100644 index 0000000000..4bf9576c8b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientInt32ValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_int32_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_int32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_int32_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_int32_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations_async.py new file mode 100644 index 0000000000..66702e79b2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientInt32ValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_int32_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_int32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_int32_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_int32_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations.py new file mode 100644 index 0000000000..5bc7f421c6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientInt64ValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_int64_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_int64_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_int64_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_int64_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations_async.py new file mode 100644 index 0000000000..6484968bf6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_int64_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientInt64ValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_int64_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_int64_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_int64_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_int64_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations.py new file mode 100644 index 0000000000..bec5670d45 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientModelValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_model_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_model_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_model_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_model_value.put( + body=[{"property": "str", "children": [...]}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations_async.py new file mode 100644 index 0000000000..fdac405ff9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientModelValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_model_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_model_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_model_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_model_value.put( + body=[{"property": "str", "children": [...]}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations.py new file mode 100644 index 0000000000..c40d45f8cb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableBooleanValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_boolean_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_boolean_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_boolean_value.put( + body=[bool], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations_async.py new file mode 100644 index 0000000000..216d148515 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_boolean_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableBooleanValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_boolean_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_boolean_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_boolean_value.put( + body=[bool], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations.py new file mode 100644 index 0000000000..74dfcfb701 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableFloatValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_float_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_float_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_float_value.put( + body=[0.0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations_async.py new file mode 100644 index 0000000000..17d4068895 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_float_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableFloatValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_float_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_float_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_float_value.put( + body=[0.0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations.py new file mode 100644 index 0000000000..3a871687ff --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableInt32ValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_int32_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_int32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_int32_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_int32_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations_async.py new file mode 100644 index 0000000000..ec8c8711c5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_int32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableInt32ValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_int32_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_int32_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_int32_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_int32_value.put( + body=[0], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations.py new file mode 100644 index 0000000000..18a941fcac --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableModelValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_model_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_model_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_model_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_model_value.put( + body=[{"property": "str", "children": [...]}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations_async.py new file mode 100644 index 0000000000..3927514889 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableModelValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_model_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_model_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_model_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_model_value.put( + body=[{"property": "str", "children": [...]}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations.py new file mode 100644 index 0000000000..2105a0aad8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableStringValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_string_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_string_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_nullable_string_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_nullable_string_value.put( + body=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations_async.py new file mode 100644 index 0000000000..094a4cbda7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_nullable_string_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientNullableStringValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_string_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_string_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_nullable_string_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_nullable_string_value.put( + body=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations.py new file mode 100644 index 0000000000..74b65ffffa --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientStringValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_string_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_string_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_string_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_string_value.put( + body=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations_async.py new file mode 100644 index 0000000000..d4261bd9fe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_string_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientStringValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_string_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_string_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_string_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_string_value.put( + body=["str"], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations.py new file mode 100644 index 0000000000..cb7a2cef5e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ArrayClientTestBase, ArrayPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientUnknownValueOperations(ArrayClientTestBase): + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_unknown_value_get(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_unknown_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy + def test_array_client_unknown_value_put(self, array_endpoint): + client = self.create_client(endpoint=array_endpoint) + response = client.array_client_unknown_value.put( + body=[{}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations_async.py new file mode 100644 index 0000000000..b5a601890f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-array/generated_tests/test_array_array_client_unknown_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ArrayPreparer +from testpreparer_async import ArrayClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestArrayArrayClientUnknownValueOperationsAsync(ArrayClientTestBaseAsync): + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_unknown_value_get(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_unknown_value.get() + + # please add some check logic here by yourself + # ... + + @ArrayPreparer() + @recorded_by_proxy_async + async def test_array_client_unknown_value_put(self, array_endpoint): + client = self.create_async_client(endpoint=array_endpoint) + response = await client.array_client_unknown_value.put( + body=[{}], + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_client.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_client.py index 030f534ce8..a62c94738b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/_client.py @@ -17,54 +17,64 @@ from ._configuration import ArrayClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableBooleanValueOperations, - NullableFloatValueOperations, - NullableInt32ValueOperations, - NullableModelValueOperations, - NullableStringValueOperations, - StringValueOperations, - UnknownValueOperations, + ArrayClientBooleanValueOperations, + ArrayClientDatetimeValueOperations, + ArrayClientDurationValueOperations, + ArrayClientFloat32ValueOperations, + ArrayClientInt32ValueOperations, + ArrayClientInt64ValueOperations, + ArrayClientModelValueOperations, + ArrayClientNullableBooleanValueOperations, + ArrayClientNullableFloatValueOperations, + ArrayClientNullableInt32ValueOperations, + ArrayClientNullableModelValueOperations, + ArrayClientNullableStringValueOperations, + ArrayClientStringValueOperations, + ArrayClientUnknownValueOperations, ) class ArrayClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various types of arrays. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.array.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.array.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.array.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.array.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.array.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.array.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.array.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.array.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.array.operations.ModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.array.operations.NullableFloatValueOperations - :ivar nullable_int32_value: NullableInt32ValueOperations operations - :vartype nullable_int32_value: typetest.array.operations.NullableInt32ValueOperations - :ivar nullable_boolean_value: NullableBooleanValueOperations operations - :vartype nullable_boolean_value: typetest.array.operations.NullableBooleanValueOperations - :ivar nullable_string_value: NullableStringValueOperations operations - :vartype nullable_string_value: typetest.array.operations.NullableStringValueOperations - :ivar nullable_model_value: NullableModelValueOperations operations - :vartype nullable_model_value: typetest.array.operations.NullableModelValueOperations + :ivar array_client_int32_value: ArrayClientInt32ValueOperations operations + :vartype array_client_int32_value: typetest.array.operations.ArrayClientInt32ValueOperations + :ivar array_client_int64_value: ArrayClientInt64ValueOperations operations + :vartype array_client_int64_value: typetest.array.operations.ArrayClientInt64ValueOperations + :ivar array_client_boolean_value: ArrayClientBooleanValueOperations operations + :vartype array_client_boolean_value: + typetest.array.operations.ArrayClientBooleanValueOperations + :ivar array_client_string_value: ArrayClientStringValueOperations operations + :vartype array_client_string_value: typetest.array.operations.ArrayClientStringValueOperations + :ivar array_client_float32_value: ArrayClientFloat32ValueOperations operations + :vartype array_client_float32_value: + typetest.array.operations.ArrayClientFloat32ValueOperations + :ivar array_client_datetime_value: ArrayClientDatetimeValueOperations operations + :vartype array_client_datetime_value: + typetest.array.operations.ArrayClientDatetimeValueOperations + :ivar array_client_duration_value: ArrayClientDurationValueOperations operations + :vartype array_client_duration_value: + typetest.array.operations.ArrayClientDurationValueOperations + :ivar array_client_unknown_value: ArrayClientUnknownValueOperations operations + :vartype array_client_unknown_value: + typetest.array.operations.ArrayClientUnknownValueOperations + :ivar array_client_model_value: ArrayClientModelValueOperations operations + :vartype array_client_model_value: typetest.array.operations.ArrayClientModelValueOperations + :ivar array_client_nullable_float_value: ArrayClientNullableFloatValueOperations operations + :vartype array_client_nullable_float_value: + typetest.array.operations.ArrayClientNullableFloatValueOperations + :ivar array_client_nullable_int32_value: ArrayClientNullableInt32ValueOperations operations + :vartype array_client_nullable_int32_value: + typetest.array.operations.ArrayClientNullableInt32ValueOperations + :ivar array_client_nullable_boolean_value: ArrayClientNullableBooleanValueOperations operations + :vartype array_client_nullable_boolean_value: + typetest.array.operations.ArrayClientNullableBooleanValueOperations + :ivar array_client_nullable_string_value: ArrayClientNullableStringValueOperations operations + :vartype array_client_nullable_string_value: + typetest.array.operations.ArrayClientNullableStringValueOperations + :ivar array_client_nullable_model_value: ArrayClientNullableModelValueOperations operations + :vartype array_client_nullable_model_value: + typetest.array.operations.ArrayClientNullableModelValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -97,28 +107,46 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.nullable_float_value = NullableFloatValueOperations( + self.array_client_int32_value = ArrayClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_int32_value = NullableInt32ValueOperations( + self.array_client_int64_value = ArrayClientInt64ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_boolean_value = NullableBooleanValueOperations( + self.array_client_boolean_value = ArrayClientBooleanValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_string_value = NullableStringValueOperations( + self.array_client_string_value = ArrayClientStringValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_model_value = NullableModelValueOperations( + self.array_client_float32_value = ArrayClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_datetime_value = ArrayClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_duration_value = ArrayClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_unknown_value = ArrayClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_model_value = ArrayClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_float_value = ArrayClientNullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_int32_value = ArrayClientNullableInt32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_boolean_value = ArrayClientNullableBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_string_value = ArrayClientNullableStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_model_value = ArrayClientNullableModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/_client.py index 2012baab7a..dcbd18a62f 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/_client.py @@ -17,54 +17,68 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ArrayClientConfiguration from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableBooleanValueOperations, - NullableFloatValueOperations, - NullableInt32ValueOperations, - NullableModelValueOperations, - NullableStringValueOperations, - StringValueOperations, - UnknownValueOperations, + ArrayClientBooleanValueOperations, + ArrayClientDatetimeValueOperations, + ArrayClientDurationValueOperations, + ArrayClientFloat32ValueOperations, + ArrayClientInt32ValueOperations, + ArrayClientInt64ValueOperations, + ArrayClientModelValueOperations, + ArrayClientNullableBooleanValueOperations, + ArrayClientNullableFloatValueOperations, + ArrayClientNullableInt32ValueOperations, + ArrayClientNullableModelValueOperations, + ArrayClientNullableStringValueOperations, + ArrayClientStringValueOperations, + ArrayClientUnknownValueOperations, ) class ArrayClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various types of arrays. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.array.aio.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.array.aio.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.array.aio.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.array.aio.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.array.aio.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.array.aio.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.array.aio.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.array.aio.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.array.aio.operations.ModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.array.aio.operations.NullableFloatValueOperations - :ivar nullable_int32_value: NullableInt32ValueOperations operations - :vartype nullable_int32_value: typetest.array.aio.operations.NullableInt32ValueOperations - :ivar nullable_boolean_value: NullableBooleanValueOperations operations - :vartype nullable_boolean_value: typetest.array.aio.operations.NullableBooleanValueOperations - :ivar nullable_string_value: NullableStringValueOperations operations - :vartype nullable_string_value: typetest.array.aio.operations.NullableStringValueOperations - :ivar nullable_model_value: NullableModelValueOperations operations - :vartype nullable_model_value: typetest.array.aio.operations.NullableModelValueOperations + :ivar array_client_int32_value: ArrayClientInt32ValueOperations operations + :vartype array_client_int32_value: + typetest.array.aio.operations.ArrayClientInt32ValueOperations + :ivar array_client_int64_value: ArrayClientInt64ValueOperations operations + :vartype array_client_int64_value: + typetest.array.aio.operations.ArrayClientInt64ValueOperations + :ivar array_client_boolean_value: ArrayClientBooleanValueOperations operations + :vartype array_client_boolean_value: + typetest.array.aio.operations.ArrayClientBooleanValueOperations + :ivar array_client_string_value: ArrayClientStringValueOperations operations + :vartype array_client_string_value: + typetest.array.aio.operations.ArrayClientStringValueOperations + :ivar array_client_float32_value: ArrayClientFloat32ValueOperations operations + :vartype array_client_float32_value: + typetest.array.aio.operations.ArrayClientFloat32ValueOperations + :ivar array_client_datetime_value: ArrayClientDatetimeValueOperations operations + :vartype array_client_datetime_value: + typetest.array.aio.operations.ArrayClientDatetimeValueOperations + :ivar array_client_duration_value: ArrayClientDurationValueOperations operations + :vartype array_client_duration_value: + typetest.array.aio.operations.ArrayClientDurationValueOperations + :ivar array_client_unknown_value: ArrayClientUnknownValueOperations operations + :vartype array_client_unknown_value: + typetest.array.aio.operations.ArrayClientUnknownValueOperations + :ivar array_client_model_value: ArrayClientModelValueOperations operations + :vartype array_client_model_value: + typetest.array.aio.operations.ArrayClientModelValueOperations + :ivar array_client_nullable_float_value: ArrayClientNullableFloatValueOperations operations + :vartype array_client_nullable_float_value: + typetest.array.aio.operations.ArrayClientNullableFloatValueOperations + :ivar array_client_nullable_int32_value: ArrayClientNullableInt32ValueOperations operations + :vartype array_client_nullable_int32_value: + typetest.array.aio.operations.ArrayClientNullableInt32ValueOperations + :ivar array_client_nullable_boolean_value: ArrayClientNullableBooleanValueOperations operations + :vartype array_client_nullable_boolean_value: + typetest.array.aio.operations.ArrayClientNullableBooleanValueOperations + :ivar array_client_nullable_string_value: ArrayClientNullableStringValueOperations operations + :vartype array_client_nullable_string_value: + typetest.array.aio.operations.ArrayClientNullableStringValueOperations + :ivar array_client_nullable_model_value: ArrayClientNullableModelValueOperations operations + :vartype array_client_nullable_model_value: + typetest.array.aio.operations.ArrayClientNullableModelValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -97,28 +111,46 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.nullable_float_value = NullableFloatValueOperations( + self.array_client_int32_value = ArrayClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_int32_value = NullableInt32ValueOperations( + self.array_client_int64_value = ArrayClientInt64ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_boolean_value = NullableBooleanValueOperations( + self.array_client_boolean_value = ArrayClientBooleanValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_string_value = NullableStringValueOperations( + self.array_client_string_value = ArrayClientStringValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_model_value = NullableModelValueOperations( + self.array_client_float32_value = ArrayClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_datetime_value = ArrayClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_duration_value = ArrayClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_unknown_value = ArrayClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_model_value = ArrayClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_float_value = ArrayClientNullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_int32_value = ArrayClientNullableInt32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_boolean_value = ArrayClientNullableBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_string_value = ArrayClientNullableStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_model_value = ArrayClientNullableModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/__init__.py index b69786a3d4..d96bb0d9d2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/__init__.py @@ -12,40 +12,40 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore -from ._operations import NullableInt32ValueOperations # type: ignore -from ._operations import NullableBooleanValueOperations # type: ignore -from ._operations import NullableStringValueOperations # type: ignore -from ._operations import NullableModelValueOperations # type: ignore +from ._operations import ArrayClientInt32ValueOperations # type: ignore +from ._operations import ArrayClientInt64ValueOperations # type: ignore +from ._operations import ArrayClientBooleanValueOperations # type: ignore +from ._operations import ArrayClientStringValueOperations # type: ignore +from ._operations import ArrayClientFloat32ValueOperations # type: ignore +from ._operations import ArrayClientDatetimeValueOperations # type: ignore +from ._operations import ArrayClientDurationValueOperations # type: ignore +from ._operations import ArrayClientUnknownValueOperations # type: ignore +from ._operations import ArrayClientModelValueOperations # type: ignore +from ._operations import ArrayClientNullableFloatValueOperations # type: ignore +from ._operations import ArrayClientNullableInt32ValueOperations # type: ignore +from ._operations import ArrayClientNullableBooleanValueOperations # type: ignore +from ._operations import ArrayClientNullableStringValueOperations # type: ignore +from ._operations import ArrayClientNullableModelValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "NullableFloatValueOperations", - "NullableInt32ValueOperations", - "NullableBooleanValueOperations", - "NullableStringValueOperations", - "NullableModelValueOperations", + "ArrayClientInt32ValueOperations", + "ArrayClientInt64ValueOperations", + "ArrayClientBooleanValueOperations", + "ArrayClientStringValueOperations", + "ArrayClientFloat32ValueOperations", + "ArrayClientDatetimeValueOperations", + "ArrayClientDurationValueOperations", + "ArrayClientUnknownValueOperations", + "ArrayClientModelValueOperations", + "ArrayClientNullableFloatValueOperations", + "ArrayClientNullableInt32ValueOperations", + "ArrayClientNullableBooleanValueOperations", + "ArrayClientNullableStringValueOperations", + "ArrayClientNullableModelValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py index 9508be8b3d..9087bc5d38 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/aio/operations/_operations.py @@ -32,34 +32,34 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_value_get_request, - build_boolean_value_put_request, - build_datetime_value_get_request, - build_datetime_value_put_request, - build_duration_value_get_request, - build_duration_value_put_request, - build_float32_value_get_request, - build_float32_value_put_request, - build_int32_value_get_request, - build_int32_value_put_request, - build_int64_value_get_request, - build_int64_value_put_request, - build_model_value_get_request, - build_model_value_put_request, - build_nullable_boolean_value_get_request, - build_nullable_boolean_value_put_request, - build_nullable_float_value_get_request, - build_nullable_float_value_put_request, - build_nullable_int32_value_get_request, - build_nullable_int32_value_put_request, - build_nullable_model_value_get_request, - build_nullable_model_value_put_request, - build_nullable_string_value_get_request, - build_nullable_string_value_put_request, - build_string_value_get_request, - build_string_value_put_request, - build_unknown_value_get_request, - build_unknown_value_put_request, + build_array_client_boolean_value_get_request, + build_array_client_boolean_value_put_request, + build_array_client_datetime_value_get_request, + build_array_client_datetime_value_put_request, + build_array_client_duration_value_get_request, + build_array_client_duration_value_put_request, + build_array_client_float32_value_get_request, + build_array_client_float32_value_put_request, + build_array_client_int32_value_get_request, + build_array_client_int32_value_put_request, + build_array_client_int64_value_get_request, + build_array_client_int64_value_put_request, + build_array_client_model_value_get_request, + build_array_client_model_value_put_request, + build_array_client_nullable_boolean_value_get_request, + build_array_client_nullable_boolean_value_put_request, + build_array_client_nullable_float_value_get_request, + build_array_client_nullable_float_value_put_request, + build_array_client_nullable_int32_value_get_request, + build_array_client_nullable_int32_value_put_request, + build_array_client_nullable_model_value_get_request, + build_array_client_nullable_model_value_put_request, + build_array_client_nullable_string_value_get_request, + build_array_client_nullable_string_value_put_request, + build_array_client_string_value_get_request, + build_array_client_string_value_put_request, + build_array_client_unknown_value_get_request, + build_array_client_unknown_value_put_request, ) from .._configuration import ArrayClientConfiguration @@ -68,14 +68,14 @@ JSON = MutableMapping[str, Any] -class Int32ValueOperations: +class ArrayClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`int32_value` attribute. + :attr:`array_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +106,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_array_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -200,7 +200,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_array_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -226,14 +226,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class ArrayClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`int64_value` attribute. + :attr:`array_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -264,7 +264,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_array_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -358,7 +358,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_array_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -384,14 +384,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class ArrayClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`boolean_value` attribute. + :attr:`array_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -422,7 +422,7 @@ async def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_array_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -516,7 +516,7 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_array_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -542,14 +542,14 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class ArrayClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`string_value` attribute. + :attr:`array_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -580,7 +580,7 @@ async def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_array_client_string_value_get_request( headers=_headers, params=_params, ) @@ -674,7 +674,7 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_array_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -700,14 +700,14 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class ArrayClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`float32_value` attribute. + :attr:`array_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -738,7 +738,7 @@ async def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_array_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -832,7 +832,7 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_array_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -858,14 +858,14 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class ArrayClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`datetime_value` attribute. + :attr:`array_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -896,7 +896,7 @@ async def get(self, **kwargs: Any) -> list[datetime.datetime]: cls: ClsType[list[datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_array_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -992,7 +992,7 @@ async def put(self, body: Union[list[datetime.datetime], IO[bytes]], **kwargs: A else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_array_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1018,14 +1018,14 @@ async def put(self, body: Union[list[datetime.datetime], IO[bytes]], **kwargs: A return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class ArrayClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`duration_value` attribute. + :attr:`array_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1056,7 +1056,7 @@ async def get(self, **kwargs: Any) -> list[datetime.timedelta]: cls: ClsType[list[datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_array_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1152,7 +1152,7 @@ async def put(self, body: Union[list[datetime.timedelta], IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_array_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1178,14 +1178,14 @@ async def put(self, body: Union[list[datetime.timedelta], IO[bytes]], **kwargs: return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class ArrayClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`unknown_value` attribute. + :attr:`array_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1216,7 +1216,7 @@ async def get(self, **kwargs: Any) -> list[Any]: cls: ClsType[list[Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_array_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1310,7 +1310,7 @@ async def put(self, body: Union[list[Any], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_array_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1336,14 +1336,14 @@ async def put(self, body: Union[list[Any], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class ArrayClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`model_value` attribute. + :attr:`array_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1374,7 +1374,7 @@ async def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_array_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1484,7 +1484,7 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_array_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1510,14 +1510,14 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class ArrayClientNullableFloatValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_float_value` attribute. + :attr:`array_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1548,7 +1548,7 @@ async def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_array_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -1642,7 +1642,7 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_array_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1668,14 +1668,14 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableInt32ValueOperations: +class ArrayClientNullableInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_int32_value` attribute. + :attr:`array_client_nullable_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1706,7 +1706,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_nullable_int32_value_get_request( + _request = build_array_client_nullable_int32_value_get_request( headers=_headers, params=_params, ) @@ -1800,7 +1800,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_int32_value_put_request( + _request = build_array_client_nullable_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1826,14 +1826,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableBooleanValueOperations: +class ArrayClientNullableBooleanValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_boolean_value` attribute. + :attr:`array_client_nullable_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1864,7 +1864,7 @@ async def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_nullable_boolean_value_get_request( + _request = build_array_client_nullable_boolean_value_get_request( headers=_headers, params=_params, ) @@ -1958,7 +1958,7 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_boolean_value_put_request( + _request = build_array_client_nullable_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1984,14 +1984,14 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableStringValueOperations: +class ArrayClientNullableStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_string_value` attribute. + :attr:`array_client_nullable_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2022,7 +2022,7 @@ async def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_nullable_string_value_get_request( + _request = build_array_client_nullable_string_value_get_request( headers=_headers, params=_params, ) @@ -2116,7 +2116,7 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_string_value_put_request( + _request = build_array_client_nullable_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2142,14 +2142,14 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableModelValueOperations: +class ArrayClientNullableModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_model_value` attribute. + :attr:`array_client_nullable_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2180,7 +2180,7 @@ async def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_nullable_model_value_get_request( + _request = build_array_client_nullable_model_value_get_request( headers=_headers, params=_params, ) @@ -2290,7 +2290,7 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_model_value_put_request( + _request = build_array_client_nullable_model_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/__init__.py index b69786a3d4..d96bb0d9d2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/__init__.py @@ -12,40 +12,40 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore -from ._operations import NullableInt32ValueOperations # type: ignore -from ._operations import NullableBooleanValueOperations # type: ignore -from ._operations import NullableStringValueOperations # type: ignore -from ._operations import NullableModelValueOperations # type: ignore +from ._operations import ArrayClientInt32ValueOperations # type: ignore +from ._operations import ArrayClientInt64ValueOperations # type: ignore +from ._operations import ArrayClientBooleanValueOperations # type: ignore +from ._operations import ArrayClientStringValueOperations # type: ignore +from ._operations import ArrayClientFloat32ValueOperations # type: ignore +from ._operations import ArrayClientDatetimeValueOperations # type: ignore +from ._operations import ArrayClientDurationValueOperations # type: ignore +from ._operations import ArrayClientUnknownValueOperations # type: ignore +from ._operations import ArrayClientModelValueOperations # type: ignore +from ._operations import ArrayClientNullableFloatValueOperations # type: ignore +from ._operations import ArrayClientNullableInt32ValueOperations # type: ignore +from ._operations import ArrayClientNullableBooleanValueOperations # type: ignore +from ._operations import ArrayClientNullableStringValueOperations # type: ignore +from ._operations import ArrayClientNullableModelValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "NullableFloatValueOperations", - "NullableInt32ValueOperations", - "NullableBooleanValueOperations", - "NullableStringValueOperations", - "NullableModelValueOperations", + "ArrayClientInt32ValueOperations", + "ArrayClientInt64ValueOperations", + "ArrayClientBooleanValueOperations", + "ArrayClientStringValueOperations", + "ArrayClientFloat32ValueOperations", + "ArrayClientDatetimeValueOperations", + "ArrayClientDurationValueOperations", + "ArrayClientUnknownValueOperations", + "ArrayClientModelValueOperations", + "ArrayClientNullableFloatValueOperations", + "ArrayClientNullableInt32ValueOperations", + "ArrayClientNullableBooleanValueOperations", + "ArrayClientNullableStringValueOperations", + "ArrayClientNullableModelValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py index 74b380ee81..c37784a985 100644 --- a/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-array/typetest/array/operations/_operations.py @@ -41,7 +41,7 @@ _SERIALIZER.client_side_validation = False -def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -55,7 +55,7 @@ def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -69,7 +69,7 @@ def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int64_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -83,7 +83,7 @@ def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int64_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -97,7 +97,7 @@ def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_boolean_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -111,7 +111,7 @@ def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_boolean_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -125,7 +125,7 @@ def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -153,7 +153,7 @@ def build_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_float32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -167,7 +167,7 @@ def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_float32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -181,7 +181,7 @@ def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -195,7 +195,7 @@ def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -209,7 +209,7 @@ def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_duration_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -223,7 +223,7 @@ def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_duration_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -237,7 +237,7 @@ def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_unknown_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -251,7 +251,7 @@ def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_unknown_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -265,7 +265,7 @@ def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -279,7 +279,7 @@ def build_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -293,7 +293,7 @@ def build_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -307,7 +307,7 @@ def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -321,7 +321,7 @@ def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -335,7 +335,7 @@ def build_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -349,7 +349,9 @@ def build_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_boolean_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -363,7 +365,9 @@ def build_nullable_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_boolean_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -377,7 +381,7 @@ def build_nullable_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -391,7 +395,7 @@ def build_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -405,7 +409,7 @@ def build_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -419,7 +423,7 @@ def build_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -433,14 +437,14 @@ def build_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class Int32ValueOperations: +class ArrayClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`int32_value` attribute. + :attr:`array_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -471,7 +475,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_array_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -567,7 +571,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_array_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -593,14 +597,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class ArrayClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`int64_value` attribute. + :attr:`array_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -631,7 +635,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_array_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -727,7 +731,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_array_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -753,14 +757,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class ArrayClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`boolean_value` attribute. + :attr:`array_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -791,7 +795,7 @@ def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_array_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -887,7 +891,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_array_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -913,14 +917,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class ArrayClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`string_value` attribute. + :attr:`array_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -951,7 +955,7 @@ def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_array_client_string_value_get_request( headers=_headers, params=_params, ) @@ -1047,7 +1051,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_array_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1073,14 +1077,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class ArrayClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`float32_value` attribute. + :attr:`array_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1111,7 +1115,7 @@ def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_array_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -1207,7 +1211,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_array_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1233,14 +1237,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class ArrayClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`datetime_value` attribute. + :attr:`array_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1271,7 +1275,7 @@ def get(self, **kwargs: Any) -> list[datetime.datetime]: cls: ClsType[list[datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_array_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -1367,7 +1371,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_array_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1393,14 +1397,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class ArrayClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`duration_value` attribute. + :attr:`array_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1431,7 +1435,7 @@ def get(self, **kwargs: Any) -> list[datetime.timedelta]: cls: ClsType[list[datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_array_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1527,7 +1531,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_array_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1553,14 +1557,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class ArrayClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`unknown_value` attribute. + :attr:`array_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1591,7 +1595,7 @@ def get(self, **kwargs: Any) -> list[Any]: cls: ClsType[list[Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_array_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1687,7 +1691,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_array_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1713,14 +1717,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class ArrayClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`model_value` attribute. + :attr:`array_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1751,7 +1755,7 @@ def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_array_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1861,7 +1865,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_array_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1887,14 +1891,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class ArrayClientNullableFloatValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_float_value` attribute. + :attr:`array_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1925,7 +1929,7 @@ def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_array_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -2021,7 +2025,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_array_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2047,14 +2051,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableInt32ValueOperations: +class ArrayClientNullableInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_int32_value` attribute. + :attr:`array_client_nullable_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2085,7 +2089,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_nullable_int32_value_get_request( + _request = build_array_client_nullable_int32_value_get_request( headers=_headers, params=_params, ) @@ -2181,7 +2185,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_int32_value_put_request( + _request = build_array_client_nullable_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2207,14 +2211,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableBooleanValueOperations: +class ArrayClientNullableBooleanValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_boolean_value` attribute. + :attr:`array_client_nullable_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2245,7 +2249,7 @@ def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_nullable_boolean_value_get_request( + _request = build_array_client_nullable_boolean_value_get_request( headers=_headers, params=_params, ) @@ -2341,7 +2345,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_boolean_value_put_request( + _request = build_array_client_nullable_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2367,14 +2371,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableStringValueOperations: +class ArrayClientNullableStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_string_value` attribute. + :attr:`array_client_nullable_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2405,7 +2409,7 @@ def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_nullable_string_value_get_request( + _request = build_array_client_nullable_string_value_get_request( headers=_headers, params=_params, ) @@ -2501,7 +2505,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_string_value_put_request( + _request = build_array_client_nullable_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2527,14 +2531,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableModelValueOperations: +class ArrayClientNullableModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_model_value` attribute. + :attr:`array_client_nullable_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2565,7 +2569,7 @@ def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_nullable_model_value_get_request( + _request = build_array_client_nullable_model_value_get_request( headers=_headers, params=_params, ) @@ -2675,7 +2679,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_model_value_put_request( + _request = build_array_client_nullable_model_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json index 4ea465f4f0..f651f0c580 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/apiview-properties.json @@ -2,49 +2,49 @@ "CrossLanguagePackageId": "Type.Dictionary", "CrossLanguageDefinitionId": { "typetest.dictionary.models.InnerModel": "Type.Dictionary.InnerModel", - "typetest.dictionary.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", - "typetest.dictionary.aio.operations.Int32ValueOperations.get": "Type.Dictionary.Int32Value.get", - "typetest.dictionary.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", - "typetest.dictionary.aio.operations.Int32ValueOperations.put": "Type.Dictionary.Int32Value.put", - "typetest.dictionary.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", - "typetest.dictionary.aio.operations.Int64ValueOperations.get": "Type.Dictionary.Int64Value.get", - "typetest.dictionary.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", - "typetest.dictionary.aio.operations.Int64ValueOperations.put": "Type.Dictionary.Int64Value.put", - "typetest.dictionary.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", - "typetest.dictionary.aio.operations.BooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", - "typetest.dictionary.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", - "typetest.dictionary.aio.operations.BooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", - "typetest.dictionary.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", - "typetest.dictionary.aio.operations.StringValueOperations.get": "Type.Dictionary.StringValue.get", - "typetest.dictionary.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", - "typetest.dictionary.aio.operations.StringValueOperations.put": "Type.Dictionary.StringValue.put", - "typetest.dictionary.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", - "typetest.dictionary.aio.operations.Float32ValueOperations.get": "Type.Dictionary.Float32Value.get", - "typetest.dictionary.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", - "typetest.dictionary.aio.operations.Float32ValueOperations.put": "Type.Dictionary.Float32Value.put", - "typetest.dictionary.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", - "typetest.dictionary.aio.operations.DatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", - "typetest.dictionary.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", - "typetest.dictionary.aio.operations.DatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", - "typetest.dictionary.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", - "typetest.dictionary.aio.operations.DurationValueOperations.get": "Type.Dictionary.DurationValue.get", - "typetest.dictionary.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", - "typetest.dictionary.aio.operations.DurationValueOperations.put": "Type.Dictionary.DurationValue.put", - "typetest.dictionary.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", - "typetest.dictionary.aio.operations.UnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", - "typetest.dictionary.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", - "typetest.dictionary.aio.operations.UnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", - "typetest.dictionary.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", - "typetest.dictionary.aio.operations.ModelValueOperations.get": "Type.Dictionary.ModelValue.get", - "typetest.dictionary.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", - "typetest.dictionary.aio.operations.ModelValueOperations.put": "Type.Dictionary.ModelValue.put", - "typetest.dictionary.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", - "typetest.dictionary.aio.operations.RecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", - "typetest.dictionary.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", - "typetest.dictionary.aio.operations.RecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", - "typetest.dictionary.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", - "typetest.dictionary.aio.operations.NullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", - "typetest.dictionary.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put", - "typetest.dictionary.aio.operations.NullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put" + "typetest.dictionary.operations.DictionaryClientInt32ValueOperations.get": "Type.Dictionary.Int32Value.get", + "typetest.dictionary.aio.operations.DictionaryClientInt32ValueOperations.get": "Type.Dictionary.Int32Value.get", + "typetest.dictionary.operations.DictionaryClientInt32ValueOperations.put": "Type.Dictionary.Int32Value.put", + "typetest.dictionary.aio.operations.DictionaryClientInt32ValueOperations.put": "Type.Dictionary.Int32Value.put", + "typetest.dictionary.operations.DictionaryClientInt64ValueOperations.get": "Type.Dictionary.Int64Value.get", + "typetest.dictionary.aio.operations.DictionaryClientInt64ValueOperations.get": "Type.Dictionary.Int64Value.get", + "typetest.dictionary.operations.DictionaryClientInt64ValueOperations.put": "Type.Dictionary.Int64Value.put", + "typetest.dictionary.aio.operations.DictionaryClientInt64ValueOperations.put": "Type.Dictionary.Int64Value.put", + "typetest.dictionary.operations.DictionaryClientBooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", + "typetest.dictionary.aio.operations.DictionaryClientBooleanValueOperations.get": "Type.Dictionary.BooleanValue.get", + "typetest.dictionary.operations.DictionaryClientBooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", + "typetest.dictionary.aio.operations.DictionaryClientBooleanValueOperations.put": "Type.Dictionary.BooleanValue.put", + "typetest.dictionary.operations.DictionaryClientStringValueOperations.get": "Type.Dictionary.StringValue.get", + "typetest.dictionary.aio.operations.DictionaryClientStringValueOperations.get": "Type.Dictionary.StringValue.get", + "typetest.dictionary.operations.DictionaryClientStringValueOperations.put": "Type.Dictionary.StringValue.put", + "typetest.dictionary.aio.operations.DictionaryClientStringValueOperations.put": "Type.Dictionary.StringValue.put", + "typetest.dictionary.operations.DictionaryClientFloat32ValueOperations.get": "Type.Dictionary.Float32Value.get", + "typetest.dictionary.aio.operations.DictionaryClientFloat32ValueOperations.get": "Type.Dictionary.Float32Value.get", + "typetest.dictionary.operations.DictionaryClientFloat32ValueOperations.put": "Type.Dictionary.Float32Value.put", + "typetest.dictionary.aio.operations.DictionaryClientFloat32ValueOperations.put": "Type.Dictionary.Float32Value.put", + "typetest.dictionary.operations.DictionaryClientDatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", + "typetest.dictionary.aio.operations.DictionaryClientDatetimeValueOperations.get": "Type.Dictionary.DatetimeValue.get", + "typetest.dictionary.operations.DictionaryClientDatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", + "typetest.dictionary.aio.operations.DictionaryClientDatetimeValueOperations.put": "Type.Dictionary.DatetimeValue.put", + "typetest.dictionary.operations.DictionaryClientDurationValueOperations.get": "Type.Dictionary.DurationValue.get", + "typetest.dictionary.aio.operations.DictionaryClientDurationValueOperations.get": "Type.Dictionary.DurationValue.get", + "typetest.dictionary.operations.DictionaryClientDurationValueOperations.put": "Type.Dictionary.DurationValue.put", + "typetest.dictionary.aio.operations.DictionaryClientDurationValueOperations.put": "Type.Dictionary.DurationValue.put", + "typetest.dictionary.operations.DictionaryClientUnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", + "typetest.dictionary.aio.operations.DictionaryClientUnknownValueOperations.get": "Type.Dictionary.UnknownValue.get", + "typetest.dictionary.operations.DictionaryClientUnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", + "typetest.dictionary.aio.operations.DictionaryClientUnknownValueOperations.put": "Type.Dictionary.UnknownValue.put", + "typetest.dictionary.operations.DictionaryClientModelValueOperations.get": "Type.Dictionary.ModelValue.get", + "typetest.dictionary.aio.operations.DictionaryClientModelValueOperations.get": "Type.Dictionary.ModelValue.get", + "typetest.dictionary.operations.DictionaryClientModelValueOperations.put": "Type.Dictionary.ModelValue.put", + "typetest.dictionary.aio.operations.DictionaryClientModelValueOperations.put": "Type.Dictionary.ModelValue.put", + "typetest.dictionary.operations.DictionaryClientRecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", + "typetest.dictionary.aio.operations.DictionaryClientRecursiveModelValueOperations.get": "Type.Dictionary.RecursiveModelValue.get", + "typetest.dictionary.operations.DictionaryClientRecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", + "typetest.dictionary.aio.operations.DictionaryClientRecursiveModelValueOperations.put": "Type.Dictionary.RecursiveModelValue.put", + "typetest.dictionary.operations.DictionaryClientNullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", + "typetest.dictionary.aio.operations.DictionaryClientNullableFloatValueOperations.get": "Type.Dictionary.NullableFloatValue.get", + "typetest.dictionary.operations.DictionaryClientNullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put", + "typetest.dictionary.aio.operations.DictionaryClientNullableFloatValueOperations.put": "Type.Dictionary.NullableFloatValue.put" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations.py new file mode 100644 index 0000000000..1dacb26e7c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientBooleanValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_boolean_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_boolean_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_boolean_value.put( + body={"str": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations_async.py new file mode 100644 index 0000000000..834a6a5b4a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_boolean_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientBooleanValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_boolean_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_boolean_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_boolean_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_boolean_value.put( + body={"str": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations.py new file mode 100644 index 0000000000..fdc076db4b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientDatetimeValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_datetime_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_datetime_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_datetime_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_datetime_value.put( + body={"str": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations_async.py new file mode 100644 index 0000000000..dead51b187 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_datetime_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientDatetimeValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_datetime_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_datetime_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_datetime_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_datetime_value.put( + body={"str": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations.py new file mode 100644 index 0000000000..2f5aec32c0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientDurationValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_duration_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_duration_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_duration_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_duration_value.put( + body={"str": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations_async.py new file mode 100644 index 0000000000..aa07b12314 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_duration_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientDurationValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_duration_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_duration_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_duration_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_duration_value.put( + body={"str": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations.py new file mode 100644 index 0000000000..d4c7c39065 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientFloat32ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_float32_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_float32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_float32_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_float32_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations_async.py new file mode 100644 index 0000000000..13ac91e9e2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_float32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientFloat32ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_float32_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_float32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_float32_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_float32_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations.py new file mode 100644 index 0000000000..a130ad2135 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientInt32ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_int32_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_int32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_int32_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_int32_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations_async.py new file mode 100644 index 0000000000..be773e2db0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int32_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientInt32ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_int32_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_int32_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_int32_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_int32_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations.py new file mode 100644 index 0000000000..d6721c2077 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientInt64ValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_int64_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_int64_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_int64_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_int64_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations_async.py new file mode 100644 index 0000000000..e081f012d9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_int64_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientInt64ValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_int64_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_int64_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_int64_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_int64_value.put( + body={"str": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations.py new file mode 100644 index 0000000000..737f0eed41 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientModelValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_model_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_model_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations_async.py new file mode 100644 index 0000000000..1471f70f04 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientModelValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_model_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_model_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations.py new file mode 100644 index 0000000000..be413c6a1b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientNullableFloatValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_nullable_float_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_nullable_float_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_nullable_float_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations_async.py new file mode 100644 index 0000000000..844650c807 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_nullable_float_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientNullableFloatValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_nullable_float_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_nullable_float_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_nullable_float_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_nullable_float_value.put( + body={"str": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations.py new file mode 100644 index 0000000000..936a4c7e06 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientRecursiveModelValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_recursive_model_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_recursive_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_recursive_model_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_recursive_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations_async.py new file mode 100644 index 0000000000..ce54698ae8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_recursive_model_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientRecursiveModelValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_recursive_model_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_recursive_model_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_recursive_model_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_recursive_model_value.put( + body={"str": {"property": "str", "children": {"str": ...}}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations.py new file mode 100644 index 0000000000..d5fd6cfdde --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientStringValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_string_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_string_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_string_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_string_value.put( + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations_async.py new file mode 100644 index 0000000000..a595fe1358 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_string_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientStringValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_string_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_string_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_string_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_string_value.put( + body={"str": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations.py new file mode 100644 index 0000000000..7c82f2f84a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DictionaryClientTestBase, DictionaryPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientUnknownValueOperations(DictionaryClientTestBase): + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_unknown_value_get(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_unknown_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy + def test_dictionary_client_unknown_value_put(self, dictionary_endpoint): + client = self.create_client(endpoint=dictionary_endpoint) + response = client.dictionary_client_unknown_value.put( + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations_async.py new file mode 100644 index 0000000000..a168bfff22 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/generated_tests/test_dictionary_dictionary_client_unknown_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DictionaryPreparer +from testpreparer_async import DictionaryClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDictionaryDictionaryClientUnknownValueOperationsAsync(DictionaryClientTestBaseAsync): + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_unknown_value_get(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_unknown_value.get() + + # please add some check logic here by yourself + # ... + + @DictionaryPreparer() + @recorded_by_proxy_async + async def test_dictionary_client_unknown_value_put(self, dictionary_endpoint): + client = self.create_async_client(endpoint=dictionary_endpoint) + response = await client.dictionary_client_unknown_value.put( + body={"str": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py index 393c329d4b..a8da12ff7d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/_client.py @@ -17,45 +17,58 @@ from ._configuration import DictionaryClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, + DictionaryClientBooleanValueOperations, + DictionaryClientDatetimeValueOperations, + DictionaryClientDurationValueOperations, + DictionaryClientFloat32ValueOperations, + DictionaryClientInt32ValueOperations, + DictionaryClientInt64ValueOperations, + DictionaryClientModelValueOperations, + DictionaryClientNullableFloatValueOperations, + DictionaryClientRecursiveModelValueOperations, + DictionaryClientStringValueOperations, + DictionaryClientUnknownValueOperations, ) class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various of dictionaries. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: typetest.dictionary.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.operations.NullableFloatValueOperations + :ivar dictionary_client_int32_value: DictionaryClientInt32ValueOperations operations + :vartype dictionary_client_int32_value: + typetest.dictionary.operations.DictionaryClientInt32ValueOperations + :ivar dictionary_client_int64_value: DictionaryClientInt64ValueOperations operations + :vartype dictionary_client_int64_value: + typetest.dictionary.operations.DictionaryClientInt64ValueOperations + :ivar dictionary_client_boolean_value: DictionaryClientBooleanValueOperations operations + :vartype dictionary_client_boolean_value: + typetest.dictionary.operations.DictionaryClientBooleanValueOperations + :ivar dictionary_client_string_value: DictionaryClientStringValueOperations operations + :vartype dictionary_client_string_value: + typetest.dictionary.operations.DictionaryClientStringValueOperations + :ivar dictionary_client_float32_value: DictionaryClientFloat32ValueOperations operations + :vartype dictionary_client_float32_value: + typetest.dictionary.operations.DictionaryClientFloat32ValueOperations + :ivar dictionary_client_datetime_value: DictionaryClientDatetimeValueOperations operations + :vartype dictionary_client_datetime_value: + typetest.dictionary.operations.DictionaryClientDatetimeValueOperations + :ivar dictionary_client_duration_value: DictionaryClientDurationValueOperations operations + :vartype dictionary_client_duration_value: + typetest.dictionary.operations.DictionaryClientDurationValueOperations + :ivar dictionary_client_unknown_value: DictionaryClientUnknownValueOperations operations + :vartype dictionary_client_unknown_value: + typetest.dictionary.operations.DictionaryClientUnknownValueOperations + :ivar dictionary_client_model_value: DictionaryClientModelValueOperations operations + :vartype dictionary_client_model_value: + typetest.dictionary.operations.DictionaryClientModelValueOperations + :ivar dictionary_client_recursive_model_value: DictionaryClientRecursiveModelValueOperations + operations + :vartype dictionary_client_recursive_model_value: + typetest.dictionary.operations.DictionaryClientRecursiveModelValueOperations + :ivar dictionary_client_nullable_float_value: DictionaryClientNullableFloatValueOperations + operations + :vartype dictionary_client_nullable_float_value: + typetest.dictionary.operations.DictionaryClientNullableFloatValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -88,19 +101,37 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( + self.dictionary_client_int32_value = DictionaryClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_float_value = NullableFloatValueOperations( + self.dictionary_client_int64_value = DictionaryClientInt64ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_boolean_value = DictionaryClientBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_string_value = DictionaryClientStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_float32_value = DictionaryClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_datetime_value = DictionaryClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_duration_value = DictionaryClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_unknown_value = DictionaryClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_model_value = DictionaryClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_recursive_model_value = DictionaryClientRecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_nullable_float_value = DictionaryClientNullableFloatValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py index f48f157063..5cf1a8bcc5 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/_client.py @@ -17,46 +17,58 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DictionaryClientConfiguration from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, + DictionaryClientBooleanValueOperations, + DictionaryClientDatetimeValueOperations, + DictionaryClientDurationValueOperations, + DictionaryClientFloat32ValueOperations, + DictionaryClientInt32ValueOperations, + DictionaryClientInt64ValueOperations, + DictionaryClientModelValueOperations, + DictionaryClientNullableFloatValueOperations, + DictionaryClientRecursiveModelValueOperations, + DictionaryClientStringValueOperations, + DictionaryClientUnknownValueOperations, ) class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various of dictionaries. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.aio.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.aio.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.aio.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.aio.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.aio.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.aio.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.aio.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.aio.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.aio.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: - typetest.dictionary.aio.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.aio.operations.NullableFloatValueOperations + :ivar dictionary_client_int32_value: DictionaryClientInt32ValueOperations operations + :vartype dictionary_client_int32_value: + typetest.dictionary.aio.operations.DictionaryClientInt32ValueOperations + :ivar dictionary_client_int64_value: DictionaryClientInt64ValueOperations operations + :vartype dictionary_client_int64_value: + typetest.dictionary.aio.operations.DictionaryClientInt64ValueOperations + :ivar dictionary_client_boolean_value: DictionaryClientBooleanValueOperations operations + :vartype dictionary_client_boolean_value: + typetest.dictionary.aio.operations.DictionaryClientBooleanValueOperations + :ivar dictionary_client_string_value: DictionaryClientStringValueOperations operations + :vartype dictionary_client_string_value: + typetest.dictionary.aio.operations.DictionaryClientStringValueOperations + :ivar dictionary_client_float32_value: DictionaryClientFloat32ValueOperations operations + :vartype dictionary_client_float32_value: + typetest.dictionary.aio.operations.DictionaryClientFloat32ValueOperations + :ivar dictionary_client_datetime_value: DictionaryClientDatetimeValueOperations operations + :vartype dictionary_client_datetime_value: + typetest.dictionary.aio.operations.DictionaryClientDatetimeValueOperations + :ivar dictionary_client_duration_value: DictionaryClientDurationValueOperations operations + :vartype dictionary_client_duration_value: + typetest.dictionary.aio.operations.DictionaryClientDurationValueOperations + :ivar dictionary_client_unknown_value: DictionaryClientUnknownValueOperations operations + :vartype dictionary_client_unknown_value: + typetest.dictionary.aio.operations.DictionaryClientUnknownValueOperations + :ivar dictionary_client_model_value: DictionaryClientModelValueOperations operations + :vartype dictionary_client_model_value: + typetest.dictionary.aio.operations.DictionaryClientModelValueOperations + :ivar dictionary_client_recursive_model_value: DictionaryClientRecursiveModelValueOperations + operations + :vartype dictionary_client_recursive_model_value: + typetest.dictionary.aio.operations.DictionaryClientRecursiveModelValueOperations + :ivar dictionary_client_nullable_float_value: DictionaryClientNullableFloatValueOperations + operations + :vartype dictionary_client_nullable_float_value: + typetest.dictionary.aio.operations.DictionaryClientNullableFloatValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -89,19 +101,37 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( + self.dictionary_client_int32_value = DictionaryClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_float_value = NullableFloatValueOperations( + self.dictionary_client_int64_value = DictionaryClientInt64ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_boolean_value = DictionaryClientBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_string_value = DictionaryClientStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_float32_value = DictionaryClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_datetime_value = DictionaryClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_duration_value = DictionaryClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_unknown_value = DictionaryClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_model_value = DictionaryClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_recursive_model_value = DictionaryClientRecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_nullable_float_value = DictionaryClientNullableFloatValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py index f56c4be2d9..c6cfe6b156 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py @@ -12,34 +12,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore +from ._operations import DictionaryClientInt32ValueOperations # type: ignore +from ._operations import DictionaryClientInt64ValueOperations # type: ignore +from ._operations import DictionaryClientBooleanValueOperations # type: ignore +from ._operations import DictionaryClientStringValueOperations # type: ignore +from ._operations import DictionaryClientFloat32ValueOperations # type: ignore +from ._operations import DictionaryClientDatetimeValueOperations # type: ignore +from ._operations import DictionaryClientDurationValueOperations # type: ignore +from ._operations import DictionaryClientUnknownValueOperations # type: ignore +from ._operations import DictionaryClientModelValueOperations # type: ignore +from ._operations import DictionaryClientRecursiveModelValueOperations # type: ignore +from ._operations import DictionaryClientNullableFloatValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", + "DictionaryClientInt32ValueOperations", + "DictionaryClientInt64ValueOperations", + "DictionaryClientBooleanValueOperations", + "DictionaryClientStringValueOperations", + "DictionaryClientFloat32ValueOperations", + "DictionaryClientDatetimeValueOperations", + "DictionaryClientDurationValueOperations", + "DictionaryClientUnknownValueOperations", + "DictionaryClientModelValueOperations", + "DictionaryClientRecursiveModelValueOperations", + "DictionaryClientNullableFloatValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py index 49052089f4..95b17bee4e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py @@ -32,28 +32,28 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_value_get_request, - build_boolean_value_put_request, - build_datetime_value_get_request, - build_datetime_value_put_request, - build_duration_value_get_request, - build_duration_value_put_request, - build_float32_value_get_request, - build_float32_value_put_request, - build_int32_value_get_request, - build_int32_value_put_request, - build_int64_value_get_request, - build_int64_value_put_request, - build_model_value_get_request, - build_model_value_put_request, - build_nullable_float_value_get_request, - build_nullable_float_value_put_request, - build_recursive_model_value_get_request, - build_recursive_model_value_put_request, - build_string_value_get_request, - build_string_value_put_request, - build_unknown_value_get_request, - build_unknown_value_put_request, + build_dictionary_client_boolean_value_get_request, + build_dictionary_client_boolean_value_put_request, + build_dictionary_client_datetime_value_get_request, + build_dictionary_client_datetime_value_put_request, + build_dictionary_client_duration_value_get_request, + build_dictionary_client_duration_value_put_request, + build_dictionary_client_float32_value_get_request, + build_dictionary_client_float32_value_put_request, + build_dictionary_client_int32_value_get_request, + build_dictionary_client_int32_value_put_request, + build_dictionary_client_int64_value_get_request, + build_dictionary_client_int64_value_put_request, + build_dictionary_client_model_value_get_request, + build_dictionary_client_model_value_put_request, + build_dictionary_client_nullable_float_value_get_request, + build_dictionary_client_nullable_float_value_put_request, + build_dictionary_client_recursive_model_value_get_request, + build_dictionary_client_recursive_model_value_put_request, + build_dictionary_client_string_value_get_request, + build_dictionary_client_string_value_put_request, + build_dictionary_client_unknown_value_get_request, + build_dictionary_client_unknown_value_put_request, ) from .._configuration import DictionaryClientConfiguration @@ -62,14 +62,14 @@ JSON = MutableMapping[str, Any] -class Int32ValueOperations: +class DictionaryClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int32_value` attribute. + :attr:`dictionary_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -100,7 +100,7 @@ async def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_dictionary_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -194,7 +194,7 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_dictionary_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -220,14 +220,14 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class DictionaryClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int64_value` attribute. + :attr:`dictionary_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -258,7 +258,7 @@ async def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_dictionary_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -352,7 +352,7 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_dictionary_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -378,14 +378,14 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class DictionaryClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`boolean_value` attribute. + :attr:`dictionary_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -416,7 +416,7 @@ async def get(self, **kwargs: Any) -> dict[str, bool]: cls: ClsType[dict[str, bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_dictionary_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -510,7 +510,7 @@ async def put(self, body: Union[dict[str, bool], IO[bytes]], **kwargs: Any) -> N else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_dictionary_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -536,14 +536,14 @@ async def put(self, body: Union[dict[str, bool], IO[bytes]], **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class DictionaryClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`string_value` attribute. + :attr:`dictionary_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -574,7 +574,7 @@ async def get(self, **kwargs: Any) -> dict[str, str]: cls: ClsType[dict[str, str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_dictionary_client_string_value_get_request( headers=_headers, params=_params, ) @@ -668,7 +668,7 @@ async def put(self, body: Union[dict[str, str], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_dictionary_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -694,14 +694,14 @@ async def put(self, body: Union[dict[str, str], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class DictionaryClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`float32_value` attribute. + :attr:`dictionary_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -732,7 +732,7 @@ async def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_dictionary_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -826,7 +826,7 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_dictionary_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -852,14 +852,14 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class DictionaryClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`datetime_value` attribute. + :attr:`dictionary_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -890,7 +890,7 @@ async def get(self, **kwargs: Any) -> dict[str, datetime.datetime]: cls: ClsType[dict[str, datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_dictionary_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -986,7 +986,7 @@ async def put(self, body: Union[dict[str, datetime.datetime], IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_dictionary_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1012,14 +1012,14 @@ async def put(self, body: Union[dict[str, datetime.datetime], IO[bytes]], **kwar return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class DictionaryClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`duration_value` attribute. + :attr:`dictionary_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1050,7 +1050,7 @@ async def get(self, **kwargs: Any) -> dict[str, datetime.timedelta]: cls: ClsType[dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_dictionary_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1146,7 +1146,7 @@ async def put(self, body: Union[dict[str, datetime.timedelta], IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_dictionary_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1172,14 +1172,14 @@ async def put(self, body: Union[dict[str, datetime.timedelta], IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class DictionaryClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`unknown_value` attribute. + :attr:`dictionary_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1210,7 +1210,7 @@ async def get(self, **kwargs: Any) -> dict[str, Any]: cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_dictionary_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1304,7 +1304,7 @@ async def put(self, body: Union[dict[str, Any], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_dictionary_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1330,14 +1330,14 @@ async def put(self, body: Union[dict[str, Any], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class DictionaryClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`model_value` attribute. + :attr:`dictionary_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1368,7 +1368,7 @@ async def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_dictionary_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1478,7 +1478,7 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_dictionary_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1504,14 +1504,14 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], return cls(pipeline_response, None, {}) # type: ignore -class RecursiveModelValueOperations: +class DictionaryClientRecursiveModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`recursive_model_value` attribute. + :attr:`dictionary_client_recursive_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1542,7 +1542,7 @@ async def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_recursive_model_value_get_request( + _request = build_dictionary_client_recursive_model_value_get_request( headers=_headers, params=_params, ) @@ -1652,7 +1652,7 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_recursive_model_value_put_request( + _request = build_dictionary_client_recursive_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1678,14 +1678,14 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class DictionaryClientNullableFloatValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`nullable_float_value` attribute. + :attr:`dictionary_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1716,7 +1716,7 @@ async def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_dictionary_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -1810,7 +1810,7 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_dictionary_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py index f56c4be2d9..c6cfe6b156 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py @@ -12,34 +12,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore +from ._operations import DictionaryClientInt32ValueOperations # type: ignore +from ._operations import DictionaryClientInt64ValueOperations # type: ignore +from ._operations import DictionaryClientBooleanValueOperations # type: ignore +from ._operations import DictionaryClientStringValueOperations # type: ignore +from ._operations import DictionaryClientFloat32ValueOperations # type: ignore +from ._operations import DictionaryClientDatetimeValueOperations # type: ignore +from ._operations import DictionaryClientDurationValueOperations # type: ignore +from ._operations import DictionaryClientUnknownValueOperations # type: ignore +from ._operations import DictionaryClientModelValueOperations # type: ignore +from ._operations import DictionaryClientRecursiveModelValueOperations # type: ignore +from ._operations import DictionaryClientNullableFloatValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", + "DictionaryClientInt32ValueOperations", + "DictionaryClientInt64ValueOperations", + "DictionaryClientBooleanValueOperations", + "DictionaryClientStringValueOperations", + "DictionaryClientFloat32ValueOperations", + "DictionaryClientDatetimeValueOperations", + "DictionaryClientDurationValueOperations", + "DictionaryClientUnknownValueOperations", + "DictionaryClientModelValueOperations", + "DictionaryClientRecursiveModelValueOperations", + "DictionaryClientNullableFloatValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py index 988920870f..25d4c9f403 100644 --- a/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py @@ -41,7 +41,7 @@ _SERIALIZER.client_side_validation = False -def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -55,7 +55,7 @@ def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -69,7 +69,7 @@ def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int64_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -83,7 +83,7 @@ def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int64_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -97,7 +97,7 @@ def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_boolean_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -111,7 +111,7 @@ def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_boolean_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -125,7 +125,7 @@ def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -139,7 +139,7 @@ def build_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -153,7 +153,7 @@ def build_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_float32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -167,7 +167,7 @@ def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_float32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -181,7 +181,7 @@ def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -195,7 +195,7 @@ def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -209,7 +209,7 @@ def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_duration_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -223,7 +223,7 @@ def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_duration_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -237,7 +237,7 @@ def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_unknown_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -251,7 +251,7 @@ def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_unknown_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -265,7 +265,7 @@ def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -279,7 +279,7 @@ def build_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -293,7 +293,9 @@ def build_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_recursive_model_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -307,7 +309,9 @@ def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_recursive_model_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -321,7 +325,9 @@ def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_nullable_float_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -335,7 +341,9 @@ def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_nullable_float_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -349,14 +357,14 @@ def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class Int32ValueOperations: +class DictionaryClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int32_value` attribute. + :attr:`dictionary_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -387,7 +395,7 @@ def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_dictionary_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -483,7 +491,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_dictionary_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -509,14 +517,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class DictionaryClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int64_value` attribute. + :attr:`dictionary_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -547,7 +555,7 @@ def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_dictionary_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -643,7 +651,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_dictionary_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -669,14 +677,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class DictionaryClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`boolean_value` attribute. + :attr:`dictionary_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -707,7 +715,7 @@ def get(self, **kwargs: Any) -> dict[str, bool]: cls: ClsType[dict[str, bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_dictionary_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -803,7 +811,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_dictionary_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -829,14 +837,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class DictionaryClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`string_value` attribute. + :attr:`dictionary_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -867,7 +875,7 @@ def get(self, **kwargs: Any) -> dict[str, str]: cls: ClsType[dict[str, str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_dictionary_client_string_value_get_request( headers=_headers, params=_params, ) @@ -963,7 +971,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_dictionary_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -989,14 +997,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class DictionaryClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`float32_value` attribute. + :attr:`dictionary_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1027,7 +1035,7 @@ def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_dictionary_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -1123,7 +1131,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_dictionary_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1149,14 +1157,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class DictionaryClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`datetime_value` attribute. + :attr:`dictionary_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1187,7 +1195,7 @@ def get(self, **kwargs: Any) -> dict[str, datetime.datetime]: cls: ClsType[dict[str, datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_dictionary_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -1283,7 +1291,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_dictionary_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1309,14 +1317,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class DictionaryClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`duration_value` attribute. + :attr:`dictionary_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1347,7 +1355,7 @@ def get(self, **kwargs: Any) -> dict[str, datetime.timedelta]: cls: ClsType[dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_dictionary_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1445,7 +1453,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_dictionary_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1471,14 +1479,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class DictionaryClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`unknown_value` attribute. + :attr:`dictionary_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1509,7 +1517,7 @@ def get(self, **kwargs: Any) -> dict[str, Any]: cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_dictionary_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1605,7 +1613,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_dictionary_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1631,14 +1639,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class DictionaryClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`model_value` attribute. + :attr:`dictionary_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1669,7 +1677,7 @@ def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_dictionary_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1781,7 +1789,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_dictionary_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1807,14 +1815,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RecursiveModelValueOperations: +class DictionaryClientRecursiveModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`recursive_model_value` attribute. + :attr:`dictionary_client_recursive_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1845,7 +1853,7 @@ def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_recursive_model_value_get_request( + _request = build_dictionary_client_recursive_model_value_get_request( headers=_headers, params=_params, ) @@ -1957,7 +1965,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_recursive_model_value_put_request( + _request = build_dictionary_client_recursive_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1983,14 +1991,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class DictionaryClientNullableFloatValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`nullable_float_value` attribute. + :attr:`dictionary_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2021,7 +2029,7 @@ def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_dictionary_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -2117,7 +2125,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_dictionary_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations.py new file mode 100644 index 0000000000..3ae23978c2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations.py @@ -0,0 +1,66 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DiscriminatedClientTestBase, DiscriminatedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDiscriminatedDiscriminatedClientEnvelopeOperations(DiscriminatedClientTestBase): + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_default_get( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = ( + client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_default.get() + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_default_put( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_default.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_custom_properties_get( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = ( + client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_custom_properties.get() + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_custom_properties_put( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_custom_properties.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations_async.py new file mode 100644 index 0000000000..1b082a30c6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_envelope_operations_async.py @@ -0,0 +1,67 @@ +# pylint: disable=line-too-long,useless-suppression +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DiscriminatedPreparer +from testpreparer_async import DiscriminatedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDiscriminatedDiscriminatedClientEnvelopeOperationsAsync(DiscriminatedClientTestBaseAsync): + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_default_get( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = ( + await client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_default.get() + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_default_put( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = await client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_default.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_custom_properties_get( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = ( + await client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_custom_properties.get() + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_envelope_discriminated_client_envelope_object_discriminated_client_envelope_object_custom_properties_put( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = await client.discriminated_client_envelope.discriminated_client_envelope_object.discriminated_client_envelope_object_custom_properties.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations.py new file mode 100644 index 0000000000..2cd3516663 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import DiscriminatedClientTestBase, DiscriminatedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDiscriminatedDiscriminatedClientNoEnvelopeOperations(DiscriminatedClientTestBase): + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_no_envelope_discriminated_client_no_envelope_default_get( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_no_envelope.discriminated_client_no_envelope_default.get() + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_no_envelope_discriminated_client_no_envelope_default_put( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_no_envelope.discriminated_client_no_envelope_default.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_no_envelope_discriminated_client_no_envelope_custom_discriminator_get( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_no_envelope.discriminated_client_no_envelope_custom_discriminator.get() + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy + def test_discriminated_client_no_envelope_discriminated_client_no_envelope_custom_discriminator_put( + self, discriminated_endpoint + ): + client = self.create_client(endpoint=discriminated_endpoint) + response = client.discriminated_client_no_envelope.discriminated_client_no_envelope_custom_discriminator.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations_async.py new file mode 100644 index 0000000000..d751e9b95d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/generated_tests/test_discriminated_discriminated_client_no_envelope_operations_async.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import DiscriminatedPreparer +from testpreparer_async import DiscriminatedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestDiscriminatedDiscriminatedClientNoEnvelopeOperationsAsync(DiscriminatedClientTestBaseAsync): + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_no_envelope_discriminated_client_no_envelope_default_get( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = await client.discriminated_client_no_envelope.discriminated_client_no_envelope_default.get() + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_no_envelope_discriminated_client_no_envelope_default_put( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = await client.discriminated_client_no_envelope.discriminated_client_no_envelope_default.put( + input={"meow": bool, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_no_envelope_discriminated_client_no_envelope_custom_discriminator_get( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = ( + await client.discriminated_client_no_envelope.discriminated_client_no_envelope_custom_discriminator.get() + ) + + # please add some check logic here by yourself + # ... + + @DiscriminatedPreparer() + @recorded_by_proxy_async + async def test_discriminated_client_no_envelope_discriminated_client_no_envelope_custom_discriminator_put( + self, discriminated_endpoint + ): + client = self.create_async_client(endpoint=discriminated_endpoint) + response = ( + await client.discriminated_client_no_envelope.discriminated_client_no_envelope_custom_discriminator.put( + input={"meow": bool, "name": "str"}, + ) + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py index d66fd90ed0..e61c81c077 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py @@ -16,16 +16,18 @@ from ._configuration import DiscriminatedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import EnvelopeOperations, NoEnvelopeOperations +from .operations import DiscriminatedClientEnvelopeOperations, DiscriminatedClientNoEnvelopeOperations class DiscriminatedClient: # pylint: disable=client-accepts-api-version-keyword """Describe scenarios for discriminated unions. - :ivar envelope: EnvelopeOperations operations - :vartype envelope: typetest.discriminatedunion.operations.EnvelopeOperations - :ivar no_envelope: NoEnvelopeOperations operations - :vartype no_envelope: typetest.discriminatedunion.operations.NoEnvelopeOperations + :ivar discriminated_client_envelope: DiscriminatedClientEnvelopeOperations operations + :vartype discriminated_client_envelope: + typetest.discriminatedunion.operations.DiscriminatedClientEnvelopeOperations + :ivar discriminated_client_no_envelope: DiscriminatedClientNoEnvelopeOperations operations + :vartype discriminated_client_no_envelope: + typetest.discriminatedunion.operations.DiscriminatedClientNoEnvelopeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.envelope = EnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) - self.no_envelope = NoEnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope = DiscriminatedClientEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.discriminated_client_no_envelope = DiscriminatedClientNoEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py index 16a4710987..63e22fb25d 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py @@ -16,16 +16,18 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DiscriminatedClientConfiguration -from .operations import EnvelopeOperations, NoEnvelopeOperations +from .operations import DiscriminatedClientEnvelopeOperations, DiscriminatedClientNoEnvelopeOperations class DiscriminatedClient: # pylint: disable=client-accepts-api-version-keyword """Describe scenarios for discriminated unions. - :ivar envelope: EnvelopeOperations operations - :vartype envelope: typetest.discriminatedunion.aio.operations.EnvelopeOperations - :ivar no_envelope: NoEnvelopeOperations operations - :vartype no_envelope: typetest.discriminatedunion.aio.operations.NoEnvelopeOperations + :ivar discriminated_client_envelope: DiscriminatedClientEnvelopeOperations operations + :vartype discriminated_client_envelope: + typetest.discriminatedunion.aio.operations.DiscriminatedClientEnvelopeOperations + :ivar discriminated_client_no_envelope: DiscriminatedClientNoEnvelopeOperations operations + :vartype discriminated_client_no_envelope: + typetest.discriminatedunion.aio.operations.DiscriminatedClientNoEnvelopeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -58,8 +60,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.envelope = EnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) - self.no_envelope = NoEnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope = DiscriminatedClientEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.discriminated_client_no_envelope = DiscriminatedClientNoEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py index 26ad8396c5..aa6c7c3017 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import EnvelopeOperations # type: ignore -from ._operations import NoEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientNoEnvelopeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "EnvelopeOperations", - "NoEnvelopeOperations", + "DiscriminatedClientEnvelopeOperations", + "DiscriminatedClientNoEnvelopeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py index 6718070a2c..3a6d6b8026 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py @@ -29,14 +29,14 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_envelope_object_custom_properties_get_request, - build_envelope_object_custom_properties_put_request, - build_envelope_object_default_get_request, - build_envelope_object_default_put_request, - build_no_envelope_custom_discriminator_get_request, - build_no_envelope_custom_discriminator_put_request, - build_no_envelope_default_get_request, - build_no_envelope_default_put_request, + build_discriminated_client_envelope_object_custom_properties_get_request, + build_discriminated_client_envelope_object_custom_properties_put_request, + build_discriminated_client_envelope_object_default_get_request, + build_discriminated_client_envelope_object_default_put_request, + build_discriminated_client_no_envelope_custom_discriminator_get_request, + build_discriminated_client_no_envelope_custom_discriminator_put_request, + build_discriminated_client_no_envelope_default_get_request, + build_discriminated_client_no_envelope_default_put_request, ) from .._configuration import DiscriminatedClientConfiguration @@ -46,14 +46,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class EnvelopeOperations: +class DiscriminatedClientEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`envelope` attribute. + :attr:`discriminated_client_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -63,17 +63,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.object = EnvelopeObjectOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope_object = DiscriminatedClientEnvelopeObjectOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class NoEnvelopeOperations: +class DiscriminatedClientNoEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`no_envelope` attribute. + :attr:`discriminated_client_no_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -83,20 +85,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = NoEnvelopeDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_discriminator = NoEnvelopeCustomDiscriminatorOperations( + self.discriminated_client_no_envelope_default = DiscriminatedClientNoEnvelopeDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_no_envelope_custom_discriminator = ( + DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class EnvelopeObjectOperations: +class DiscriminatedClientEnvelopeObjectOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`object` attribute. + :attr:`discriminated_client_envelope_object` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,20 +112,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = EnvelopeObjectDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_properties = EnvelopeObjectCustomPropertiesOperations( + self.discriminated_client_envelope_object_default = DiscriminatedClientEnvelopeObjectDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_envelope_object_custom_properties = ( + DiscriminatedClientEnvelopeObjectCustomPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class NoEnvelopeDefaultOperations: +class DiscriminatedClientNoEnvelopeDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_no_envelope_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -152,7 +162,7 @@ async def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetInline"] = kwargs.pop("cls", None) - _request = build_no_envelope_default_get_request( + _request = build_discriminated_client_no_envelope_default_get_request( kind=kind, headers=_headers, params=_params, @@ -247,7 +257,7 @@ async def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInli content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_default_put_request( + _request = build_discriminated_client_no_envelope_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -285,14 +295,14 @@ async def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInli return deserialized # type: ignore -class NoEnvelopeCustomDiscriminatorOperations: +class DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`custom_discriminator` attribute. + :attr:`discriminated_client_no_envelope_custom_discriminator` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -325,7 +335,7 @@ async def get(self, *, type: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetInlineWithCustomDiscriminator"] = kwargs.pop("cls", None) - _request = build_no_envelope_custom_discriminator_get_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_get_request( type=type, headers=_headers, params=_params, @@ -422,7 +432,7 @@ async def put( content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_custom_discriminator_put_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_put_request( content_type=content_type, content=_content, headers=_headers, @@ -460,14 +470,14 @@ async def put( return deserialized # type: ignore -class EnvelopeObjectDefaultOperations: +class DiscriminatedClientEnvelopeObjectDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_envelope_object_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -500,7 +510,7 @@ async def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetWithEnvelope"] = kwargs.pop("cls", None) - _request = build_envelope_object_default_get_request( + _request = build_discriminated_client_envelope_object_default_get_request( kind=kind, headers=_headers, params=_params, @@ -595,7 +605,7 @@ async def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.P content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_default_put_request( + _request = build_discriminated_client_envelope_object_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -633,14 +643,14 @@ async def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.P return deserialized # type: ignore -class EnvelopeObjectCustomPropertiesOperations: +class DiscriminatedClientEnvelopeObjectCustomPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`custom_properties` attribute. + :attr:`discriminated_client_envelope_object_custom_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -673,7 +683,7 @@ async def get(self, *, pet_type: Optional[str] = None, **kwargs: Any) -> "_types cls: ClsType["_types.PetWithCustomNames"] = kwargs.pop("cls", None) - _request = build_envelope_object_custom_properties_get_request( + _request = build_discriminated_client_envelope_object_custom_properties_get_request( pet_type=pet_type, headers=_headers, params=_params, @@ -768,7 +778,7 @@ async def put(self, input: "_types.PetWithCustomNames", **kwargs: Any) -> "_type content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_custom_properties_put_request( + _request = build_discriminated_client_envelope_object_custom_properties_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py index 26ad8396c5..aa6c7c3017 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py @@ -12,16 +12,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import EnvelopeOperations # type: ignore -from ._operations import NoEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientNoEnvelopeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "EnvelopeOperations", - "NoEnvelopeOperations", + "DiscriminatedClientEnvelopeOperations", + "DiscriminatedClientNoEnvelopeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py index a64d87475d..c1f9cbd00c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py @@ -39,7 +39,9 @@ _SERIALIZER.client_side_validation = False -def build_no_envelope_default_get_request(*, kind: Optional[str] = None, **kwargs: Any) -> HttpRequest: +def build_discriminated_client_no_envelope_default_get_request( # pylint: disable=name-too-long + *, kind: Optional[str] = None, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -58,7 +60,9 @@ def build_no_envelope_default_get_request(*, kind: Optional[str] = None, **kwarg return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_no_envelope_default_put_request(**kwargs: Any) -> HttpRequest: +def build_discriminated_client_no_envelope_default_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -75,7 +79,7 @@ def build_no_envelope_default_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_no_envelope_custom_discriminator_get_request( # pylint: disable=name-too-long +def build_discriminated_client_no_envelope_custom_discriminator_get_request( # pylint: disable=name-too-long *, type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -96,7 +100,9 @@ def build_no_envelope_custom_discriminator_get_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_no_envelope_custom_discriminator_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_no_envelope_custom_discriminator_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -113,7 +119,7 @@ def build_no_envelope_custom_discriminator_put_request(**kwargs: Any) -> HttpReq return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_envelope_object_default_get_request( # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_default_get_request( # pylint: disable=name-too-long *, kind: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -134,7 +140,9 @@ def build_envelope_object_default_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_envelope_object_default_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_default_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -151,7 +159,7 @@ def build_envelope_object_default_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_envelope_object_custom_properties_get_request( # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_custom_properties_get_request( # pylint: disable=name-too-long *, pet_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -172,7 +180,9 @@ def build_envelope_object_custom_properties_get_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_envelope_object_custom_properties_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_custom_properties_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -189,14 +199,14 @@ def build_envelope_object_custom_properties_put_request(**kwargs: Any) -> HttpRe return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class EnvelopeOperations: +class DiscriminatedClientEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`envelope` attribute. + :attr:`discriminated_client_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -206,17 +216,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.object = EnvelopeObjectOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope_object = DiscriminatedClientEnvelopeObjectOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class NoEnvelopeOperations: +class DiscriminatedClientNoEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`no_envelope` attribute. + :attr:`discriminated_client_no_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -226,20 +238,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = NoEnvelopeDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_discriminator = NoEnvelopeCustomDiscriminatorOperations( + self.discriminated_client_no_envelope_default = DiscriminatedClientNoEnvelopeDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_no_envelope_custom_discriminator = ( + DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class EnvelopeObjectOperations: +class DiscriminatedClientEnvelopeObjectOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`object` attribute. + :attr:`discriminated_client_envelope_object` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -249,20 +265,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = EnvelopeObjectDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_properties = EnvelopeObjectCustomPropertiesOperations( + self.discriminated_client_envelope_object_default = DiscriminatedClientEnvelopeObjectDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_envelope_object_custom_properties = ( + DiscriminatedClientEnvelopeObjectCustomPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class NoEnvelopeDefaultOperations: +class DiscriminatedClientNoEnvelopeDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_no_envelope_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -295,7 +315,7 @@ def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.PetInline cls: ClsType["_types.PetInline"] = kwargs.pop("cls", None) - _request = build_no_envelope_default_get_request( + _request = build_discriminated_client_no_envelope_default_get_request( kind=kind, headers=_headers, params=_params, @@ -386,7 +406,7 @@ def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInline": content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_default_put_request( + _request = build_discriminated_client_no_envelope_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -424,14 +444,14 @@ def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInline": return deserialized # type: ignore -class NoEnvelopeCustomDiscriminatorOperations: +class DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`custom_discriminator` attribute. + :attr:`discriminated_client_no_envelope_custom_discriminator` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -464,7 +484,7 @@ def get(self, *, type: Optional[str] = None, **kwargs: Any) -> "_types.PetInline cls: ClsType["_types.PetInlineWithCustomDiscriminator"] = kwargs.pop("cls", None) - _request = build_no_envelope_custom_discriminator_get_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_get_request( type=type, headers=_headers, params=_params, @@ -561,7 +581,7 @@ def put( content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_custom_discriminator_put_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_put_request( content_type=content_type, content=_content, headers=_headers, @@ -599,14 +619,14 @@ def put( return deserialized # type: ignore -class EnvelopeObjectDefaultOperations: +class DiscriminatedClientEnvelopeObjectDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_envelope_object_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -639,7 +659,7 @@ def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.PetWithEn cls: ClsType["_types.PetWithEnvelope"] = kwargs.pop("cls", None) - _request = build_envelope_object_default_get_request( + _request = build_discriminated_client_envelope_object_default_get_request( kind=kind, headers=_headers, params=_params, @@ -734,7 +754,7 @@ def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.PetWith content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_default_put_request( + _request = build_discriminated_client_envelope_object_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -772,14 +792,14 @@ def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.PetWith return deserialized # type: ignore -class EnvelopeObjectCustomPropertiesOperations: +class DiscriminatedClientEnvelopeObjectCustomPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`custom_properties` attribute. + :attr:`discriminated_client_envelope_object_custom_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -812,7 +832,7 @@ def get(self, *, pet_type: Optional[str] = None, **kwargs: Any) -> "_types.PetWi cls: ClsType["_types.PetWithCustomNames"] = kwargs.pop("cls", None) - _request = build_envelope_object_custom_properties_get_request( + _request = build_discriminated_client_envelope_object_custom_properties_get_request( pet_type=pet_type, headers=_headers, params=_params, @@ -907,7 +927,7 @@ def put(self, input: "_types.PetWithCustomNames", **kwargs: Any) -> "_types.PetW content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_custom_properties_put_request( + _request = build_discriminated_client_envelope_object_custom_properties_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/apiview-properties.json index 03bd541218..d3adb97d41 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/apiview-properties.json @@ -2,13 +2,13 @@ "CrossLanguagePackageId": "Type.Enum.Extensible", "CrossLanguageDefinitionId": { "typetest.enum.extensible.models.DaysOfWeekExtensibleEnum": "Type.Enum.Extensible.DaysOfWeekExtensibleEnum", - "typetest.enum.extensible.operations.StringOperations.get_known_value": "Type.Enum.Extensible.String.getKnownValue", - "typetest.enum.extensible.aio.operations.StringOperations.get_known_value": "Type.Enum.Extensible.String.getKnownValue", - "typetest.enum.extensible.operations.StringOperations.get_unknown_value": "Type.Enum.Extensible.String.getUnknownValue", - "typetest.enum.extensible.aio.operations.StringOperations.get_unknown_value": "Type.Enum.Extensible.String.getUnknownValue", - "typetest.enum.extensible.operations.StringOperations.put_known_value": "Type.Enum.Extensible.String.putKnownValue", - "typetest.enum.extensible.aio.operations.StringOperations.put_known_value": "Type.Enum.Extensible.String.putKnownValue", - "typetest.enum.extensible.operations.StringOperations.put_unknown_value": "Type.Enum.Extensible.String.putUnknownValue", - "typetest.enum.extensible.aio.operations.StringOperations.put_unknown_value": "Type.Enum.Extensible.String.putUnknownValue" + "typetest.enum.extensible.operations.ExtensibleClientStringOperations.get_known_value": "Type.Enum.Extensible.String.getKnownValue", + "typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations.get_known_value": "Type.Enum.Extensible.String.getKnownValue", + "typetest.enum.extensible.operations.ExtensibleClientStringOperations.get_unknown_value": "Type.Enum.Extensible.String.getUnknownValue", + "typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations.get_unknown_value": "Type.Enum.Extensible.String.getUnknownValue", + "typetest.enum.extensible.operations.ExtensibleClientStringOperations.put_known_value": "Type.Enum.Extensible.String.putKnownValue", + "typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations.put_known_value": "Type.Enum.Extensible.String.putKnownValue", + "typetest.enum.extensible.operations.ExtensibleClientStringOperations.put_unknown_value": "Type.Enum.Extensible.String.putUnknownValue", + "typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations.put_unknown_value": "Type.Enum.Extensible.String.putUnknownValue" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations.py new file mode 100644 index 0000000000..61b2d047f6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ExtensibleClientTestBase, ExtensiblePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestExtensibleExtensibleClientStringOperations(ExtensibleClientTestBase): + @ExtensiblePreparer() + @recorded_by_proxy + def test_extensible_client_string_get_known_value(self, extensible_endpoint): + client = self.create_client(endpoint=extensible_endpoint) + response = client.extensible_client_string.get_known_value() + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy + def test_extensible_client_string_get_unknown_value(self, extensible_endpoint): + client = self.create_client(endpoint=extensible_endpoint) + response = client.extensible_client_string.get_unknown_value() + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy + def test_extensible_client_string_put_known_value(self, extensible_endpoint): + client = self.create_client(endpoint=extensible_endpoint) + response = client.extensible_client_string.put_known_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy + def test_extensible_client_string_put_unknown_value(self, extensible_endpoint): + client = self.create_client(endpoint=extensible_endpoint) + response = client.extensible_client_string.put_unknown_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations_async.py new file mode 100644 index 0000000000..ec4e2ad072 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/generated_tests/test_extensible_extensible_client_string_operations_async.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ExtensiblePreparer +from testpreparer_async import ExtensibleClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestExtensibleExtensibleClientStringOperationsAsync(ExtensibleClientTestBaseAsync): + @ExtensiblePreparer() + @recorded_by_proxy_async + async def test_extensible_client_string_get_known_value(self, extensible_endpoint): + client = self.create_async_client(endpoint=extensible_endpoint) + response = await client.extensible_client_string.get_known_value() + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy_async + async def test_extensible_client_string_get_unknown_value(self, extensible_endpoint): + client = self.create_async_client(endpoint=extensible_endpoint) + response = await client.extensible_client_string.get_unknown_value() + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy_async + async def test_extensible_client_string_put_known_value(self, extensible_endpoint): + client = self.create_async_client(endpoint=extensible_endpoint) + response = await client.extensible_client_string.put_known_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ExtensiblePreparer() + @recorded_by_proxy_async + async def test_extensible_client_string_put_unknown_value(self, extensible_endpoint): + client = self.create_async_client(endpoint=extensible_endpoint) + response = await client.extensible_client_string.put_unknown_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py index 19c0cf5248..e0a146c82f 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py @@ -16,14 +16,15 @@ from ._configuration import ExtensibleClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import StringOperations +from .operations import ExtensibleClientStringOperations class ExtensibleClient: # pylint: disable=client-accepts-api-version-keyword """ExtensibleClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.extensible.operations.StringOperations + :ivar extensible_client_string: ExtensibleClientStringOperations operations + :vartype extensible_client_string: + typetest.enum.extensible.operations.ExtensibleClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensible_client_string = ExtensibleClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py index 933280b471..b592fe4d69 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py @@ -16,14 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ExtensibleClientConfiguration -from .operations import StringOperations +from .operations import ExtensibleClientStringOperations class ExtensibleClient: # pylint: disable=client-accepts-api-version-keyword """ExtensibleClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.extensible.aio.operations.StringOperations + :ivar extensible_client_string: ExtensibleClientStringOperations operations + :vartype extensible_client_string: + typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +57,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensible_client_string = ExtensibleClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py index 572d8fdb9f..4791c1b7ec 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import ExtensibleClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "ExtensibleClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py index 44fe31559c..2e5c1d56c0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py @@ -29,10 +29,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_string_get_known_value_request, - build_string_get_unknown_value_request, - build_string_put_known_value_request, - build_string_put_unknown_value_request, + build_extensible_client_string_get_known_value_request, + build_extensible_client_string_get_unknown_value_request, + build_extensible_client_string_put_known_value_request, + build_extensible_client_string_put_unknown_value_request, ) from .._configuration import ExtensibleClientConfiguration @@ -40,14 +40,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class ExtensibleClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.extensible.aio.ExtensibleClient`'s - :attr:`string` attribute. + :attr:`extensible_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -78,7 +78,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_extensible_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -137,7 +137,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_unknown_value_request( + _request = build_extensible_client_string_get_unknown_value_request( headers=_headers, params=_params, ) @@ -202,7 +202,7 @@ async def put_known_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnu _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_extensible_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -254,7 +254,7 @@ async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekExtensibleE _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_extensible_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py index 572d8fdb9f..4791c1b7ec 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import ExtensibleClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "ExtensibleClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py index e243e41ae5..ffc7cab651 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py @@ -37,7 +37,9 @@ _SERIALIZER.client_side_validation = False -def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_get_known_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -51,7 +53,9 @@ def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_get_unknown_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -65,7 +69,9 @@ def build_string_get_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_put_known_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -78,7 +84,9 @@ def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_put_unknown_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -91,14 +99,14 @@ def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class ExtensibleClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.extensible.ExtensibleClient`'s - :attr:`string` attribute. + :attr:`extensible_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -129,7 +137,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExtensi cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_extensible_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -188,7 +196,7 @@ def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExten cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_unknown_value_request( + _request = build_extensible_client_string_get_unknown_value_request( headers=_headers, params=_params, ) @@ -255,7 +263,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_extensible_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -309,7 +317,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_extensible_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/apiview-properties.json index a76b7f66d6..b286fcb819 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/apiview-properties.json @@ -2,11 +2,11 @@ "CrossLanguagePackageId": "Type.Enum.Fixed", "CrossLanguageDefinitionId": { "typetest.enum.fixed.models.DaysOfWeekEnum": "Type.Enum.Fixed.DaysOfWeekEnum", - "typetest.enum.fixed.operations.StringOperations.get_known_value": "Type.Enum.Fixed.String.getKnownValue", - "typetest.enum.fixed.aio.operations.StringOperations.get_known_value": "Type.Enum.Fixed.String.getKnownValue", - "typetest.enum.fixed.operations.StringOperations.put_known_value": "Type.Enum.Fixed.String.putKnownValue", - "typetest.enum.fixed.aio.operations.StringOperations.put_known_value": "Type.Enum.Fixed.String.putKnownValue", - "typetest.enum.fixed.operations.StringOperations.put_unknown_value": "Type.Enum.Fixed.String.putUnknownValue", - "typetest.enum.fixed.aio.operations.StringOperations.put_unknown_value": "Type.Enum.Fixed.String.putUnknownValue" + "typetest.enum.fixed.operations.FixedClientStringOperations.get_known_value": "Type.Enum.Fixed.String.getKnownValue", + "typetest.enum.fixed.aio.operations.FixedClientStringOperations.get_known_value": "Type.Enum.Fixed.String.getKnownValue", + "typetest.enum.fixed.operations.FixedClientStringOperations.put_known_value": "Type.Enum.Fixed.String.putKnownValue", + "typetest.enum.fixed.aio.operations.FixedClientStringOperations.put_known_value": "Type.Enum.Fixed.String.putKnownValue", + "typetest.enum.fixed.operations.FixedClientStringOperations.put_unknown_value": "Type.Enum.Fixed.String.putUnknownValue", + "typetest.enum.fixed.aio.operations.FixedClientStringOperations.put_unknown_value": "Type.Enum.Fixed.String.putUnknownValue" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations.py new file mode 100644 index 0000000000..7754b984f1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import FixedClientTestBase, FixedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFixedFixedClientStringOperations(FixedClientTestBase): + @FixedPreparer() + @recorded_by_proxy + def test_fixed_client_string_get_known_value(self, fixed_endpoint): + client = self.create_client(endpoint=fixed_endpoint) + response = client.fixed_client_string.get_known_value() + + # please add some check logic here by yourself + # ... + + @FixedPreparer() + @recorded_by_proxy + def test_fixed_client_string_put_known_value(self, fixed_endpoint): + client = self.create_client(endpoint=fixed_endpoint) + response = client.fixed_client_string.put_known_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @FixedPreparer() + @recorded_by_proxy + def test_fixed_client_string_put_unknown_value(self, fixed_endpoint): + client = self.create_client(endpoint=fixed_endpoint) + response = client.fixed_client_string.put_unknown_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations_async.py new file mode 100644 index 0000000000..cc469927cf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/generated_tests/test_fixed_fixed_client_string_operations_async.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import FixedPreparer +from testpreparer_async import FixedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestFixedFixedClientStringOperationsAsync(FixedClientTestBaseAsync): + @FixedPreparer() + @recorded_by_proxy_async + async def test_fixed_client_string_get_known_value(self, fixed_endpoint): + client = self.create_async_client(endpoint=fixed_endpoint) + response = await client.fixed_client_string.get_known_value() + + # please add some check logic here by yourself + # ... + + @FixedPreparer() + @recorded_by_proxy_async + async def test_fixed_client_string_put_known_value(self, fixed_endpoint): + client = self.create_async_client(endpoint=fixed_endpoint) + response = await client.fixed_client_string.put_known_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @FixedPreparer() + @recorded_by_proxy_async + async def test_fixed_client_string_put_unknown_value(self, fixed_endpoint): + client = self.create_async_client(endpoint=fixed_endpoint) + response = await client.fixed_client_string.put_unknown_value( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py index 5d64b8956b..fd12bdeb65 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py @@ -16,14 +16,14 @@ from ._configuration import FixedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import StringOperations +from .operations import FixedClientStringOperations class FixedClient: # pylint: disable=client-accepts-api-version-keyword """FixedClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.fixed.operations.StringOperations + :ivar fixed_client_string: FixedClientStringOperations operations + :vartype fixed_client_string: typetest.enum.fixed.operations.FixedClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.fixed_client_string = FixedClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py index dcca3ee6ef..d0078146c6 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py @@ -16,14 +16,14 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import FixedClientConfiguration -from .operations import StringOperations +from .operations import FixedClientStringOperations class FixedClient: # pylint: disable=client-accepts-api-version-keyword """FixedClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.fixed.aio.operations.StringOperations + :ivar fixed_client_string: FixedClientStringOperations operations + :vartype fixed_client_string: typetest.enum.fixed.aio.operations.FixedClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -56,7 +56,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.fixed_client_string = FixedClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py index 572d8fdb9f..1eafb659d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import FixedClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "FixedClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py index 95e7df54dd..c340d5df3b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py @@ -29,9 +29,9 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_string_get_known_value_request, - build_string_put_known_value_request, - build_string_put_unknown_value_request, + build_fixed_client_string_get_known_value_request, + build_fixed_client_string_put_known_value_request, + build_fixed_client_string_put_unknown_value_request, ) from .._configuration import FixedClientConfiguration @@ -39,14 +39,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class FixedClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.fixed.aio.FixedClient`'s - :attr:`string` attribute. + :attr:`fixed_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -77,7 +77,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE cls: ClsType[Union[str, _models.DaysOfWeekEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_fixed_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -142,7 +142,7 @@ async def put_known_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwar _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_fixed_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -194,7 +194,7 @@ async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekEnum], **kw _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_fixed_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py index 572d8fdb9f..1eafb659d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py @@ -12,14 +12,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import FixedClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "FixedClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py index 58ec6a955d..687e688528 100644 --- a/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py @@ -37,7 +37,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_get_known_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -51,7 +51,7 @@ def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_put_known_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -64,7 +64,7 @@ def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -77,14 +77,14 @@ def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class FixedClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.fixed.FixedClient`'s - :attr:`string` attribute. + :attr:`fixed_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -115,7 +115,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekEnum]: cls: ClsType[Union[str, _models.DaysOfWeekEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_fixed_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -182,7 +182,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_fixed_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -236,7 +236,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_fixed_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/apiview-properties.json index e3374cfe24..f2cac9de37 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/apiview-properties.json @@ -38,129 +38,129 @@ "typetest.property.additionalproperties.models.WidgetData0": "Type.Property.AdditionalProperties.WidgetData0", "typetest.property.additionalproperties.models.WidgetData1": "Type.Property.AdditionalProperties.WidgetData1", "typetest.property.additionalproperties.models.WidgetData2": "Type.Property.AdditionalProperties.WidgetData2", - "typetest.property.additionalproperties.operations.ExtendsUnknownOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknown.get", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknown.get", - "typetest.property.additionalproperties.operations.ExtendsUnknownOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknown.put", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknown.put", - "typetest.property.additionalproperties.operations.ExtendsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get", - "typetest.property.additionalproperties.operations.ExtendsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.put", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.put", - "typetest.property.additionalproperties.operations.ExtendsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get", - "typetest.property.additionalproperties.operations.ExtendsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.put", - "typetest.property.additionalproperties.aio.operations.ExtendsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.put", - "typetest.property.additionalproperties.operations.IsUnknownOperations.get": "Type.Property.AdditionalProperties.IsUnknown.get", - "typetest.property.additionalproperties.aio.operations.IsUnknownOperations.get": "Type.Property.AdditionalProperties.IsUnknown.get", - "typetest.property.additionalproperties.operations.IsUnknownOperations.put": "Type.Property.AdditionalProperties.IsUnknown.put", - "typetest.property.additionalproperties.aio.operations.IsUnknownOperations.put": "Type.Property.AdditionalProperties.IsUnknown.put", - "typetest.property.additionalproperties.operations.IsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDerived.get", - "typetest.property.additionalproperties.aio.operations.IsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDerived.get", - "typetest.property.additionalproperties.operations.IsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDerived.put", - "typetest.property.additionalproperties.aio.operations.IsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDerived.put", - "typetest.property.additionalproperties.operations.IsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get", - "typetest.property.additionalproperties.aio.operations.IsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get", - "typetest.property.additionalproperties.operations.IsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.put", - "typetest.property.additionalproperties.aio.operations.IsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.put", - "typetest.property.additionalproperties.operations.ExtendsStringOperations.get": "Type.Property.AdditionalProperties.ExtendsString.get", - "typetest.property.additionalproperties.aio.operations.ExtendsStringOperations.get": "Type.Property.AdditionalProperties.ExtendsString.get", - "typetest.property.additionalproperties.operations.ExtendsStringOperations.put": "Type.Property.AdditionalProperties.ExtendsString.put", - "typetest.property.additionalproperties.aio.operations.ExtendsStringOperations.put": "Type.Property.AdditionalProperties.ExtendsString.put", - "typetest.property.additionalproperties.operations.IsStringOperations.get": "Type.Property.AdditionalProperties.IsString.get", - "typetest.property.additionalproperties.aio.operations.IsStringOperations.get": "Type.Property.AdditionalProperties.IsString.get", - "typetest.property.additionalproperties.operations.IsStringOperations.put": "Type.Property.AdditionalProperties.IsString.put", - "typetest.property.additionalproperties.aio.operations.IsStringOperations.put": "Type.Property.AdditionalProperties.IsString.put", - "typetest.property.additionalproperties.operations.SpreadStringOperations.get": "Type.Property.AdditionalProperties.SpreadString.get", - "typetest.property.additionalproperties.aio.operations.SpreadStringOperations.get": "Type.Property.AdditionalProperties.SpreadString.get", - "typetest.property.additionalproperties.operations.SpreadStringOperations.put": "Type.Property.AdditionalProperties.SpreadString.put", - "typetest.property.additionalproperties.aio.operations.SpreadStringOperations.put": "Type.Property.AdditionalProperties.SpreadString.put", - "typetest.property.additionalproperties.operations.ExtendsFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsFloat.get", - "typetest.property.additionalproperties.aio.operations.ExtendsFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsFloat.get", - "typetest.property.additionalproperties.operations.ExtendsFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsFloat.put", - "typetest.property.additionalproperties.aio.operations.ExtendsFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsFloat.put", - "typetest.property.additionalproperties.operations.IsFloatOperations.get": "Type.Property.AdditionalProperties.IsFloat.get", - "typetest.property.additionalproperties.aio.operations.IsFloatOperations.get": "Type.Property.AdditionalProperties.IsFloat.get", - "typetest.property.additionalproperties.operations.IsFloatOperations.put": "Type.Property.AdditionalProperties.IsFloat.put", - "typetest.property.additionalproperties.aio.operations.IsFloatOperations.put": "Type.Property.AdditionalProperties.IsFloat.put", - "typetest.property.additionalproperties.operations.SpreadFloatOperations.get": "Type.Property.AdditionalProperties.SpreadFloat.get", - "typetest.property.additionalproperties.aio.operations.SpreadFloatOperations.get": "Type.Property.AdditionalProperties.SpreadFloat.get", - "typetest.property.additionalproperties.operations.SpreadFloatOperations.put": "Type.Property.AdditionalProperties.SpreadFloat.put", - "typetest.property.additionalproperties.aio.operations.SpreadFloatOperations.put": "Type.Property.AdditionalProperties.SpreadFloat.put", - "typetest.property.additionalproperties.operations.ExtendsModelOperations.get": "Type.Property.AdditionalProperties.ExtendsModel.get", - "typetest.property.additionalproperties.aio.operations.ExtendsModelOperations.get": "Type.Property.AdditionalProperties.ExtendsModel.get", - "typetest.property.additionalproperties.operations.ExtendsModelOperations.put": "Type.Property.AdditionalProperties.ExtendsModel.put", - "typetest.property.additionalproperties.aio.operations.ExtendsModelOperations.put": "Type.Property.AdditionalProperties.ExtendsModel.put", - "typetest.property.additionalproperties.operations.IsModelOperations.get": "Type.Property.AdditionalProperties.IsModel.get", - "typetest.property.additionalproperties.aio.operations.IsModelOperations.get": "Type.Property.AdditionalProperties.IsModel.get", - "typetest.property.additionalproperties.operations.IsModelOperations.put": "Type.Property.AdditionalProperties.IsModel.put", - "typetest.property.additionalproperties.aio.operations.IsModelOperations.put": "Type.Property.AdditionalProperties.IsModel.put", - "typetest.property.additionalproperties.operations.SpreadModelOperations.get": "Type.Property.AdditionalProperties.SpreadModel.get", - "typetest.property.additionalproperties.aio.operations.SpreadModelOperations.get": "Type.Property.AdditionalProperties.SpreadModel.get", - "typetest.property.additionalproperties.operations.SpreadModelOperations.put": "Type.Property.AdditionalProperties.SpreadModel.put", - "typetest.property.additionalproperties.aio.operations.SpreadModelOperations.put": "Type.Property.AdditionalProperties.SpreadModel.put", - "typetest.property.additionalproperties.operations.ExtendsModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsModelArray.get", - "typetest.property.additionalproperties.aio.operations.ExtendsModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsModelArray.get", - "typetest.property.additionalproperties.operations.ExtendsModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsModelArray.put", - "typetest.property.additionalproperties.aio.operations.ExtendsModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsModelArray.put", - "typetest.property.additionalproperties.operations.IsModelArrayOperations.get": "Type.Property.AdditionalProperties.IsModelArray.get", - "typetest.property.additionalproperties.aio.operations.IsModelArrayOperations.get": "Type.Property.AdditionalProperties.IsModelArray.get", - "typetest.property.additionalproperties.operations.IsModelArrayOperations.put": "Type.Property.AdditionalProperties.IsModelArray.put", - "typetest.property.additionalproperties.aio.operations.IsModelArrayOperations.put": "Type.Property.AdditionalProperties.IsModelArray.put", - "typetest.property.additionalproperties.operations.SpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadModelArray.get", - "typetest.property.additionalproperties.aio.operations.SpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadModelArray.get", - "typetest.property.additionalproperties.operations.SpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadModelArray.put", - "typetest.property.additionalproperties.aio.operations.SpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadModelArray.put", - "typetest.property.additionalproperties.operations.SpreadDifferentStringOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentString.get", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentStringOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentString.get", - "typetest.property.additionalproperties.operations.SpreadDifferentStringOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentString.put", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentStringOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentString.put", - "typetest.property.additionalproperties.operations.SpreadDifferentFloatOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentFloatOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get", - "typetest.property.additionalproperties.operations.SpreadDifferentFloatOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentFloat.put", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentFloatOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentFloat.put", - "typetest.property.additionalproperties.operations.SpreadDifferentModelOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModel.get", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentModelOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModel.get", - "typetest.property.additionalproperties.operations.SpreadDifferentModelOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModel.put", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentModelOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModel.put", - "typetest.property.additionalproperties.operations.SpreadDifferentModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get", - "typetest.property.additionalproperties.operations.SpreadDifferentModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.put", - "typetest.property.additionalproperties.aio.operations.SpreadDifferentModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.put", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadStringOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadStringOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadStringOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.put", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadStringOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.put", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.put", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.put", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.put", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.put", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get", - "typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.put", - "typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.put", - "typetest.property.additionalproperties.operations.MultipleSpreadOperations.get": "Type.Property.AdditionalProperties.MultipleSpread.get", - "typetest.property.additionalproperties.aio.operations.MultipleSpreadOperations.get": "Type.Property.AdditionalProperties.MultipleSpread.get", - "typetest.property.additionalproperties.operations.MultipleSpreadOperations.put": "Type.Property.AdditionalProperties.MultipleSpread.put", - "typetest.property.additionalproperties.aio.operations.MultipleSpreadOperations.put": "Type.Property.AdditionalProperties.MultipleSpread.put", - "typetest.property.additionalproperties.operations.SpreadRecordUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordUnion.get", - "typetest.property.additionalproperties.aio.operations.SpreadRecordUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordUnion.get", - "typetest.property.additionalproperties.operations.SpreadRecordUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordUnion.put", - "typetest.property.additionalproperties.aio.operations.SpreadRecordUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordUnion.put", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.put", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.put", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion2Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.get", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion2Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.get", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion2Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.put", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion2Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.put", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion3Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion3Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get", - "typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion3Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.put", - "typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion3Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.put" + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknown.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknown.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknown.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknown.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownOperations.get": "Type.Property.AdditionalProperties.IsUnknown.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownOperations.get": "Type.Property.AdditionalProperties.IsUnknown.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownOperations.put": "Type.Property.AdditionalProperties.IsUnknown.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownOperations.put": "Type.Property.AdditionalProperties.IsUnknown.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDerived.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDerivedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDerived.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDerived.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDerivedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDerived.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations.get": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations.put": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsStringOperations.get": "Type.Property.AdditionalProperties.ExtendsString.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsStringOperations.get": "Type.Property.AdditionalProperties.ExtendsString.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsStringOperations.put": "Type.Property.AdditionalProperties.ExtendsString.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsStringOperations.put": "Type.Property.AdditionalProperties.ExtendsString.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsStringOperations.get": "Type.Property.AdditionalProperties.IsString.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsStringOperations.get": "Type.Property.AdditionalProperties.IsString.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsStringOperations.put": "Type.Property.AdditionalProperties.IsString.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsStringOperations.put": "Type.Property.AdditionalProperties.IsString.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadStringOperations.get": "Type.Property.AdditionalProperties.SpreadString.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadStringOperations.get": "Type.Property.AdditionalProperties.SpreadString.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadStringOperations.put": "Type.Property.AdditionalProperties.SpreadString.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadStringOperations.put": "Type.Property.AdditionalProperties.SpreadString.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsFloat.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsFloat.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsFloat.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsFloat.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsFloatOperations.get": "Type.Property.AdditionalProperties.IsFloat.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsFloatOperations.get": "Type.Property.AdditionalProperties.IsFloat.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsFloatOperations.put": "Type.Property.AdditionalProperties.IsFloat.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsFloatOperations.put": "Type.Property.AdditionalProperties.IsFloat.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadFloatOperations.get": "Type.Property.AdditionalProperties.SpreadFloat.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadFloatOperations.get": "Type.Property.AdditionalProperties.SpreadFloat.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadFloatOperations.put": "Type.Property.AdditionalProperties.SpreadFloat.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadFloatOperations.put": "Type.Property.AdditionalProperties.SpreadFloat.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelOperations.get": "Type.Property.AdditionalProperties.ExtendsModel.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelOperations.get": "Type.Property.AdditionalProperties.ExtendsModel.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelOperations.put": "Type.Property.AdditionalProperties.ExtendsModel.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelOperations.put": "Type.Property.AdditionalProperties.ExtendsModel.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelOperations.get": "Type.Property.AdditionalProperties.IsModel.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelOperations.get": "Type.Property.AdditionalProperties.IsModel.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelOperations.put": "Type.Property.AdditionalProperties.IsModel.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelOperations.put": "Type.Property.AdditionalProperties.IsModel.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelOperations.get": "Type.Property.AdditionalProperties.SpreadModel.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelOperations.get": "Type.Property.AdditionalProperties.SpreadModel.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelOperations.put": "Type.Property.AdditionalProperties.SpreadModel.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelOperations.put": "Type.Property.AdditionalProperties.SpreadModel.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsModelArray.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsModelArray.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsModelArray.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsModelArray.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelArrayOperations.get": "Type.Property.AdditionalProperties.IsModelArray.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelArrayOperations.get": "Type.Property.AdditionalProperties.IsModelArray.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelArrayOperations.put": "Type.Property.AdditionalProperties.IsModelArray.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelArrayOperations.put": "Type.Property.AdditionalProperties.IsModelArray.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadModelArray.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadModelArray.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadModelArray.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadModelArray.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentStringOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentString.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentStringOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentString.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentStringOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentString.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentStringOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentString.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentFloat.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentFloat.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModel.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModel.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModel.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModel.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations.get": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations.put": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations.get": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations.put": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientMultipleSpreadOperations.get": "Type.Property.AdditionalProperties.MultipleSpread.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientMultipleSpreadOperations.get": "Type.Property.AdditionalProperties.MultipleSpread.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientMultipleSpreadOperations.put": "Type.Property.AdditionalProperties.MultipleSpread.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientMultipleSpreadOperations.put": "Type.Property.AdditionalProperties.MultipleSpread.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordUnion.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordUnion.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordUnion.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordUnion.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2.put", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations.get": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get", + "typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.put", + "typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations.put": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.put" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations.py new file mode 100644 index 0000000000..699f8390be --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadFloatOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_float_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_float_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_float.put( + body={"derivedProp": 0.0, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations_async.py new file mode 100644 index 0000000000..3321650572 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_float_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadFloatOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_float_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_float_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_float.put( + body={"derivedProp": 0.0, "name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations.py new file mode 100644 index 0000000000..591b0c6895 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_model_array_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_model_array_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_model_array.put( + body={"derivedProp": [{"state": "str"}], "knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations_async.py new file mode 100644 index 0000000000..b511e77e2a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_array_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_model_array_get( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_model_array_put( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_model_array.put( + body={"derivedProp": [{"state": "str"}], "knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations.py new file mode 100644 index 0000000000..7c26b4b555 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadModelOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_model_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_model_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_model.put( + body={"derivedProp": {"state": "str"}, "knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations_async.py new file mode 100644 index 0000000000..db8b9b6ee6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_model_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadModelOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_model_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_model_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_model.put( + body={"derivedProp": {"state": "str"}, "knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations.py new file mode 100644 index 0000000000..f33d6cc99a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadStringOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_string_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_different_spread_string_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_different_spread_string.put( + body={"derivedProp": "str", "id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations_async.py new file mode 100644 index 0000000000..1df3ab484d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_different_spread_string_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsDifferentSpreadStringOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_string_get( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_different_spread_string_put( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_different_spread_string.put( + body={"derivedProp": "str", "id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations.py new file mode 100644 index 0000000000..4a1db1be5f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsFloatOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_float_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_float_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations_async.py new file mode 100644 index 0000000000..ea2ba0210f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_float_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsFloatOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_float_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_float_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations.py new file mode 100644 index 0000000000..30c64bd366 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsModelArrayOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_model_array_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_model_array_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations_async.py new file mode 100644 index 0000000000..674c1df6c2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_array_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsModelArrayOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_model_array_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_model_array_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations.py new file mode 100644 index 0000000000..c97922947c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsModelOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_model_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_model_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations_async.py new file mode 100644 index 0000000000..add0444efe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_model_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsModelOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_model_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_model_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations.py new file mode 100644 index 0000000000..98ce0ab996 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsStringOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_string_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_string_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations_async.py new file mode 100644 index 0000000000..71b0b4513a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_string_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsStringOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_string_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_string_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations.py new file mode 100644 index 0000000000..86a86462a9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownDerivedOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_derived_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown_derived.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_derived_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown_derived.put( + body={"index": 0, "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations_async.py new file mode 100644 index 0000000000..cc728817b0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_derived_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownDerivedOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_derived_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown_derived.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_derived_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown_derived.put( + body={"index": 0, "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations.py new file mode 100644 index 0000000000..029f673d3d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownDiscriminatedOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_discriminated_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown_discriminated.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_discriminated_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown_discriminated.put( + body={"index": 0, "kind": "derived", "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations_async.py new file mode 100644 index 0000000000..0b290e8feb --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_discriminated_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownDiscriminatedOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_discriminated_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown_discriminated.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_discriminated_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown_discriminated.put( + body={"index": 0, "kind": "derived", "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations.py new file mode 100644 index 0000000000..702149811e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_extends_unknown_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_extends_unknown.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations_async.py new file mode 100644 index 0000000000..505407143d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_extends_unknown_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientExtendsUnknownOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_extends_unknown_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_extends_unknown.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations.py new file mode 100644 index 0000000000..b1526ba5cf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsFloatOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_float_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_float_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations_async.py new file mode 100644 index 0000000000..9bf25decac --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_float_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsFloatOperationsAsync(AdditionalPropertiesClientTestBaseAsync): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_float_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_float_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations.py new file mode 100644 index 0000000000..15e2f26ad3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsModelArrayOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_model_array_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_model_array_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations_async.py new file mode 100644 index 0000000000..e13ee8bd10 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_array_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsModelArrayOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_model_array_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_model_array_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations.py new file mode 100644 index 0000000000..e8bedf2fac --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsModelOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_model_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_model_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations_async.py new file mode 100644 index 0000000000..98966d0e7c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_model_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsModelOperationsAsync(AdditionalPropertiesClientTestBaseAsync): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_model_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_model_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations.py new file mode 100644 index 0000000000..5279350945 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsStringOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_string_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_string_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations_async.py new file mode 100644 index 0000000000..6fc652c44a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_string_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsStringOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_string_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_string_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations.py new file mode 100644 index 0000000000..6e504d52fc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownDerivedOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_derived_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown_derived.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_derived_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown_derived.put( + body={"index": 0, "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations_async.py new file mode 100644 index 0000000000..4e95cbee8e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_derived_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownDerivedOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_derived_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown_derived.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_derived_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown_derived.put( + body={"index": 0, "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations.py new file mode 100644 index 0000000000..36243cbae8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownDiscriminatedOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_discriminated_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown_discriminated.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_discriminated_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown_discriminated.put( + body={"index": 0, "kind": "derived", "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations_async.py new file mode 100644 index 0000000000..6ae02d7648 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_discriminated_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownDiscriminatedOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_discriminated_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown_discriminated.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_discriminated_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown_discriminated.put( + body={"index": 0, "kind": "derived", "name": "str", "age": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations.py new file mode 100644 index 0000000000..8ec9349c6b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_is_unknown_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_is_unknown.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations_async.py new file mode 100644 index 0000000000..d6864c4db2 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_is_unknown_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientIsUnknownOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_is_unknown_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_is_unknown.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations.py new file mode 100644 index 0000000000..d977a25494 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientMultipleSpreadOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_multiple_spread_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_multiple_spread.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_multiple_spread_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_multiple_spread.put( + body={"flag": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations_async.py new file mode 100644 index 0000000000..a108b3a2e3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_multiple_spread_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientMultipleSpreadOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_multiple_spread_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_multiple_spread.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_multiple_spread_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_multiple_spread.put( + body={"flag": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations.py new file mode 100644 index 0000000000..ebf8d87f4d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentFloatOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_float_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_float_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_float.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations_async.py new file mode 100644 index 0000000000..b08a89ad57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_float_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentFloatOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_float_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_float_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_float.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations.py new file mode 100644 index 0000000000..83808b6614 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentModelArrayOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_model_array_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_model_array_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_model_array.put( + body={"knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations_async.py new file mode 100644 index 0000000000..3c42490d45 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_array_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentModelArrayOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_model_array_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_model_array_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_model_array.put( + body={"knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations.py new file mode 100644 index 0000000000..5d30531262 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentModelOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_model_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_model_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_model.put( + body={"knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations_async.py new file mode 100644 index 0000000000..4bc0d6b79c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_model_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentModelOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_model_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_model_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_model.put( + body={"knownProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations.py new file mode 100644 index 0000000000..f2804b70c1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentStringOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_string_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_different_string_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_different_string.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations_async.py new file mode 100644 index 0000000000..d8dae86cf0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_different_string_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadDifferentStringOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_string_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_different_string_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_different_string.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations.py new file mode 100644 index 0000000000..140ad9dc99 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadFloatOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_float_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_float_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations_async.py new file mode 100644 index 0000000000..d11e12660b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_float_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadFloatOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_float_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_float.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_float_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_float.put( + body={"id": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations.py new file mode 100644 index 0000000000..5c84152c72 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadModelArrayOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_model_array_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_model_array_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations_async.py new file mode 100644 index 0000000000..5b5a96081f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_array_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadModelArrayOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_model_array_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_model_array.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_model_array_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_model_array.put( + body={"knownProp": [{"state": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations.py new file mode 100644 index 0000000000..50bcad2cda --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadModelOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_model_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_model_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations_async.py new file mode 100644 index 0000000000..614d9f0614 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_model_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadModelOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_model_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_model.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_model_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_model.put( + body={"knownProp": {"state": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations.py new file mode 100644 index 0000000000..f2368bc183 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union2_get( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union2.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union2_put( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union2.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations_async.py new file mode 100644 index 0000000000..065547745a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union2_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2OperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union2_get( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union2.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union2_put( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union2.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations.py new file mode 100644 index 0000000000..09bbf02c05 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union3_get( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union3.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union3_put( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union3.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations_async.py new file mode 100644 index 0000000000..f837b8cfa7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union3_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3OperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union3_get( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union3.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union3_put( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union3.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations.py new file mode 100644 index 0000000000..c0680501f4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations( + AdditionalPropertiesClientTestBase +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union_get( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_non_discriminated_union_put( + self, additionalproperties_endpoint + ): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_non_discriminated_union.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations_async.py new file mode 100644 index 0000000000..df3f881a56 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_non_discriminated_union_operations_async.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union_get( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_non_discriminated_union_put( + self, additionalproperties_endpoint + ): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_non_discriminated_union.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations.py new file mode 100644 index 0000000000..c0eb6348b8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordUnionOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_union_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_union.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_record_union_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_record_union.put( + body={"flag": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations_async.py new file mode 100644 index 0000000000..9162ab5fc7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_record_union_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadRecordUnionOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_union_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_union.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_record_union_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_record_union.put( + body={"flag": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations.py new file mode 100644 index 0000000000..3a56edb29d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AdditionalPropertiesClientTestBase, AdditionalPropertiesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadStringOperations(AdditionalPropertiesClientTestBase): + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_string_get(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy + def test_additional_properties_client_spread_string_put(self, additionalproperties_endpoint): + client = self.create_client(endpoint=additionalproperties_endpoint) + response = client.additional_properties_client_spread_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations_async.py new file mode 100644 index 0000000000..9cf4f86904 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/generated_tests/test_additional_properties_additional_properties_client_spread_string_operations_async.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AdditionalPropertiesPreparer +from testpreparer_async import AdditionalPropertiesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAdditionalPropertiesAdditionalPropertiesClientSpreadStringOperationsAsync( + AdditionalPropertiesClientTestBaseAsync +): + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_string_get(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_string.get() + + # please add some check logic here by yourself + # ... + + @AdditionalPropertiesPreparer() + @recorded_by_proxy_async + async def test_additional_properties_client_spread_string_put(self, additionalproperties_endpoint): + client = self.create_async_client(endpoint=additionalproperties_endpoint) + response = await client.additional_properties_client_spread_string.put( + body={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py index e727c1f0ac..4dbbb35d08 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,134 +18,167 @@ from ._configuration import AdditionalPropertiesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - ExtendsDifferentSpreadFloatOperations, - ExtendsDifferentSpreadModelArrayOperations, - ExtendsDifferentSpreadModelOperations, - ExtendsDifferentSpreadStringOperations, - ExtendsFloatOperations, - ExtendsModelArrayOperations, - ExtendsModelOperations, - ExtendsStringOperations, - ExtendsUnknownDerivedOperations, - ExtendsUnknownDiscriminatedOperations, - ExtendsUnknownOperations, - IsFloatOperations, - IsModelArrayOperations, - IsModelOperations, - IsStringOperations, - IsUnknownDerivedOperations, - IsUnknownDiscriminatedOperations, - IsUnknownOperations, - MultipleSpreadOperations, - SpreadDifferentFloatOperations, - SpreadDifferentModelArrayOperations, - SpreadDifferentModelOperations, - SpreadDifferentStringOperations, - SpreadFloatOperations, - SpreadModelArrayOperations, - SpreadModelOperations, - SpreadRecordNonDiscriminatedUnion2Operations, - SpreadRecordNonDiscriminatedUnion3Operations, - SpreadRecordNonDiscriminatedUnionOperations, - SpreadRecordUnionOperations, - SpreadStringOperations, + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations, + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations, + AdditionalPropertiesClientExtendsFloatOperations, + AdditionalPropertiesClientExtendsModelArrayOperations, + AdditionalPropertiesClientExtendsModelOperations, + AdditionalPropertiesClientExtendsStringOperations, + AdditionalPropertiesClientExtendsUnknownDerivedOperations, + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations, + AdditionalPropertiesClientExtendsUnknownOperations, + AdditionalPropertiesClientIsFloatOperations, + AdditionalPropertiesClientIsModelArrayOperations, + AdditionalPropertiesClientIsModelOperations, + AdditionalPropertiesClientIsStringOperations, + AdditionalPropertiesClientIsUnknownDerivedOperations, + AdditionalPropertiesClientIsUnknownDiscriminatedOperations, + AdditionalPropertiesClientIsUnknownOperations, + AdditionalPropertiesClientMultipleSpreadOperations, + AdditionalPropertiesClientSpreadDifferentFloatOperations, + AdditionalPropertiesClientSpreadDifferentModelArrayOperations, + AdditionalPropertiesClientSpreadDifferentModelOperations, + AdditionalPropertiesClientSpreadDifferentStringOperations, + AdditionalPropertiesClientSpreadFloatOperations, + AdditionalPropertiesClientSpreadModelArrayOperations, + AdditionalPropertiesClientSpreadModelOperations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations, + AdditionalPropertiesClientSpreadRecordUnionOperations, + AdditionalPropertiesClientSpreadStringOperations, ) class AdditionalPropertiesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Tests for additional properties of models. - :ivar extends_unknown: ExtendsUnknownOperations operations - :vartype extends_unknown: - typetest.property.additionalproperties.operations.ExtendsUnknownOperations - :ivar extends_unknown_derived: ExtendsUnknownDerivedOperations operations - :vartype extends_unknown_derived: - typetest.property.additionalproperties.operations.ExtendsUnknownDerivedOperations - :ivar extends_unknown_discriminated: ExtendsUnknownDiscriminatedOperations operations - :vartype extends_unknown_discriminated: - typetest.property.additionalproperties.operations.ExtendsUnknownDiscriminatedOperations - :ivar is_unknown: IsUnknownOperations operations - :vartype is_unknown: typetest.property.additionalproperties.operations.IsUnknownOperations - :ivar is_unknown_derived: IsUnknownDerivedOperations operations - :vartype is_unknown_derived: - typetest.property.additionalproperties.operations.IsUnknownDerivedOperations - :ivar is_unknown_discriminated: IsUnknownDiscriminatedOperations operations - :vartype is_unknown_discriminated: - typetest.property.additionalproperties.operations.IsUnknownDiscriminatedOperations - :ivar extends_string: ExtendsStringOperations operations - :vartype extends_string: - typetest.property.additionalproperties.operations.ExtendsStringOperations - :ivar is_string: IsStringOperations operations - :vartype is_string: typetest.property.additionalproperties.operations.IsStringOperations - :ivar spread_string: SpreadStringOperations operations - :vartype spread_string: - typetest.property.additionalproperties.operations.SpreadStringOperations - :ivar extends_float: ExtendsFloatOperations operations - :vartype extends_float: - typetest.property.additionalproperties.operations.ExtendsFloatOperations - :ivar is_float: IsFloatOperations operations - :vartype is_float: typetest.property.additionalproperties.operations.IsFloatOperations - :ivar spread_float: SpreadFloatOperations operations - :vartype spread_float: typetest.property.additionalproperties.operations.SpreadFloatOperations - :ivar extends_model: ExtendsModelOperations operations - :vartype extends_model: - typetest.property.additionalproperties.operations.ExtendsModelOperations - :ivar is_model: IsModelOperations operations - :vartype is_model: typetest.property.additionalproperties.operations.IsModelOperations - :ivar spread_model: SpreadModelOperations operations - :vartype spread_model: typetest.property.additionalproperties.operations.SpreadModelOperations - :ivar extends_model_array: ExtendsModelArrayOperations operations - :vartype extends_model_array: - typetest.property.additionalproperties.operations.ExtendsModelArrayOperations - :ivar is_model_array: IsModelArrayOperations operations - :vartype is_model_array: - typetest.property.additionalproperties.operations.IsModelArrayOperations - :ivar spread_model_array: SpreadModelArrayOperations operations - :vartype spread_model_array: - typetest.property.additionalproperties.operations.SpreadModelArrayOperations - :ivar spread_different_string: SpreadDifferentStringOperations operations - :vartype spread_different_string: - typetest.property.additionalproperties.operations.SpreadDifferentStringOperations - :ivar spread_different_float: SpreadDifferentFloatOperations operations - :vartype spread_different_float: - typetest.property.additionalproperties.operations.SpreadDifferentFloatOperations - :ivar spread_different_model: SpreadDifferentModelOperations operations - :vartype spread_different_model: - typetest.property.additionalproperties.operations.SpreadDifferentModelOperations - :ivar spread_different_model_array: SpreadDifferentModelArrayOperations operations - :vartype spread_different_model_array: - typetest.property.additionalproperties.operations.SpreadDifferentModelArrayOperations - :ivar extends_different_spread_string: ExtendsDifferentSpreadStringOperations operations - :vartype extends_different_spread_string: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadStringOperations - :ivar extends_different_spread_float: ExtendsDifferentSpreadFloatOperations operations - :vartype extends_different_spread_float: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadFloatOperations - :ivar extends_different_spread_model: ExtendsDifferentSpreadModelOperations operations - :vartype extends_different_spread_model: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelOperations - :ivar extends_different_spread_model_array: ExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_extends_unknown: + AdditionalPropertiesClientExtendsUnknownOperations operations + :vartype additional_properties_client_extends_unknown: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownOperations + :ivar additional_properties_client_extends_unknown_derived: + AdditionalPropertiesClientExtendsUnknownDerivedOperations operations + :vartype additional_properties_client_extends_unknown_derived: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations + :ivar additional_properties_client_extends_unknown_discriminated: + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_extends_unknown_discriminated: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations + :ivar additional_properties_client_is_unknown: AdditionalPropertiesClientIsUnknownOperations operations - :vartype extends_different_spread_model_array: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelArrayOperations - :ivar multiple_spread: MultipleSpreadOperations operations - :vartype multiple_spread: - typetest.property.additionalproperties.operations.MultipleSpreadOperations - :ivar spread_record_union: SpreadRecordUnionOperations operations - :vartype spread_record_union: - typetest.property.additionalproperties.operations.SpreadRecordUnionOperations - :ivar spread_record_non_discriminated_union: SpreadRecordNonDiscriminatedUnionOperations + :vartype additional_properties_client_is_unknown: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownOperations + :ivar additional_properties_client_is_unknown_derived: + AdditionalPropertiesClientIsUnknownDerivedOperations operations + :vartype additional_properties_client_is_unknown_derived: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDerivedOperations + :ivar additional_properties_client_is_unknown_discriminated: + AdditionalPropertiesClientIsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_is_unknown_discriminated: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations + :ivar additional_properties_client_extends_string: + AdditionalPropertiesClientExtendsStringOperations operations + :vartype additional_properties_client_extends_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsStringOperations + :ivar additional_properties_client_is_string: AdditionalPropertiesClientIsStringOperations operations - :vartype spread_record_non_discriminated_union: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnionOperations - :ivar spread_record_non_discriminated_union2: SpreadRecordNonDiscriminatedUnion2Operations + :vartype additional_properties_client_is_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsStringOperations + :ivar additional_properties_client_spread_string: + AdditionalPropertiesClientSpreadStringOperations operations + :vartype additional_properties_client_spread_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadStringOperations + :ivar additional_properties_client_extends_float: + AdditionalPropertiesClientExtendsFloatOperations operations + :vartype additional_properties_client_extends_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsFloatOperations + :ivar additional_properties_client_is_float: AdditionalPropertiesClientIsFloatOperations operations - :vartype spread_record_non_discriminated_union2: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion2Operations - :ivar spread_record_non_discriminated_union3: SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsFloatOperations + :ivar additional_properties_client_spread_float: + AdditionalPropertiesClientSpreadFloatOperations operations + :vartype additional_properties_client_spread_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadFloatOperations + :ivar additional_properties_client_extends_model: + AdditionalPropertiesClientExtendsModelOperations operations + :vartype additional_properties_client_extends_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelOperations + :ivar additional_properties_client_is_model: AdditionalPropertiesClientIsModelOperations operations - :vartype spread_record_non_discriminated_union3: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelOperations + :ivar additional_properties_client_spread_model: + AdditionalPropertiesClientSpreadModelOperations operations + :vartype additional_properties_client_spread_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelOperations + :ivar additional_properties_client_extends_model_array: + AdditionalPropertiesClientExtendsModelArrayOperations operations + :vartype additional_properties_client_extends_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelArrayOperations + :ivar additional_properties_client_is_model_array: + AdditionalPropertiesClientIsModelArrayOperations operations + :vartype additional_properties_client_is_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelArrayOperations + :ivar additional_properties_client_spread_model_array: + AdditionalPropertiesClientSpreadModelArrayOperations operations + :vartype additional_properties_client_spread_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelArrayOperations + :ivar additional_properties_client_spread_different_string: + AdditionalPropertiesClientSpreadDifferentStringOperations operations + :vartype additional_properties_client_spread_different_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentStringOperations + :ivar additional_properties_client_spread_different_float: + AdditionalPropertiesClientSpreadDifferentFloatOperations operations + :vartype additional_properties_client_spread_different_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations + :ivar additional_properties_client_spread_different_model: + AdditionalPropertiesClientSpreadDifferentModelOperations operations + :vartype additional_properties_client_spread_different_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelOperations + :ivar additional_properties_client_spread_different_model_array: + AdditionalPropertiesClientSpreadDifferentModelArrayOperations operations + :vartype additional_properties_client_spread_different_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations + :ivar additional_properties_client_extends_different_spread_string: + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations operations + :vartype additional_properties_client_extends_different_spread_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations + :ivar additional_properties_client_extends_different_spread_float: + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations operations + :vartype additional_properties_client_extends_different_spread_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations + :ivar additional_properties_client_extends_different_spread_model: + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations operations + :vartype additional_properties_client_extends_different_spread_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations + :ivar additional_properties_client_extends_different_spread_model_array: + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations operations + :vartype additional_properties_client_extends_different_spread_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_multiple_spread: + AdditionalPropertiesClientMultipleSpreadOperations operations + :vartype additional_properties_client_multiple_spread: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientMultipleSpreadOperations + :ivar additional_properties_client_spread_record_union: + AdditionalPropertiesClientSpreadRecordUnionOperations operations + :vartype additional_properties_client_spread_record_union: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations operations + :vartype additional_properties_client_spread_record_non_discriminated_union: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union2: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union2: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations + :ivar additional_properties_client_spread_record_non_discriminated_union3: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union3: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -177,73 +211,127 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.extends_unknown = ExtendsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_unknown_derived = ExtendsUnknownDerivedOperations( + self.additional_properties_client_extends_unknown = AdditionalPropertiesClientExtendsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_unknown_discriminated = ExtendsUnknownDiscriminatedOperations( - self._client, self._config, self._serialize, self._deserialize + self.additional_properties_client_extends_unknown_derived = ( + AdditionalPropertiesClientExtendsUnknownDerivedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_unknown_discriminated = ( + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.is_unknown = IsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_unknown_derived = IsUnknownDerivedOperations( + self.additional_properties_client_is_unknown = AdditionalPropertiesClientIsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_unknown_discriminated = IsUnknownDiscriminatedOperations( + self.additional_properties_client_is_unknown_derived = AdditionalPropertiesClientIsUnknownDerivedOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_string = ExtendsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_string = IsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_string = SpreadStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_float = ExtendsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_float = IsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_float = SpreadFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model = ExtendsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_model = IsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model = SpreadModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model_array = ExtendsModelArrayOperations( + self.additional_properties_client_is_unknown_discriminated = ( + AdditionalPropertiesClientIsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_string = AdditionalPropertiesClientExtendsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_model_array = IsModelArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model_array = SpreadModelArrayOperations( + self.additional_properties_client_is_string = AdditionalPropertiesClientIsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_string = SpreadDifferentStringOperations( + self.additional_properties_client_spread_string = AdditionalPropertiesClientSpreadStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_float = SpreadDifferentFloatOperations( + self.additional_properties_client_extends_float = AdditionalPropertiesClientExtendsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model = SpreadDifferentModelOperations( + self.additional_properties_client_is_float = AdditionalPropertiesClientIsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model_array = SpreadDifferentModelArrayOperations( + self.additional_properties_client_spread_float = AdditionalPropertiesClientSpreadFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_string = ExtendsDifferentSpreadStringOperations( + self.additional_properties_client_extends_model = AdditionalPropertiesClientExtendsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_float = ExtendsDifferentSpreadFloatOperations( + self.additional_properties_client_is_model = AdditionalPropertiesClientIsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model = ExtendsDifferentSpreadModelOperations( + self.additional_properties_client_spread_model = AdditionalPropertiesClientSpreadModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model_array = ExtendsDifferentSpreadModelArrayOperations( + self.additional_properties_client_extends_model_array = AdditionalPropertiesClientExtendsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.multiple_spread = MultipleSpreadOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_record_union = SpreadRecordUnionOperations( + self.additional_properties_client_is_model_array = AdditionalPropertiesClientIsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union = SpreadRecordNonDiscriminatedUnionOperations( + self.additional_properties_client_spread_model_array = AdditionalPropertiesClientSpreadModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union2 = SpreadRecordNonDiscriminatedUnion2Operations( + self.additional_properties_client_spread_different_string = ( + AdditionalPropertiesClientSpreadDifferentStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_float = ( + AdditionalPropertiesClientSpreadDifferentFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model = ( + AdditionalPropertiesClientSpreadDifferentModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model_array = ( + AdditionalPropertiesClientSpreadDifferentModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_string = ( + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_float = ( + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model_array = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_multiple_spread = AdditionalPropertiesClientMultipleSpreadOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union3 = SpreadRecordNonDiscriminatedUnion3Operations( + self.additional_properties_client_spread_record_union = AdditionalPropertiesClientSpreadRecordUnionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.additional_properties_client_spread_record_non_discriminated_union = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union2 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union3 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py index 1afeb43acc..bec6ef7a80 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -17,136 +18,167 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AdditionalPropertiesClientConfiguration from .operations import ( - ExtendsDifferentSpreadFloatOperations, - ExtendsDifferentSpreadModelArrayOperations, - ExtendsDifferentSpreadModelOperations, - ExtendsDifferentSpreadStringOperations, - ExtendsFloatOperations, - ExtendsModelArrayOperations, - ExtendsModelOperations, - ExtendsStringOperations, - ExtendsUnknownDerivedOperations, - ExtendsUnknownDiscriminatedOperations, - ExtendsUnknownOperations, - IsFloatOperations, - IsModelArrayOperations, - IsModelOperations, - IsStringOperations, - IsUnknownDerivedOperations, - IsUnknownDiscriminatedOperations, - IsUnknownOperations, - MultipleSpreadOperations, - SpreadDifferentFloatOperations, - SpreadDifferentModelArrayOperations, - SpreadDifferentModelOperations, - SpreadDifferentStringOperations, - SpreadFloatOperations, - SpreadModelArrayOperations, - SpreadModelOperations, - SpreadRecordNonDiscriminatedUnion2Operations, - SpreadRecordNonDiscriminatedUnion3Operations, - SpreadRecordNonDiscriminatedUnionOperations, - SpreadRecordUnionOperations, - SpreadStringOperations, + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations, + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations, + AdditionalPropertiesClientExtendsFloatOperations, + AdditionalPropertiesClientExtendsModelArrayOperations, + AdditionalPropertiesClientExtendsModelOperations, + AdditionalPropertiesClientExtendsStringOperations, + AdditionalPropertiesClientExtendsUnknownDerivedOperations, + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations, + AdditionalPropertiesClientExtendsUnknownOperations, + AdditionalPropertiesClientIsFloatOperations, + AdditionalPropertiesClientIsModelArrayOperations, + AdditionalPropertiesClientIsModelOperations, + AdditionalPropertiesClientIsStringOperations, + AdditionalPropertiesClientIsUnknownDerivedOperations, + AdditionalPropertiesClientIsUnknownDiscriminatedOperations, + AdditionalPropertiesClientIsUnknownOperations, + AdditionalPropertiesClientMultipleSpreadOperations, + AdditionalPropertiesClientSpreadDifferentFloatOperations, + AdditionalPropertiesClientSpreadDifferentModelArrayOperations, + AdditionalPropertiesClientSpreadDifferentModelOperations, + AdditionalPropertiesClientSpreadDifferentStringOperations, + AdditionalPropertiesClientSpreadFloatOperations, + AdditionalPropertiesClientSpreadModelArrayOperations, + AdditionalPropertiesClientSpreadModelOperations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations, + AdditionalPropertiesClientSpreadRecordUnionOperations, + AdditionalPropertiesClientSpreadStringOperations, ) class AdditionalPropertiesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Tests for additional properties of models. - :ivar extends_unknown: ExtendsUnknownOperations operations - :vartype extends_unknown: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownOperations - :ivar extends_unknown_derived: ExtendsUnknownDerivedOperations operations - :vartype extends_unknown_derived: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownDerivedOperations - :ivar extends_unknown_discriminated: ExtendsUnknownDiscriminatedOperations operations - :vartype extends_unknown_discriminated: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownDiscriminatedOperations - :ivar is_unknown: IsUnknownOperations operations - :vartype is_unknown: typetest.property.additionalproperties.aio.operations.IsUnknownOperations - :ivar is_unknown_derived: IsUnknownDerivedOperations operations - :vartype is_unknown_derived: - typetest.property.additionalproperties.aio.operations.IsUnknownDerivedOperations - :ivar is_unknown_discriminated: IsUnknownDiscriminatedOperations operations - :vartype is_unknown_discriminated: - typetest.property.additionalproperties.aio.operations.IsUnknownDiscriminatedOperations - :ivar extends_string: ExtendsStringOperations operations - :vartype extends_string: - typetest.property.additionalproperties.aio.operations.ExtendsStringOperations - :ivar is_string: IsStringOperations operations - :vartype is_string: typetest.property.additionalproperties.aio.operations.IsStringOperations - :ivar spread_string: SpreadStringOperations operations - :vartype spread_string: - typetest.property.additionalproperties.aio.operations.SpreadStringOperations - :ivar extends_float: ExtendsFloatOperations operations - :vartype extends_float: - typetest.property.additionalproperties.aio.operations.ExtendsFloatOperations - :ivar is_float: IsFloatOperations operations - :vartype is_float: typetest.property.additionalproperties.aio.operations.IsFloatOperations - :ivar spread_float: SpreadFloatOperations operations - :vartype spread_float: - typetest.property.additionalproperties.aio.operations.SpreadFloatOperations - :ivar extends_model: ExtendsModelOperations operations - :vartype extends_model: - typetest.property.additionalproperties.aio.operations.ExtendsModelOperations - :ivar is_model: IsModelOperations operations - :vartype is_model: typetest.property.additionalproperties.aio.operations.IsModelOperations - :ivar spread_model: SpreadModelOperations operations - :vartype spread_model: - typetest.property.additionalproperties.aio.operations.SpreadModelOperations - :ivar extends_model_array: ExtendsModelArrayOperations operations - :vartype extends_model_array: - typetest.property.additionalproperties.aio.operations.ExtendsModelArrayOperations - :ivar is_model_array: IsModelArrayOperations operations - :vartype is_model_array: - typetest.property.additionalproperties.aio.operations.IsModelArrayOperations - :ivar spread_model_array: SpreadModelArrayOperations operations - :vartype spread_model_array: - typetest.property.additionalproperties.aio.operations.SpreadModelArrayOperations - :ivar spread_different_string: SpreadDifferentStringOperations operations - :vartype spread_different_string: - typetest.property.additionalproperties.aio.operations.SpreadDifferentStringOperations - :ivar spread_different_float: SpreadDifferentFloatOperations operations - :vartype spread_different_float: - typetest.property.additionalproperties.aio.operations.SpreadDifferentFloatOperations - :ivar spread_different_model: SpreadDifferentModelOperations operations - :vartype spread_different_model: - typetest.property.additionalproperties.aio.operations.SpreadDifferentModelOperations - :ivar spread_different_model_array: SpreadDifferentModelArrayOperations operations - :vartype spread_different_model_array: - typetest.property.additionalproperties.aio.operations.SpreadDifferentModelArrayOperations - :ivar extends_different_spread_string: ExtendsDifferentSpreadStringOperations operations - :vartype extends_different_spread_string: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadStringOperations - :ivar extends_different_spread_float: ExtendsDifferentSpreadFloatOperations operations - :vartype extends_different_spread_float: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadFloatOperations - :ivar extends_different_spread_model: ExtendsDifferentSpreadModelOperations operations - :vartype extends_different_spread_model: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelOperations - :ivar extends_different_spread_model_array: ExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_extends_unknown: + AdditionalPropertiesClientExtendsUnknownOperations operations + :vartype additional_properties_client_extends_unknown: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownOperations + :ivar additional_properties_client_extends_unknown_derived: + AdditionalPropertiesClientExtendsUnknownDerivedOperations operations + :vartype additional_properties_client_extends_unknown_derived: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations + :ivar additional_properties_client_extends_unknown_discriminated: + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_extends_unknown_discriminated: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations + :ivar additional_properties_client_is_unknown: AdditionalPropertiesClientIsUnknownOperations operations - :vartype extends_different_spread_model_array: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelArrayOperations - :ivar multiple_spread: MultipleSpreadOperations operations - :vartype multiple_spread: - typetest.property.additionalproperties.aio.operations.MultipleSpreadOperations - :ivar spread_record_union: SpreadRecordUnionOperations operations - :vartype spread_record_union: - typetest.property.additionalproperties.aio.operations.SpreadRecordUnionOperations - :ivar spread_record_non_discriminated_union: SpreadRecordNonDiscriminatedUnionOperations + :vartype additional_properties_client_is_unknown: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownOperations + :ivar additional_properties_client_is_unknown_derived: + AdditionalPropertiesClientIsUnknownDerivedOperations operations + :vartype additional_properties_client_is_unknown_derived: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDerivedOperations + :ivar additional_properties_client_is_unknown_discriminated: + AdditionalPropertiesClientIsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_is_unknown_discriminated: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations + :ivar additional_properties_client_extends_string: + AdditionalPropertiesClientExtendsStringOperations operations + :vartype additional_properties_client_extends_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsStringOperations + :ivar additional_properties_client_is_string: AdditionalPropertiesClientIsStringOperations operations - :vartype spread_record_non_discriminated_union: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnionOperations - :ivar spread_record_non_discriminated_union2: SpreadRecordNonDiscriminatedUnion2Operations + :vartype additional_properties_client_is_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsStringOperations + :ivar additional_properties_client_spread_string: + AdditionalPropertiesClientSpreadStringOperations operations + :vartype additional_properties_client_spread_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadStringOperations + :ivar additional_properties_client_extends_float: + AdditionalPropertiesClientExtendsFloatOperations operations + :vartype additional_properties_client_extends_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsFloatOperations + :ivar additional_properties_client_is_float: AdditionalPropertiesClientIsFloatOperations operations - :vartype spread_record_non_discriminated_union2: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion2Operations - :ivar spread_record_non_discriminated_union3: SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsFloatOperations + :ivar additional_properties_client_spread_float: + AdditionalPropertiesClientSpreadFloatOperations operations + :vartype additional_properties_client_spread_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadFloatOperations + :ivar additional_properties_client_extends_model: + AdditionalPropertiesClientExtendsModelOperations operations + :vartype additional_properties_client_extends_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelOperations + :ivar additional_properties_client_is_model: AdditionalPropertiesClientIsModelOperations operations - :vartype spread_record_non_discriminated_union3: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelOperations + :ivar additional_properties_client_spread_model: + AdditionalPropertiesClientSpreadModelOperations operations + :vartype additional_properties_client_spread_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelOperations + :ivar additional_properties_client_extends_model_array: + AdditionalPropertiesClientExtendsModelArrayOperations operations + :vartype additional_properties_client_extends_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelArrayOperations + :ivar additional_properties_client_is_model_array: + AdditionalPropertiesClientIsModelArrayOperations operations + :vartype additional_properties_client_is_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelArrayOperations + :ivar additional_properties_client_spread_model_array: + AdditionalPropertiesClientSpreadModelArrayOperations operations + :vartype additional_properties_client_spread_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelArrayOperations + :ivar additional_properties_client_spread_different_string: + AdditionalPropertiesClientSpreadDifferentStringOperations operations + :vartype additional_properties_client_spread_different_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentStringOperations + :ivar additional_properties_client_spread_different_float: + AdditionalPropertiesClientSpreadDifferentFloatOperations operations + :vartype additional_properties_client_spread_different_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations + :ivar additional_properties_client_spread_different_model: + AdditionalPropertiesClientSpreadDifferentModelOperations operations + :vartype additional_properties_client_spread_different_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelOperations + :ivar additional_properties_client_spread_different_model_array: + AdditionalPropertiesClientSpreadDifferentModelArrayOperations operations + :vartype additional_properties_client_spread_different_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations + :ivar additional_properties_client_extends_different_spread_string: + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations operations + :vartype additional_properties_client_extends_different_spread_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations + :ivar additional_properties_client_extends_different_spread_float: + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations operations + :vartype additional_properties_client_extends_different_spread_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations + :ivar additional_properties_client_extends_different_spread_model: + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations operations + :vartype additional_properties_client_extends_different_spread_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations + :ivar additional_properties_client_extends_different_spread_model_array: + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations operations + :vartype additional_properties_client_extends_different_spread_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_multiple_spread: + AdditionalPropertiesClientMultipleSpreadOperations operations + :vartype additional_properties_client_multiple_spread: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientMultipleSpreadOperations + :ivar additional_properties_client_spread_record_union: + AdditionalPropertiesClientSpreadRecordUnionOperations operations + :vartype additional_properties_client_spread_record_union: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations operations + :vartype additional_properties_client_spread_record_non_discriminated_union: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union2: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union2: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations + :ivar additional_properties_client_spread_record_non_discriminated_union3: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union3: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -179,73 +211,127 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.extends_unknown = ExtendsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_unknown_derived = ExtendsUnknownDerivedOperations( + self.additional_properties_client_extends_unknown = AdditionalPropertiesClientExtendsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_unknown_discriminated = ExtendsUnknownDiscriminatedOperations( - self._client, self._config, self._serialize, self._deserialize + self.additional_properties_client_extends_unknown_derived = ( + AdditionalPropertiesClientExtendsUnknownDerivedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_unknown_discriminated = ( + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.is_unknown = IsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_unknown_derived = IsUnknownDerivedOperations( + self.additional_properties_client_is_unknown = AdditionalPropertiesClientIsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_unknown_discriminated = IsUnknownDiscriminatedOperations( + self.additional_properties_client_is_unknown_derived = AdditionalPropertiesClientIsUnknownDerivedOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_string = ExtendsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_string = IsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_string = SpreadStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_float = ExtendsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_float = IsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_float = SpreadFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model = ExtendsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_model = IsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model = SpreadModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model_array = ExtendsModelArrayOperations( + self.additional_properties_client_is_unknown_discriminated = ( + AdditionalPropertiesClientIsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_string = AdditionalPropertiesClientExtendsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_model_array = IsModelArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model_array = SpreadModelArrayOperations( + self.additional_properties_client_is_string = AdditionalPropertiesClientIsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_string = SpreadDifferentStringOperations( + self.additional_properties_client_spread_string = AdditionalPropertiesClientSpreadStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_float = SpreadDifferentFloatOperations( + self.additional_properties_client_extends_float = AdditionalPropertiesClientExtendsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model = SpreadDifferentModelOperations( + self.additional_properties_client_is_float = AdditionalPropertiesClientIsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model_array = SpreadDifferentModelArrayOperations( + self.additional_properties_client_spread_float = AdditionalPropertiesClientSpreadFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_string = ExtendsDifferentSpreadStringOperations( + self.additional_properties_client_extends_model = AdditionalPropertiesClientExtendsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_float = ExtendsDifferentSpreadFloatOperations( + self.additional_properties_client_is_model = AdditionalPropertiesClientIsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model = ExtendsDifferentSpreadModelOperations( + self.additional_properties_client_spread_model = AdditionalPropertiesClientSpreadModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model_array = ExtendsDifferentSpreadModelArrayOperations( + self.additional_properties_client_extends_model_array = AdditionalPropertiesClientExtendsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.multiple_spread = MultipleSpreadOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_record_union = SpreadRecordUnionOperations( + self.additional_properties_client_is_model_array = AdditionalPropertiesClientIsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union = SpreadRecordNonDiscriminatedUnionOperations( + self.additional_properties_client_spread_model_array = AdditionalPropertiesClientSpreadModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union2 = SpreadRecordNonDiscriminatedUnion2Operations( + self.additional_properties_client_spread_different_string = ( + AdditionalPropertiesClientSpreadDifferentStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_float = ( + AdditionalPropertiesClientSpreadDifferentFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model = ( + AdditionalPropertiesClientSpreadDifferentModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model_array = ( + AdditionalPropertiesClientSpreadDifferentModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_string = ( + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_float = ( + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model_array = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_multiple_spread = AdditionalPropertiesClientMultipleSpreadOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union3 = SpreadRecordNonDiscriminatedUnion3Operations( + self.additional_properties_client_spread_record_union = AdditionalPropertiesClientSpreadRecordUnionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.additional_properties_client_spread_record_non_discriminated_union = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union2 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union3 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py index 5cb7c3e9a7..3702b9f812 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py @@ -12,74 +12,74 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExtendsUnknownOperations # type: ignore -from ._operations import ExtendsUnknownDerivedOperations # type: ignore -from ._operations import ExtendsUnknownDiscriminatedOperations # type: ignore -from ._operations import IsUnknownOperations # type: ignore -from ._operations import IsUnknownDerivedOperations # type: ignore -from ._operations import IsUnknownDiscriminatedOperations # type: ignore -from ._operations import ExtendsStringOperations # type: ignore -from ._operations import IsStringOperations # type: ignore -from ._operations import SpreadStringOperations # type: ignore -from ._operations import ExtendsFloatOperations # type: ignore -from ._operations import IsFloatOperations # type: ignore -from ._operations import SpreadFloatOperations # type: ignore -from ._operations import ExtendsModelOperations # type: ignore -from ._operations import IsModelOperations # type: ignore -from ._operations import SpreadModelOperations # type: ignore -from ._operations import ExtendsModelArrayOperations # type: ignore -from ._operations import IsModelArrayOperations # type: ignore -from ._operations import SpreadModelArrayOperations # type: ignore -from ._operations import SpreadDifferentStringOperations # type: ignore -from ._operations import SpreadDifferentFloatOperations # type: ignore -from ._operations import SpreadDifferentModelOperations # type: ignore -from ._operations import SpreadDifferentModelArrayOperations # type: ignore -from ._operations import ExtendsDifferentSpreadStringOperations # type: ignore -from ._operations import ExtendsDifferentSpreadFloatOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelArrayOperations # type: ignore -from ._operations import MultipleSpreadOperations # type: ignore -from ._operations import SpreadRecordUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion2Operations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion3Operations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientMultipleSpreadOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExtendsUnknownOperations", - "ExtendsUnknownDerivedOperations", - "ExtendsUnknownDiscriminatedOperations", - "IsUnknownOperations", - "IsUnknownDerivedOperations", - "IsUnknownDiscriminatedOperations", - "ExtendsStringOperations", - "IsStringOperations", - "SpreadStringOperations", - "ExtendsFloatOperations", - "IsFloatOperations", - "SpreadFloatOperations", - "ExtendsModelOperations", - "IsModelOperations", - "SpreadModelOperations", - "ExtendsModelArrayOperations", - "IsModelArrayOperations", - "SpreadModelArrayOperations", - "SpreadDifferentStringOperations", - "SpreadDifferentFloatOperations", - "SpreadDifferentModelOperations", - "SpreadDifferentModelArrayOperations", - "ExtendsDifferentSpreadStringOperations", - "ExtendsDifferentSpreadFloatOperations", - "ExtendsDifferentSpreadModelOperations", - "ExtendsDifferentSpreadModelArrayOperations", - "MultipleSpreadOperations", - "SpreadRecordUnionOperations", - "SpreadRecordNonDiscriminatedUnionOperations", - "SpreadRecordNonDiscriminatedUnion2Operations", - "SpreadRecordNonDiscriminatedUnion3Operations", + "AdditionalPropertiesClientExtendsUnknownOperations", + "AdditionalPropertiesClientExtendsUnknownDerivedOperations", + "AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientIsUnknownOperations", + "AdditionalPropertiesClientIsUnknownDerivedOperations", + "AdditionalPropertiesClientIsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientExtendsStringOperations", + "AdditionalPropertiesClientIsStringOperations", + "AdditionalPropertiesClientSpreadStringOperations", + "AdditionalPropertiesClientExtendsFloatOperations", + "AdditionalPropertiesClientIsFloatOperations", + "AdditionalPropertiesClientSpreadFloatOperations", + "AdditionalPropertiesClientExtendsModelOperations", + "AdditionalPropertiesClientIsModelOperations", + "AdditionalPropertiesClientSpreadModelOperations", + "AdditionalPropertiesClientExtendsModelArrayOperations", + "AdditionalPropertiesClientIsModelArrayOperations", + "AdditionalPropertiesClientSpreadModelArrayOperations", + "AdditionalPropertiesClientSpreadDifferentStringOperations", + "AdditionalPropertiesClientSpreadDifferentFloatOperations", + "AdditionalPropertiesClientSpreadDifferentModelOperations", + "AdditionalPropertiesClientSpreadDifferentModelArrayOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadStringOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations", + "AdditionalPropertiesClientMultipleSpreadOperations", + "AdditionalPropertiesClientSpreadRecordUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py index e0d96cfb2d..403aad81ac 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py @@ -31,68 +31,68 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_extends_different_spread_float_get_request, - build_extends_different_spread_float_put_request, - build_extends_different_spread_model_array_get_request, - build_extends_different_spread_model_array_put_request, - build_extends_different_spread_model_get_request, - build_extends_different_spread_model_put_request, - build_extends_different_spread_string_get_request, - build_extends_different_spread_string_put_request, - build_extends_float_get_request, - build_extends_float_put_request, - build_extends_model_array_get_request, - build_extends_model_array_put_request, - build_extends_model_get_request, - build_extends_model_put_request, - build_extends_string_get_request, - build_extends_string_put_request, - build_extends_unknown_derived_get_request, - build_extends_unknown_derived_put_request, - build_extends_unknown_discriminated_get_request, - build_extends_unknown_discriminated_put_request, - build_extends_unknown_get_request, - build_extends_unknown_put_request, - build_is_float_get_request, - build_is_float_put_request, - build_is_model_array_get_request, - build_is_model_array_put_request, - build_is_model_get_request, - build_is_model_put_request, - build_is_string_get_request, - build_is_string_put_request, - build_is_unknown_derived_get_request, - build_is_unknown_derived_put_request, - build_is_unknown_discriminated_get_request, - build_is_unknown_discriminated_put_request, - build_is_unknown_get_request, - build_is_unknown_put_request, - build_multiple_spread_get_request, - build_multiple_spread_put_request, - build_spread_different_float_get_request, - build_spread_different_float_put_request, - build_spread_different_model_array_get_request, - build_spread_different_model_array_put_request, - build_spread_different_model_get_request, - build_spread_different_model_put_request, - build_spread_different_string_get_request, - build_spread_different_string_put_request, - build_spread_float_get_request, - build_spread_float_put_request, - build_spread_model_array_get_request, - build_spread_model_array_put_request, - build_spread_model_get_request, - build_spread_model_put_request, - build_spread_record_non_discriminated_union2_get_request, - build_spread_record_non_discriminated_union2_put_request, - build_spread_record_non_discriminated_union3_get_request, - build_spread_record_non_discriminated_union3_put_request, - build_spread_record_non_discriminated_union_get_request, - build_spread_record_non_discriminated_union_put_request, - build_spread_record_union_get_request, - build_spread_record_union_put_request, - build_spread_string_get_request, - build_spread_string_put_request, + build_additional_properties_client_extends_different_spread_float_get_request, + build_additional_properties_client_extends_different_spread_float_put_request, + build_additional_properties_client_extends_different_spread_model_array_get_request, + build_additional_properties_client_extends_different_spread_model_array_put_request, + build_additional_properties_client_extends_different_spread_model_get_request, + build_additional_properties_client_extends_different_spread_model_put_request, + build_additional_properties_client_extends_different_spread_string_get_request, + build_additional_properties_client_extends_different_spread_string_put_request, + build_additional_properties_client_extends_float_get_request, + build_additional_properties_client_extends_float_put_request, + build_additional_properties_client_extends_model_array_get_request, + build_additional_properties_client_extends_model_array_put_request, + build_additional_properties_client_extends_model_get_request, + build_additional_properties_client_extends_model_put_request, + build_additional_properties_client_extends_string_get_request, + build_additional_properties_client_extends_string_put_request, + build_additional_properties_client_extends_unknown_derived_get_request, + build_additional_properties_client_extends_unknown_derived_put_request, + build_additional_properties_client_extends_unknown_discriminated_get_request, + build_additional_properties_client_extends_unknown_discriminated_put_request, + build_additional_properties_client_extends_unknown_get_request, + build_additional_properties_client_extends_unknown_put_request, + build_additional_properties_client_is_float_get_request, + build_additional_properties_client_is_float_put_request, + build_additional_properties_client_is_model_array_get_request, + build_additional_properties_client_is_model_array_put_request, + build_additional_properties_client_is_model_get_request, + build_additional_properties_client_is_model_put_request, + build_additional_properties_client_is_string_get_request, + build_additional_properties_client_is_string_put_request, + build_additional_properties_client_is_unknown_derived_get_request, + build_additional_properties_client_is_unknown_derived_put_request, + build_additional_properties_client_is_unknown_discriminated_get_request, + build_additional_properties_client_is_unknown_discriminated_put_request, + build_additional_properties_client_is_unknown_get_request, + build_additional_properties_client_is_unknown_put_request, + build_additional_properties_client_multiple_spread_get_request, + build_additional_properties_client_multiple_spread_put_request, + build_additional_properties_client_spread_different_float_get_request, + build_additional_properties_client_spread_different_float_put_request, + build_additional_properties_client_spread_different_model_array_get_request, + build_additional_properties_client_spread_different_model_array_put_request, + build_additional_properties_client_spread_different_model_get_request, + build_additional_properties_client_spread_different_model_put_request, + build_additional_properties_client_spread_different_string_get_request, + build_additional_properties_client_spread_different_string_put_request, + build_additional_properties_client_spread_float_get_request, + build_additional_properties_client_spread_float_put_request, + build_additional_properties_client_spread_model_array_get_request, + build_additional_properties_client_spread_model_array_put_request, + build_additional_properties_client_spread_model_get_request, + build_additional_properties_client_spread_model_put_request, + build_additional_properties_client_spread_record_non_discriminated_union2_get_request, + build_additional_properties_client_spread_record_non_discriminated_union2_put_request, + build_additional_properties_client_spread_record_non_discriminated_union3_get_request, + build_additional_properties_client_spread_record_non_discriminated_union3_put_request, + build_additional_properties_client_spread_record_non_discriminated_union_get_request, + build_additional_properties_client_spread_record_non_discriminated_union_put_request, + build_additional_properties_client_spread_record_union_get_request, + build_additional_properties_client_spread_record_union_put_request, + build_additional_properties_client_spread_string_get_request, + build_additional_properties_client_spread_string_put_request, ) from .._configuration import AdditionalPropertiesClientConfiguration @@ -101,14 +101,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ExtendsUnknownOperations: +class AdditionalPropertiesClientExtendsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown` attribute. + :attr:`additional_properties_client_extends_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -142,7 +142,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_unknown_get_request( + _request = build_additional_properties_client_extends_unknown_get_request( headers=_headers, params=_params, ) @@ -256,7 +256,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_put_request( + _request = build_additional_properties_client_extends_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -282,14 +282,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDerivedOperations: +class AdditionalPropertiesClientExtendsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown_derived` attribute. + :attr:`additional_properties_client_extends_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -324,7 +324,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_extends_unknown_derived_get_request( + _request = build_additional_properties_client_extends_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -444,7 +444,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_derived_put_request( + _request = build_additional_properties_client_extends_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -470,14 +470,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown_discriminated` attribute. + :attr:`additional_properties_client_extends_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -512,7 +512,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_extends_unknown_discriminated_get_request( + _request = build_additional_properties_client_extends_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -632,7 +632,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_discriminated_put_request( + _request = build_additional_properties_client_extends_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -658,14 +658,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownOperations: +class AdditionalPropertiesClientIsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown` attribute. + :attr:`additional_properties_client_is_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -699,7 +699,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: cls: ClsType[_models.IsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_unknown_get_request( + _request = build_additional_properties_client_is_unknown_get_request( headers=_headers, params=_params, ) @@ -811,7 +811,7 @@ async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_put_request( + _request = build_additional_properties_client_is_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -837,14 +837,14 @@ async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[ return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDerivedOperations: +class AdditionalPropertiesClientIsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown_derived` attribute. + :attr:`additional_properties_client_is_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -878,7 +878,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv cls: ClsType[_models.IsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_is_unknown_derived_get_request( + _request = build_additional_properties_client_is_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -996,7 +996,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_derived_put_request( + _request = build_additional_properties_client_is_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1022,14 +1022,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientIsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown_discriminated` attribute. + :attr:`additional_properties_client_is_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1064,7 +1064,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr cls: ClsType[_models.IsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_is_unknown_discriminated_get_request( + _request = build_additional_properties_client_is_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -1184,7 +1184,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_discriminated_put_request( + _request = build_additional_properties_client_is_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1210,14 +1210,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsStringOperations: +class AdditionalPropertiesClientExtendsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_string` attribute. + :attr:`additional_properties_client_extends_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1251,7 +1251,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: cls: ClsType[_models.ExtendsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_string_get_request( + _request = build_additional_properties_client_extends_string_get_request( headers=_headers, params=_params, ) @@ -1363,7 +1363,7 @@ async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_string_put_request( + _request = build_additional_properties_client_extends_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1389,14 +1389,14 @@ async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsStringOperations: +class AdditionalPropertiesClientIsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_string` attribute. + :attr:`additional_properties_client_is_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1430,7 +1430,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: cls: ClsType[_models.IsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_string_get_request( + _request = build_additional_properties_client_is_string_get_request( headers=_headers, params=_params, ) @@ -1542,7 +1542,7 @@ async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_string_put_request( + _request = build_additional_properties_client_is_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1568,14 +1568,14 @@ async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class SpreadStringOperations: +class AdditionalPropertiesClientSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_string` attribute. + :attr:`additional_properties_client_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1608,7 +1608,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: cls: ClsType[_models.SpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_string_get_request( + _request = build_additional_properties_client_spread_string_get_request( headers=_headers, params=_params, ) @@ -1719,7 +1719,7 @@ async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_string_put_request( + _request = build_additional_properties_client_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1745,14 +1745,14 @@ async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class ExtendsFloatOperations: +class AdditionalPropertiesClientExtendsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_float` attribute. + :attr:`additional_properties_client_extends_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1786,7 +1786,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: cls: ClsType[_models.ExtendsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_float_get_request( + _request = build_additional_properties_client_extends_float_get_request( headers=_headers, params=_params, ) @@ -1898,7 +1898,7 @@ async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_float_put_request( + _request = build_additional_properties_client_extends_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1924,14 +1924,14 @@ async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsFloatOperations: +class AdditionalPropertiesClientIsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_float` attribute. + :attr:`additional_properties_client_is_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1965,7 +1965,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: cls: ClsType[_models.IsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_float_get_request( + _request = build_additional_properties_client_is_float_get_request( headers=_headers, params=_params, ) @@ -2077,7 +2077,7 @@ async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_float_put_request( + _request = build_additional_properties_client_is_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2103,14 +2103,14 @@ async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadFloatOperations: +class AdditionalPropertiesClientSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_float` attribute. + :attr:`additional_properties_client_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2143,7 +2143,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: cls: ClsType[_models.SpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_float_get_request( + _request = build_additional_properties_client_spread_float_get_request( headers=_headers, params=_params, ) @@ -2254,7 +2254,7 @@ async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_float_put_request( + _request = build_additional_properties_client_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2280,14 +2280,14 @@ async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **k return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelOperations: +class AdditionalPropertiesClientExtendsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_model` attribute. + :attr:`additional_properties_client_extends_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2321,7 +2321,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: cls: ClsType[_models.ExtendsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_get_request( + _request = build_additional_properties_client_extends_model_get_request( headers=_headers, params=_params, ) @@ -2433,7 +2433,7 @@ async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_put_request( + _request = build_additional_properties_client_extends_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2459,14 +2459,14 @@ async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsModelOperations: +class AdditionalPropertiesClientIsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_model` attribute. + :attr:`additional_properties_client_is_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2500,7 +2500,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: cls: ClsType[_models.IsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_get_request( + _request = build_additional_properties_client_is_model_get_request( headers=_headers, params=_params, ) @@ -2612,7 +2612,7 @@ async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_put_request( + _request = build_additional_properties_client_is_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2638,14 +2638,14 @@ async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelOperations: +class AdditionalPropertiesClientSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_model` attribute. + :attr:`additional_properties_client_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2678,7 +2678,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: cls: ClsType[_models.SpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_model_get_request( + _request = build_additional_properties_client_spread_model_get_request( headers=_headers, params=_params, ) @@ -2789,7 +2789,7 @@ async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_put_request( + _request = build_additional_properties_client_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2815,14 +2815,14 @@ async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **k return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelArrayOperations: +class AdditionalPropertiesClientExtendsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_model_array` attribute. + :attr:`additional_properties_client_extends_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2856,7 +2856,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert cls: ClsType[_models.ExtendsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_array_get_request( + _request = build_additional_properties_client_extends_model_array_get_request( headers=_headers, params=_params, ) @@ -2976,7 +2976,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_array_put_request( + _request = build_additional_properties_client_extends_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3002,14 +3002,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsModelArrayOperations: +class AdditionalPropertiesClientIsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_model_array` attribute. + :attr:`additional_properties_client_is_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3043,7 +3043,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: cls: ClsType[_models.IsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_array_get_request( + _request = build_additional_properties_client_is_model_array_get_request( headers=_headers, params=_params, ) @@ -3155,7 +3155,7 @@ async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_array_put_request( + _request = build_additional_properties_client_is_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3181,14 +3181,14 @@ async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelArrayOperations: +class AdditionalPropertiesClientSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_model_array` attribute. + :attr:`additional_properties_client_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3221,7 +3221,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: cls: ClsType[_models.SpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_model_array_get_request( + _request = build_additional_properties_client_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -3333,7 +3333,7 @@ async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_array_put_request( + _request = build_additional_properties_client_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3359,14 +3359,14 @@ async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentStringOperations: +class AdditionalPropertiesClientSpreadDifferentStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_string` attribute. + :attr:`additional_properties_client_spread_different_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3400,7 +3400,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: cls: ClsType[_models.DifferentSpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_different_string_get_request( + _request = build_additional_properties_client_spread_different_string_get_request( headers=_headers, params=_params, ) @@ -3512,7 +3512,7 @@ async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_string_put_request( + _request = build_additional_properties_client_spread_different_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3538,14 +3538,14 @@ async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentFloatOperations: +class AdditionalPropertiesClientSpreadDifferentFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_float` attribute. + :attr:`additional_properties_client_spread_different_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3579,7 +3579,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: cls: ClsType[_models.DifferentSpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_different_float_get_request( + _request = build_additional_properties_client_spread_different_float_get_request( headers=_headers, params=_params, ) @@ -3691,7 +3691,7 @@ async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_float_put_request( + _request = build_additional_properties_client_spread_different_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3717,14 +3717,14 @@ async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelOperations: +class AdditionalPropertiesClientSpreadDifferentModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_model` attribute. + :attr:`additional_properties_client_spread_different_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3758,7 +3758,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: cls: ClsType[_models.DifferentSpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_get_request( + _request = build_additional_properties_client_spread_different_model_get_request( headers=_headers, params=_params, ) @@ -3870,7 +3870,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_put_request( + _request = build_additional_properties_client_spread_different_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3896,14 +3896,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelArrayOperations: +class AdditionalPropertiesClientSpreadDifferentModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_model_array` attribute. + :attr:`additional_properties_client_spread_different_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3937,7 +3937,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: cls: ClsType[_models.DifferentSpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_array_get_request( + _request = build_additional_properties_client_spread_different_model_array_get_request( headers=_headers, params=_params, ) @@ -4049,7 +4049,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_array_put_request( + _request = build_additional_properties_client_spread_different_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4075,14 +4075,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadStringOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_string` attribute. + :attr:`additional_properties_client_extends_different_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4116,7 +4116,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: cls: ClsType[_models.DifferentSpreadStringDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_string_get_request( + _request = build_additional_properties_client_extends_different_spread_string_get_request( headers=_headers, params=_params, ) @@ -4228,7 +4228,7 @@ async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_string_put_request( + _request = build_additional_properties_client_extends_different_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4254,14 +4254,14 @@ async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadFloatOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_float` attribute. + :attr:`additional_properties_client_extends_different_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4295,7 +4295,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: cls: ClsType[_models.DifferentSpreadFloatDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_float_get_request( + _request = build_additional_properties_client_extends_different_spread_float_get_request( headers=_headers, params=_params, ) @@ -4407,7 +4407,7 @@ async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_float_put_request( + _request = build_additional_properties_client_extends_different_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4433,14 +4433,14 @@ async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model` attribute. + :attr:`additional_properties_client_extends_different_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4474,7 +4474,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: cls: ClsType[_models.DifferentSpreadModelDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_get_request( + _request = build_additional_properties_client_extends_different_spread_model_get_request( headers=_headers, params=_params, ) @@ -4586,7 +4586,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_put_request( + _request = build_additional_properties_client_extends_different_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4612,14 +4612,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model_array` attribute. + :attr:`additional_properties_client_extends_different_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4653,7 +4653,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: cls: ClsType[_models.DifferentSpreadModelArrayDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_array_get_request( + _request = build_additional_properties_client_extends_different_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -4765,7 +4765,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_array_put_request( + _request = build_additional_properties_client_extends_different_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4791,14 +4791,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, return cls(pipeline_response, None, {}) # type: ignore -class MultipleSpreadOperations: +class AdditionalPropertiesClientMultipleSpreadOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`multiple_spread` attribute. + :attr:`additional_properties_client_multiple_spread` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4831,7 +4831,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: cls: ClsType[_models.MultipleSpreadRecord] = kwargs.pop("cls", None) - _request = build_multiple_spread_get_request( + _request = build_additional_properties_client_multiple_spread_get_request( headers=_headers, params=_params, ) @@ -4943,7 +4943,7 @@ async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_multiple_spread_put_request( + _request = build_additional_properties_client_multiple_spread_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4969,14 +4969,14 @@ async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordUnionOperations: +class AdditionalPropertiesClientSpreadRecordUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_union` attribute. + :attr:`additional_properties_client_spread_record_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5009,7 +5009,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: cls: ClsType[_models.SpreadRecordForUnion] = kwargs.pop("cls", None) - _request = build_spread_record_union_get_request( + _request = build_additional_properties_client_spread_record_union_get_request( headers=_headers, params=_params, ) @@ -5121,7 +5121,7 @@ async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_union_put_request( + _request = build_additional_properties_client_spread_record_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5147,14 +5147,14 @@ async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5188,7 +5188,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_get_request( headers=_headers, params=_params, ) @@ -5306,7 +5306,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5332,14 +5332,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union2` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5373,7 +5373,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion2] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union2_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_get_request( headers=_headers, params=_params, ) @@ -5493,7 +5493,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union2_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5519,14 +5519,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union3` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5560,7 +5560,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion3] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union3_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_get_request( headers=_headers, params=_params, ) @@ -5680,7 +5680,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union3_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py index 5cb7c3e9a7..3702b9f812 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py @@ -12,74 +12,74 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExtendsUnknownOperations # type: ignore -from ._operations import ExtendsUnknownDerivedOperations # type: ignore -from ._operations import ExtendsUnknownDiscriminatedOperations # type: ignore -from ._operations import IsUnknownOperations # type: ignore -from ._operations import IsUnknownDerivedOperations # type: ignore -from ._operations import IsUnknownDiscriminatedOperations # type: ignore -from ._operations import ExtendsStringOperations # type: ignore -from ._operations import IsStringOperations # type: ignore -from ._operations import SpreadStringOperations # type: ignore -from ._operations import ExtendsFloatOperations # type: ignore -from ._operations import IsFloatOperations # type: ignore -from ._operations import SpreadFloatOperations # type: ignore -from ._operations import ExtendsModelOperations # type: ignore -from ._operations import IsModelOperations # type: ignore -from ._operations import SpreadModelOperations # type: ignore -from ._operations import ExtendsModelArrayOperations # type: ignore -from ._operations import IsModelArrayOperations # type: ignore -from ._operations import SpreadModelArrayOperations # type: ignore -from ._operations import SpreadDifferentStringOperations # type: ignore -from ._operations import SpreadDifferentFloatOperations # type: ignore -from ._operations import SpreadDifferentModelOperations # type: ignore -from ._operations import SpreadDifferentModelArrayOperations # type: ignore -from ._operations import ExtendsDifferentSpreadStringOperations # type: ignore -from ._operations import ExtendsDifferentSpreadFloatOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelArrayOperations # type: ignore -from ._operations import MultipleSpreadOperations # type: ignore -from ._operations import SpreadRecordUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion2Operations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion3Operations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientMultipleSpreadOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExtendsUnknownOperations", - "ExtendsUnknownDerivedOperations", - "ExtendsUnknownDiscriminatedOperations", - "IsUnknownOperations", - "IsUnknownDerivedOperations", - "IsUnknownDiscriminatedOperations", - "ExtendsStringOperations", - "IsStringOperations", - "SpreadStringOperations", - "ExtendsFloatOperations", - "IsFloatOperations", - "SpreadFloatOperations", - "ExtendsModelOperations", - "IsModelOperations", - "SpreadModelOperations", - "ExtendsModelArrayOperations", - "IsModelArrayOperations", - "SpreadModelArrayOperations", - "SpreadDifferentStringOperations", - "SpreadDifferentFloatOperations", - "SpreadDifferentModelOperations", - "SpreadDifferentModelArrayOperations", - "ExtendsDifferentSpreadStringOperations", - "ExtendsDifferentSpreadFloatOperations", - "ExtendsDifferentSpreadModelOperations", - "ExtendsDifferentSpreadModelArrayOperations", - "MultipleSpreadOperations", - "SpreadRecordUnionOperations", - "SpreadRecordNonDiscriminatedUnionOperations", - "SpreadRecordNonDiscriminatedUnion2Operations", - "SpreadRecordNonDiscriminatedUnion3Operations", + "AdditionalPropertiesClientExtendsUnknownOperations", + "AdditionalPropertiesClientExtendsUnknownDerivedOperations", + "AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientIsUnknownOperations", + "AdditionalPropertiesClientIsUnknownDerivedOperations", + "AdditionalPropertiesClientIsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientExtendsStringOperations", + "AdditionalPropertiesClientIsStringOperations", + "AdditionalPropertiesClientSpreadStringOperations", + "AdditionalPropertiesClientExtendsFloatOperations", + "AdditionalPropertiesClientIsFloatOperations", + "AdditionalPropertiesClientSpreadFloatOperations", + "AdditionalPropertiesClientExtendsModelOperations", + "AdditionalPropertiesClientIsModelOperations", + "AdditionalPropertiesClientSpreadModelOperations", + "AdditionalPropertiesClientExtendsModelArrayOperations", + "AdditionalPropertiesClientIsModelArrayOperations", + "AdditionalPropertiesClientSpreadModelArrayOperations", + "AdditionalPropertiesClientSpreadDifferentStringOperations", + "AdditionalPropertiesClientSpreadDifferentFloatOperations", + "AdditionalPropertiesClientSpreadDifferentModelOperations", + "AdditionalPropertiesClientSpreadDifferentModelArrayOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadStringOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations", + "AdditionalPropertiesClientMultipleSpreadOperations", + "AdditionalPropertiesClientSpreadRecordUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py index 36e8a63814..c484c1e0f2 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -40,7 +40,9 @@ _SERIALIZER.client_side_validation = False -def build_extends_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_unknown_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -54,7 +56,9 @@ def build_extends_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_unknown_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -68,7 +72,9 @@ def build_extends_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_derived_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -82,7 +88,9 @@ def build_extends_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_derived_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -96,7 +104,9 @@ def build_extends_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_discriminated_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -110,7 +120,9 @@ def build_extends_unknown_discriminated_get_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_discriminated_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -124,7 +136,9 @@ def build_extends_unknown_discriminated_put_request(**kwargs: Any) -> HttpReques return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -138,7 +152,9 @@ def build_is_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +168,9 @@ def build_is_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_derived_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -166,7 +184,9 @@ def build_is_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_derived_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -180,7 +200,9 @@ def build_is_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_is_unknown_discriminated_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -194,7 +216,9 @@ def build_is_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_is_unknown_discriminated_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -208,7 +232,9 @@ def build_is_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -222,7 +248,9 @@ def build_extends_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -236,7 +264,9 @@ def build_extends_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -250,7 +280,9 @@ def build_is_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -264,7 +296,9 @@ def build_is_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -278,7 +312,9 @@ def build_spread_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -292,7 +328,9 @@ def build_spread_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -306,7 +344,9 @@ def build_extends_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -320,7 +360,9 @@ def build_extends_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -334,7 +376,9 @@ def build_is_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -348,7 +392,9 @@ def build_is_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -362,7 +408,9 @@ def build_spread_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -376,7 +424,9 @@ def build_spread_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -390,7 +440,9 @@ def build_extends_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -404,7 +456,9 @@ def build_extends_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -418,7 +472,9 @@ def build_is_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -432,7 +488,9 @@ def build_is_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -446,7 +504,9 @@ def build_spread_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -460,7 +520,9 @@ def build_spread_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -474,7 +536,9 @@ def build_extends_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -488,7 +552,9 @@ def build_extends_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -502,7 +568,9 @@ def build_is_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -516,7 +584,9 @@ def build_is_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -530,7 +600,9 @@ def build_spread_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -544,7 +616,9 @@ def build_spread_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -558,7 +632,9 @@ def build_spread_different_string_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -572,7 +648,9 @@ def build_spread_different_string_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -586,7 +664,9 @@ def build_spread_different_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -600,7 +680,9 @@ def build_spread_different_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -614,7 +696,9 @@ def build_spread_different_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -628,7 +712,9 @@ def build_spread_different_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -642,7 +728,9 @@ def build_spread_different_model_array_get_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_array_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -656,7 +744,9 @@ def build_spread_different_model_array_put_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -670,7 +760,9 @@ def build_extends_different_spread_string_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -684,7 +776,9 @@ def build_extends_different_spread_string_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_float_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -698,7 +792,9 @@ def build_extends_different_spread_float_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_float_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -712,7 +808,9 @@ def build_extends_different_spread_float_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -726,7 +824,9 @@ def build_extends_different_spread_model_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -740,7 +840,7 @@ def build_extends_different_spread_model_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_array_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_array_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -756,7 +856,7 @@ def build_extends_different_spread_model_array_get_request( # pylint: disable=n return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_array_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_array_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -772,7 +872,9 @@ def build_extends_different_spread_model_array_put_request( # pylint: disable=n return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_multiple_spread_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_multiple_spread_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -786,7 +888,9 @@ def build_multiple_spread_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_multiple_spread_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_multiple_spread_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -800,7 +904,9 @@ def build_multiple_spread_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_union_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_record_union_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -814,7 +920,9 @@ def build_spread_record_union_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_union_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_record_union_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -828,7 +936,7 @@ def build_spread_record_union_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -844,7 +952,7 @@ def build_spread_record_non_discriminated_union_get_request( # pylint: disable= return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -860,7 +968,7 @@ def build_spread_record_non_discriminated_union_put_request( # pylint: disable= return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union2_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union2_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -876,7 +984,7 @@ def build_spread_record_non_discriminated_union2_get_request( # pylint: disable return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union2_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union2_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -892,7 +1000,7 @@ def build_spread_record_non_discriminated_union2_put_request( # pylint: disable return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union3_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union3_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -908,7 +1016,7 @@ def build_spread_record_non_discriminated_union3_get_request( # pylint: disable return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union3_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union3_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -924,14 +1032,14 @@ def build_spread_record_non_discriminated_union3_put_request( # pylint: disable return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ExtendsUnknownOperations: +class AdditionalPropertiesClientExtendsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown` attribute. + :attr:`additional_properties_client_extends_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -965,7 +1073,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: cls: ClsType[_models.ExtendsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_unknown_get_request( + _request = build_additional_properties_client_extends_unknown_get_request( headers=_headers, params=_params, ) @@ -1079,7 +1187,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_put_request( + _request = build_additional_properties_client_extends_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1105,14 +1213,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDerivedOperations: +class AdditionalPropertiesClientExtendsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown_derived` attribute. + :attr:`additional_properties_client_extends_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1147,7 +1255,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_extends_unknown_derived_get_request( + _request = build_additional_properties_client_extends_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -1267,7 +1375,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_derived_put_request( + _request = build_additional_properties_client_extends_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1293,14 +1401,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown_discriminated` attribute. + :attr:`additional_properties_client_extends_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1335,7 +1443,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_extends_unknown_discriminated_get_request( + _request = build_additional_properties_client_extends_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -1455,7 +1563,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_discriminated_put_request( + _request = build_additional_properties_client_extends_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1481,14 +1589,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownOperations: +class AdditionalPropertiesClientIsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown` attribute. + :attr:`additional_properties_client_is_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1522,7 +1630,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: cls: ClsType[_models.IsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_unknown_get_request( + _request = build_additional_properties_client_is_unknown_get_request( headers=_headers, params=_params, ) @@ -1636,7 +1744,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_put_request( + _request = build_additional_properties_client_is_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1662,14 +1770,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDerivedOperations: +class AdditionalPropertiesClientIsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown_derived` attribute. + :attr:`additional_properties_client_is_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1703,7 +1811,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: cls: ClsType[_models.IsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_is_unknown_derived_get_request( + _request = build_additional_properties_client_is_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -1821,7 +1929,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_derived_put_request( + _request = build_additional_properties_client_is_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1847,14 +1955,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientIsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown_discriminated` attribute. + :attr:`additional_properties_client_is_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1889,7 +1997,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat cls: ClsType[_models.IsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_is_unknown_discriminated_get_request( + _request = build_additional_properties_client_is_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -2009,7 +2117,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_discriminated_put_request( + _request = build_additional_properties_client_is_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2035,14 +2143,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsStringOperations: +class AdditionalPropertiesClientExtendsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_string` attribute. + :attr:`additional_properties_client_extends_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2076,7 +2184,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: cls: ClsType[_models.ExtendsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_string_get_request( + _request = build_additional_properties_client_extends_string_get_request( headers=_headers, params=_params, ) @@ -2190,7 +2298,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_string_put_request( + _request = build_additional_properties_client_extends_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2216,14 +2324,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsStringOperations: +class AdditionalPropertiesClientIsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_string` attribute. + :attr:`additional_properties_client_is_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2257,7 +2365,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: cls: ClsType[_models.IsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_string_get_request( + _request = build_additional_properties_client_is_string_get_request( headers=_headers, params=_params, ) @@ -2371,7 +2479,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_string_put_request( + _request = build_additional_properties_client_is_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2397,14 +2505,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadStringOperations: +class AdditionalPropertiesClientSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_string` attribute. + :attr:`additional_properties_client_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2437,7 +2545,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: cls: ClsType[_models.SpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_string_get_request( + _request = build_additional_properties_client_spread_string_get_request( headers=_headers, params=_params, ) @@ -2548,7 +2656,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_string_put_request( + _request = build_additional_properties_client_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2574,14 +2682,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsFloatOperations: +class AdditionalPropertiesClientExtendsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_float` attribute. + :attr:`additional_properties_client_extends_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2615,7 +2723,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: cls: ClsType[_models.ExtendsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_float_get_request( + _request = build_additional_properties_client_extends_float_get_request( headers=_headers, params=_params, ) @@ -2729,7 +2837,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_float_put_request( + _request = build_additional_properties_client_extends_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2755,14 +2863,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsFloatOperations: +class AdditionalPropertiesClientIsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_float` attribute. + :attr:`additional_properties_client_is_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2796,7 +2904,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: cls: ClsType[_models.IsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_float_get_request( + _request = build_additional_properties_client_is_float_get_request( headers=_headers, params=_params, ) @@ -2910,7 +3018,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_float_put_request( + _request = build_additional_properties_client_is_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2936,14 +3044,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadFloatOperations: +class AdditionalPropertiesClientSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_float` attribute. + :attr:`additional_properties_client_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2976,7 +3084,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: cls: ClsType[_models.SpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_float_get_request( + _request = build_additional_properties_client_spread_float_get_request( headers=_headers, params=_params, ) @@ -3087,7 +3195,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_float_put_request( + _request = build_additional_properties_client_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3113,14 +3221,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelOperations: +class AdditionalPropertiesClientExtendsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_model` attribute. + :attr:`additional_properties_client_extends_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3154,7 +3262,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: cls: ClsType[_models.ExtendsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_get_request( + _request = build_additional_properties_client_extends_model_get_request( headers=_headers, params=_params, ) @@ -3268,7 +3376,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_put_request( + _request = build_additional_properties_client_extends_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3294,14 +3402,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsModelOperations: +class AdditionalPropertiesClientIsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_model` attribute. + :attr:`additional_properties_client_is_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3335,7 +3443,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: cls: ClsType[_models.IsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_get_request( + _request = build_additional_properties_client_is_model_get_request( headers=_headers, params=_params, ) @@ -3449,7 +3557,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_put_request( + _request = build_additional_properties_client_is_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3475,14 +3583,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelOperations: +class AdditionalPropertiesClientSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_model` attribute. + :attr:`additional_properties_client_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3515,7 +3623,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: cls: ClsType[_models.SpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_model_get_request( + _request = build_additional_properties_client_spread_model_get_request( headers=_headers, params=_params, ) @@ -3626,7 +3734,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_put_request( + _request = build_additional_properties_client_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3652,14 +3760,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelArrayOperations: +class AdditionalPropertiesClientExtendsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_model_array` attribute. + :attr:`additional_properties_client_extends_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3693,7 +3801,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: cls: ClsType[_models.ExtendsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_array_get_request( + _request = build_additional_properties_client_extends_model_array_get_request( headers=_headers, params=_params, ) @@ -3813,7 +3921,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_array_put_request( + _request = build_additional_properties_client_extends_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3839,14 +3947,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsModelArrayOperations: +class AdditionalPropertiesClientIsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_model_array` attribute. + :attr:`additional_properties_client_is_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3880,7 +3988,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: cls: ClsType[_models.IsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_array_get_request( + _request = build_additional_properties_client_is_model_array_get_request( headers=_headers, params=_params, ) @@ -3994,7 +4102,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_array_put_request( + _request = build_additional_properties_client_is_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4020,14 +4128,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelArrayOperations: +class AdditionalPropertiesClientSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_model_array` attribute. + :attr:`additional_properties_client_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4060,7 +4168,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: cls: ClsType[_models.SpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_model_array_get_request( + _request = build_additional_properties_client_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -4174,7 +4282,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_array_put_request( + _request = build_additional_properties_client_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4200,14 +4308,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentStringOperations: +class AdditionalPropertiesClientSpreadDifferentStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_string` attribute. + :attr:`additional_properties_client_spread_different_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4241,7 +4349,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: cls: ClsType[_models.DifferentSpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_different_string_get_request( + _request = build_additional_properties_client_spread_different_string_get_request( headers=_headers, params=_params, ) @@ -4355,7 +4463,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_string_put_request( + _request = build_additional_properties_client_spread_different_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4381,14 +4489,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentFloatOperations: +class AdditionalPropertiesClientSpreadDifferentFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_float` attribute. + :attr:`additional_properties_client_spread_different_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4422,7 +4530,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: cls: ClsType[_models.DifferentSpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_different_float_get_request( + _request = build_additional_properties_client_spread_different_float_get_request( headers=_headers, params=_params, ) @@ -4536,7 +4644,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_float_put_request( + _request = build_additional_properties_client_spread_different_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4562,14 +4670,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelOperations: +class AdditionalPropertiesClientSpreadDifferentModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_model` attribute. + :attr:`additional_properties_client_spread_different_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4603,7 +4711,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: cls: ClsType[_models.DifferentSpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_get_request( + _request = build_additional_properties_client_spread_different_model_get_request( headers=_headers, params=_params, ) @@ -4717,7 +4825,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_put_request( + _request = build_additional_properties_client_spread_different_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4743,14 +4851,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelArrayOperations: +class AdditionalPropertiesClientSpreadDifferentModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_model_array` attribute. + :attr:`additional_properties_client_spread_different_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4784,7 +4892,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: cls: ClsType[_models.DifferentSpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_array_get_request( + _request = build_additional_properties_client_spread_different_model_array_get_request( headers=_headers, params=_params, ) @@ -4898,7 +5006,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_array_put_request( + _request = build_additional_properties_client_spread_different_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4924,14 +5032,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadStringOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_string` attribute. + :attr:`additional_properties_client_extends_different_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4965,7 +5073,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: cls: ClsType[_models.DifferentSpreadStringDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_string_get_request( + _request = build_additional_properties_client_extends_different_spread_string_get_request( headers=_headers, params=_params, ) @@ -5079,7 +5187,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_string_put_request( + _request = build_additional_properties_client_extends_different_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5105,14 +5213,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadFloatOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_float` attribute. + :attr:`additional_properties_client_extends_different_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5146,7 +5254,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: cls: ClsType[_models.DifferentSpreadFloatDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_float_get_request( + _request = build_additional_properties_client_extends_different_spread_float_get_request( headers=_headers, params=_params, ) @@ -5260,7 +5368,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_float_put_request( + _request = build_additional_properties_client_extends_different_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5286,14 +5394,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model` attribute. + :attr:`additional_properties_client_extends_different_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5327,7 +5435,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: cls: ClsType[_models.DifferentSpreadModelDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_get_request( + _request = build_additional_properties_client_extends_different_spread_model_get_request( headers=_headers, params=_params, ) @@ -5441,7 +5549,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_put_request( + _request = build_additional_properties_client_extends_different_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5467,14 +5575,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model_array` attribute. + :attr:`additional_properties_client_extends_different_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5508,7 +5616,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: cls: ClsType[_models.DifferentSpreadModelArrayDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_array_get_request( + _request = build_additional_properties_client_extends_different_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -5622,7 +5730,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_array_put_request( + _request = build_additional_properties_client_extends_different_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5648,14 +5756,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MultipleSpreadOperations: +class AdditionalPropertiesClientMultipleSpreadOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`multiple_spread` attribute. + :attr:`additional_properties_client_multiple_spread` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5688,7 +5796,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: cls: ClsType[_models.MultipleSpreadRecord] = kwargs.pop("cls", None) - _request = build_multiple_spread_get_request( + _request = build_additional_properties_client_multiple_spread_get_request( headers=_headers, params=_params, ) @@ -5800,7 +5908,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_multiple_spread_put_request( + _request = build_additional_properties_client_multiple_spread_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5826,14 +5934,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordUnionOperations: +class AdditionalPropertiesClientSpreadRecordUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_union` attribute. + :attr:`additional_properties_client_spread_record_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5866,7 +5974,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: cls: ClsType[_models.SpreadRecordForUnion] = kwargs.pop("cls", None) - _request = build_spread_record_union_get_request( + _request = build_additional_properties_client_spread_record_union_get_request( headers=_headers, params=_params, ) @@ -5978,7 +6086,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_union_put_request( + _request = build_additional_properties_client_spread_record_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -6004,14 +6112,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6045,7 +6153,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_get_request( headers=_headers, params=_params, ) @@ -6163,7 +6271,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -6189,14 +6297,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union2` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6230,7 +6338,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion2] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union2_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_get_request( headers=_headers, params=_params, ) @@ -6350,7 +6458,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union2_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_put_request( content_type=content_type, content=_content, headers=_headers, @@ -6376,14 +6484,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union3` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6417,7 +6525,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion3] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union3_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_get_request( headers=_headers, params=_params, ) @@ -6537,7 +6645,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union3_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-property-nullable/apiview-properties.json index f1e46c1672..0c952d940e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/apiview-properties.json @@ -9,61 +9,61 @@ "typetest.property.nullable.models.DurationProperty": "Type.Property.Nullable.DurationProperty", "typetest.property.nullable.models.InnerModel": "Type.Property.Nullable.InnerModel", "typetest.property.nullable.models.StringProperty": "Type.Property.Nullable.StringProperty", - "typetest.property.nullable.operations.StringOperations.get_non_null": "Type.Property.Nullable.String.getNonNull", - "typetest.property.nullable.aio.operations.StringOperations.get_non_null": "Type.Property.Nullable.String.getNonNull", - "typetest.property.nullable.operations.StringOperations.get_null": "Type.Property.Nullable.String.getNull", - "typetest.property.nullable.aio.operations.StringOperations.get_null": "Type.Property.Nullable.String.getNull", - "typetest.property.nullable.operations.StringOperations.patch_non_null": "Type.Property.Nullable.String.patchNonNull", - "typetest.property.nullable.aio.operations.StringOperations.patch_non_null": "Type.Property.Nullable.String.patchNonNull", - "typetest.property.nullable.operations.StringOperations.patch_null": "Type.Property.Nullable.String.patchNull", - "typetest.property.nullable.aio.operations.StringOperations.patch_null": "Type.Property.Nullable.String.patchNull", - "typetest.property.nullable.operations.BytesOperations.get_non_null": "Type.Property.Nullable.Bytes.getNonNull", - "typetest.property.nullable.aio.operations.BytesOperations.get_non_null": "Type.Property.Nullable.Bytes.getNonNull", - "typetest.property.nullable.operations.BytesOperations.get_null": "Type.Property.Nullable.Bytes.getNull", - "typetest.property.nullable.aio.operations.BytesOperations.get_null": "Type.Property.Nullable.Bytes.getNull", - "typetest.property.nullable.operations.BytesOperations.patch_non_null": "Type.Property.Nullable.Bytes.patchNonNull", - "typetest.property.nullable.aio.operations.BytesOperations.patch_non_null": "Type.Property.Nullable.Bytes.patchNonNull", - "typetest.property.nullable.operations.BytesOperations.patch_null": "Type.Property.Nullable.Bytes.patchNull", - "typetest.property.nullable.aio.operations.BytesOperations.patch_null": "Type.Property.Nullable.Bytes.patchNull", - "typetest.property.nullable.operations.DatetimeOperations.get_non_null": "Type.Property.Nullable.Datetime.getNonNull", - "typetest.property.nullable.aio.operations.DatetimeOperations.get_non_null": "Type.Property.Nullable.Datetime.getNonNull", - "typetest.property.nullable.operations.DatetimeOperations.get_null": "Type.Property.Nullable.Datetime.getNull", - "typetest.property.nullable.aio.operations.DatetimeOperations.get_null": "Type.Property.Nullable.Datetime.getNull", - "typetest.property.nullable.operations.DatetimeOperations.patch_non_null": "Type.Property.Nullable.Datetime.patchNonNull", - "typetest.property.nullable.aio.operations.DatetimeOperations.patch_non_null": "Type.Property.Nullable.Datetime.patchNonNull", - "typetest.property.nullable.operations.DatetimeOperations.patch_null": "Type.Property.Nullable.Datetime.patchNull", - "typetest.property.nullable.aio.operations.DatetimeOperations.patch_null": "Type.Property.Nullable.Datetime.patchNull", - "typetest.property.nullable.operations.DurationOperations.get_non_null": "Type.Property.Nullable.Duration.getNonNull", - "typetest.property.nullable.aio.operations.DurationOperations.get_non_null": "Type.Property.Nullable.Duration.getNonNull", - "typetest.property.nullable.operations.DurationOperations.get_null": "Type.Property.Nullable.Duration.getNull", - "typetest.property.nullable.aio.operations.DurationOperations.get_null": "Type.Property.Nullable.Duration.getNull", - "typetest.property.nullable.operations.DurationOperations.patch_non_null": "Type.Property.Nullable.Duration.patchNonNull", - "typetest.property.nullable.aio.operations.DurationOperations.patch_non_null": "Type.Property.Nullable.Duration.patchNonNull", - "typetest.property.nullable.operations.DurationOperations.patch_null": "Type.Property.Nullable.Duration.patchNull", - "typetest.property.nullable.aio.operations.DurationOperations.patch_null": "Type.Property.Nullable.Duration.patchNull", - "typetest.property.nullable.operations.CollectionsByteOperations.get_non_null": "Type.Property.Nullable.CollectionsByte.getNonNull", - "typetest.property.nullable.aio.operations.CollectionsByteOperations.get_non_null": "Type.Property.Nullable.CollectionsByte.getNonNull", - "typetest.property.nullable.operations.CollectionsByteOperations.get_null": "Type.Property.Nullable.CollectionsByte.getNull", - "typetest.property.nullable.aio.operations.CollectionsByteOperations.get_null": "Type.Property.Nullable.CollectionsByte.getNull", - "typetest.property.nullable.operations.CollectionsByteOperations.patch_non_null": "Type.Property.Nullable.CollectionsByte.patchNonNull", - "typetest.property.nullable.aio.operations.CollectionsByteOperations.patch_non_null": "Type.Property.Nullable.CollectionsByte.patchNonNull", - "typetest.property.nullable.operations.CollectionsByteOperations.patch_null": "Type.Property.Nullable.CollectionsByte.patchNull", - "typetest.property.nullable.aio.operations.CollectionsByteOperations.patch_null": "Type.Property.Nullable.CollectionsByte.patchNull", - "typetest.property.nullable.operations.CollectionsModelOperations.get_non_null": "Type.Property.Nullable.CollectionsModel.getNonNull", - "typetest.property.nullable.aio.operations.CollectionsModelOperations.get_non_null": "Type.Property.Nullable.CollectionsModel.getNonNull", - "typetest.property.nullable.operations.CollectionsModelOperations.get_null": "Type.Property.Nullable.CollectionsModel.getNull", - "typetest.property.nullable.aio.operations.CollectionsModelOperations.get_null": "Type.Property.Nullable.CollectionsModel.getNull", - "typetest.property.nullable.operations.CollectionsModelOperations.patch_non_null": "Type.Property.Nullable.CollectionsModel.patchNonNull", - "typetest.property.nullable.aio.operations.CollectionsModelOperations.patch_non_null": "Type.Property.Nullable.CollectionsModel.patchNonNull", - "typetest.property.nullable.operations.CollectionsModelOperations.patch_null": "Type.Property.Nullable.CollectionsModel.patchNull", - "typetest.property.nullable.aio.operations.CollectionsModelOperations.patch_null": "Type.Property.Nullable.CollectionsModel.patchNull", - "typetest.property.nullable.operations.CollectionsStringOperations.get_non_null": "Type.Property.Nullable.CollectionsString.getNonNull", - "typetest.property.nullable.aio.operations.CollectionsStringOperations.get_non_null": "Type.Property.Nullable.CollectionsString.getNonNull", - "typetest.property.nullable.operations.CollectionsStringOperations.get_null": "Type.Property.Nullable.CollectionsString.getNull", - "typetest.property.nullable.aio.operations.CollectionsStringOperations.get_null": "Type.Property.Nullable.CollectionsString.getNull", - "typetest.property.nullable.operations.CollectionsStringOperations.patch_non_null": "Type.Property.Nullable.CollectionsString.patchNonNull", - "typetest.property.nullable.aio.operations.CollectionsStringOperations.patch_non_null": "Type.Property.Nullable.CollectionsString.patchNonNull", - "typetest.property.nullable.operations.CollectionsStringOperations.patch_null": "Type.Property.Nullable.CollectionsString.patchNull", - "typetest.property.nullable.aio.operations.CollectionsStringOperations.patch_null": "Type.Property.Nullable.CollectionsString.patchNull" + "typetest.property.nullable.operations.NullableClientStringOperations.get_non_null": "Type.Property.Nullable.String.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientStringOperations.get_non_null": "Type.Property.Nullable.String.getNonNull", + "typetest.property.nullable.operations.NullableClientStringOperations.get_null": "Type.Property.Nullable.String.getNull", + "typetest.property.nullable.aio.operations.NullableClientStringOperations.get_null": "Type.Property.Nullable.String.getNull", + "typetest.property.nullable.operations.NullableClientStringOperations.patch_non_null": "Type.Property.Nullable.String.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientStringOperations.patch_non_null": "Type.Property.Nullable.String.patchNonNull", + "typetest.property.nullable.operations.NullableClientStringOperations.patch_null": "Type.Property.Nullable.String.patchNull", + "typetest.property.nullable.aio.operations.NullableClientStringOperations.patch_null": "Type.Property.Nullable.String.patchNull", + "typetest.property.nullable.operations.NullableClientBytesOperations.get_non_null": "Type.Property.Nullable.Bytes.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientBytesOperations.get_non_null": "Type.Property.Nullable.Bytes.getNonNull", + "typetest.property.nullable.operations.NullableClientBytesOperations.get_null": "Type.Property.Nullable.Bytes.getNull", + "typetest.property.nullable.aio.operations.NullableClientBytesOperations.get_null": "Type.Property.Nullable.Bytes.getNull", + "typetest.property.nullable.operations.NullableClientBytesOperations.patch_non_null": "Type.Property.Nullable.Bytes.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientBytesOperations.patch_non_null": "Type.Property.Nullable.Bytes.patchNonNull", + "typetest.property.nullable.operations.NullableClientBytesOperations.patch_null": "Type.Property.Nullable.Bytes.patchNull", + "typetest.property.nullable.aio.operations.NullableClientBytesOperations.patch_null": "Type.Property.Nullable.Bytes.patchNull", + "typetest.property.nullable.operations.NullableClientDatetimeOperations.get_non_null": "Type.Property.Nullable.Datetime.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientDatetimeOperations.get_non_null": "Type.Property.Nullable.Datetime.getNonNull", + "typetest.property.nullable.operations.NullableClientDatetimeOperations.get_null": "Type.Property.Nullable.Datetime.getNull", + "typetest.property.nullable.aio.operations.NullableClientDatetimeOperations.get_null": "Type.Property.Nullable.Datetime.getNull", + "typetest.property.nullable.operations.NullableClientDatetimeOperations.patch_non_null": "Type.Property.Nullable.Datetime.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientDatetimeOperations.patch_non_null": "Type.Property.Nullable.Datetime.patchNonNull", + "typetest.property.nullable.operations.NullableClientDatetimeOperations.patch_null": "Type.Property.Nullable.Datetime.patchNull", + "typetest.property.nullable.aio.operations.NullableClientDatetimeOperations.patch_null": "Type.Property.Nullable.Datetime.patchNull", + "typetest.property.nullable.operations.NullableClientDurationOperations.get_non_null": "Type.Property.Nullable.Duration.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientDurationOperations.get_non_null": "Type.Property.Nullable.Duration.getNonNull", + "typetest.property.nullable.operations.NullableClientDurationOperations.get_null": "Type.Property.Nullable.Duration.getNull", + "typetest.property.nullable.aio.operations.NullableClientDurationOperations.get_null": "Type.Property.Nullable.Duration.getNull", + "typetest.property.nullable.operations.NullableClientDurationOperations.patch_non_null": "Type.Property.Nullable.Duration.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientDurationOperations.patch_non_null": "Type.Property.Nullable.Duration.patchNonNull", + "typetest.property.nullable.operations.NullableClientDurationOperations.patch_null": "Type.Property.Nullable.Duration.patchNull", + "typetest.property.nullable.aio.operations.NullableClientDurationOperations.patch_null": "Type.Property.Nullable.Duration.patchNull", + "typetest.property.nullable.operations.NullableClientCollectionsByteOperations.get_non_null": "Type.Property.Nullable.CollectionsByte.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations.get_non_null": "Type.Property.Nullable.CollectionsByte.getNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsByteOperations.get_null": "Type.Property.Nullable.CollectionsByte.getNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations.get_null": "Type.Property.Nullable.CollectionsByte.getNull", + "typetest.property.nullable.operations.NullableClientCollectionsByteOperations.patch_non_null": "Type.Property.Nullable.CollectionsByte.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations.patch_non_null": "Type.Property.Nullable.CollectionsByte.patchNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsByteOperations.patch_null": "Type.Property.Nullable.CollectionsByte.patchNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations.patch_null": "Type.Property.Nullable.CollectionsByte.patchNull", + "typetest.property.nullable.operations.NullableClientCollectionsModelOperations.get_non_null": "Type.Property.Nullable.CollectionsModel.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations.get_non_null": "Type.Property.Nullable.CollectionsModel.getNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsModelOperations.get_null": "Type.Property.Nullable.CollectionsModel.getNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations.get_null": "Type.Property.Nullable.CollectionsModel.getNull", + "typetest.property.nullable.operations.NullableClientCollectionsModelOperations.patch_non_null": "Type.Property.Nullable.CollectionsModel.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations.patch_non_null": "Type.Property.Nullable.CollectionsModel.patchNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsModelOperations.patch_null": "Type.Property.Nullable.CollectionsModel.patchNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations.patch_null": "Type.Property.Nullable.CollectionsModel.patchNull", + "typetest.property.nullable.operations.NullableClientCollectionsStringOperations.get_non_null": "Type.Property.Nullable.CollectionsString.getNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations.get_non_null": "Type.Property.Nullable.CollectionsString.getNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsStringOperations.get_null": "Type.Property.Nullable.CollectionsString.getNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations.get_null": "Type.Property.Nullable.CollectionsString.getNull", + "typetest.property.nullable.operations.NullableClientCollectionsStringOperations.patch_non_null": "Type.Property.Nullable.CollectionsString.patchNonNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations.patch_non_null": "Type.Property.Nullable.CollectionsString.patchNonNull", + "typetest.property.nullable.operations.NullableClientCollectionsStringOperations.patch_null": "Type.Property.Nullable.CollectionsString.patchNull", + "typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations.patch_null": "Type.Property.Nullable.CollectionsString.patchNull" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations.py new file mode 100644 index 0000000000..3866271d71 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientBytesOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_bytes_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_bytes.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_bytes_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_bytes.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_bytes_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_bytes.patch_non_null( + body={"nullableProperty": bytes("bytes", encoding="utf-8"), "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_bytes_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_bytes.patch_null( + body={"nullableProperty": bytes("bytes", encoding="utf-8"), "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations_async.py new file mode 100644 index 0000000000..d09143a83f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_bytes_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientBytesOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_bytes_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_bytes.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_bytes_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_bytes.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_bytes_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_bytes.patch_non_null( + body={"nullableProperty": bytes("bytes", encoding="utf-8"), "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_bytes_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_bytes.patch_null( + body={"nullableProperty": bytes("bytes", encoding="utf-8"), "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations.py new file mode 100644 index 0000000000..7413bd1a03 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsByteOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_byte_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_byte.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_byte_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_byte.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_byte_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_byte.patch_non_null( + body={"nullableProperty": [bytes("bytes", encoding="utf-8")], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_byte_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_byte.patch_null( + body={"nullableProperty": [bytes("bytes", encoding="utf-8")], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations_async.py new file mode 100644 index 0000000000..c14e5fce09 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_byte_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsByteOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_byte_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_byte.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_byte_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_byte.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_byte_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_byte.patch_non_null( + body={"nullableProperty": [bytes("bytes", encoding="utf-8")], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_byte_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_byte.patch_null( + body={"nullableProperty": [bytes("bytes", encoding="utf-8")], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations.py new file mode 100644 index 0000000000..f73fc883a1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsModelOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_model_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_model.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_model_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_model.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_model_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_model.patch_non_null( + body={"nullableProperty": [{"property": "str"}], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_model_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_model.patch_null( + body={"nullableProperty": [{"property": "str"}], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations_async.py new file mode 100644 index 0000000000..adcf484b19 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_model_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsModelOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_model_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_model.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_model_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_model.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_model_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_model.patch_non_null( + body={"nullableProperty": [{"property": "str"}], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_model_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_model.patch_null( + body={"nullableProperty": [{"property": "str"}], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations.py new file mode 100644 index 0000000000..9135a6292b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsStringOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_string_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_string.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_string_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_string.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_string_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_string.patch_non_null( + body={"nullableProperty": ["str"], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_collections_string_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_collections_string.patch_null( + body={"nullableProperty": ["str"], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations_async.py new file mode 100644 index 0000000000..8f6c8a9075 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_collections_string_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientCollectionsStringOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_string_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_string.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_string_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_string.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_string_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_string.patch_non_null( + body={"nullableProperty": ["str"], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_collections_string_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_collections_string.patch_null( + body={"nullableProperty": ["str"], "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations.py new file mode 100644 index 0000000000..f5731da745 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientDatetimeOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_datetime_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_datetime.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_datetime_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_datetime.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_datetime_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_datetime.patch_non_null( + body={"nullableProperty": "2020-02-20 00:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_datetime_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_datetime.patch_null( + body={"nullableProperty": "2020-02-20 00:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations_async.py new file mode 100644 index 0000000000..d8a1e96c98 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_datetime_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientDatetimeOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_datetime_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_datetime.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_datetime_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_datetime.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_datetime_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_datetime.patch_non_null( + body={"nullableProperty": "2020-02-20 00:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_datetime_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_datetime.patch_null( + body={"nullableProperty": "2020-02-20 00:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations.py new file mode 100644 index 0000000000..ba5647deba --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientDurationOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_duration_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_duration.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_duration_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_duration.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_duration_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_duration.patch_non_null( + body={"nullableProperty": "1 day, 0:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_duration_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_duration.patch_null( + body={"nullableProperty": "1 day, 0:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations_async.py new file mode 100644 index 0000000000..1afe3a2e79 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_duration_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientDurationOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_duration_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_duration.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_duration_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_duration.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_duration_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_duration.patch_non_null( + body={"nullableProperty": "1 day, 0:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_duration_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_duration.patch_null( + body={"nullableProperty": "1 day, 0:00:00", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations.py new file mode 100644 index 0000000000..a6cc5b2800 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import NullableClientTestBase, NullablePreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientStringOperations(NullableClientTestBase): + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_string_get_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_string.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_string_get_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_string.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_string_patch_non_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_string.patch_non_null( + body={"nullableProperty": "str", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy + def test_nullable_client_string_patch_null(self, nullable_endpoint): + client = self.create_client(endpoint=nullable_endpoint) + response = client.nullable_client_string.patch_null( + body={"nullableProperty": "str", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations_async.py new file mode 100644 index 0000000000..afe46143ae --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/generated_tests/test_nullable_nullable_client_string_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import NullablePreparer +from testpreparer_async import NullableClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestNullableNullableClientStringOperationsAsync(NullableClientTestBaseAsync): + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_string_get_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_string.get_non_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_string_get_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_string.get_null() + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_string_patch_non_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_string.patch_non_null( + body={"nullableProperty": "str", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @NullablePreparer() + @recorded_by_proxy_async + async def test_nullable_client_string_patch_null(self, nullable_endpoint): + client = self.create_async_client(endpoint=nullable_endpoint) + response = await client.nullable_client_string.patch_null( + body={"nullableProperty": "str", "requiredProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_client.py index f7015c5969..3ddb30f294 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/_client.py @@ -17,33 +17,40 @@ from ._configuration import NullableClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - DurationOperations, - StringOperations, + NullableClientBytesOperations, + NullableClientCollectionsByteOperations, + NullableClientCollectionsModelOperations, + NullableClientCollectionsStringOperations, + NullableClientDatetimeOperations, + NullableClientDurationOperations, + NullableClientStringOperations, ) class NullableClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with nullable properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.nullable.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.nullable.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.nullable.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.nullable.operations.DurationOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.nullable.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.nullable.operations.CollectionsModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: typetest.property.nullable.operations.CollectionsStringOperations + :ivar nullable_client_string: NullableClientStringOperations operations + :vartype nullable_client_string: + typetest.property.nullable.operations.NullableClientStringOperations + :ivar nullable_client_bytes: NullableClientBytesOperations operations + :vartype nullable_client_bytes: + typetest.property.nullable.operations.NullableClientBytesOperations + :ivar nullable_client_datetime: NullableClientDatetimeOperations operations + :vartype nullable_client_datetime: + typetest.property.nullable.operations.NullableClientDatetimeOperations + :ivar nullable_client_duration: NullableClientDurationOperations operations + :vartype nullable_client_duration: + typetest.property.nullable.operations.NullableClientDurationOperations + :ivar nullable_client_collections_byte: NullableClientCollectionsByteOperations operations + :vartype nullable_client_collections_byte: + typetest.property.nullable.operations.NullableClientCollectionsByteOperations + :ivar nullable_client_collections_model: NullableClientCollectionsModelOperations operations + :vartype nullable_client_collections_model: + typetest.property.nullable.operations.NullableClientCollectionsModelOperations + :ivar nullable_client_collections_string: NullableClientCollectionsStringOperations operations + :vartype nullable_client_collections_string: + typetest.property.nullable.operations.NullableClientCollectionsStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -76,17 +83,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.nullable_client_string = NullableClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.nullable_client_bytes = NullableClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_string = CollectionsStringOperations( + self.nullable_client_datetime = NullableClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_duration = NullableClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_byte = NullableClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_model = NullableClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_string = NullableClientCollectionsStringOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py index 3ae4a7daab..dec08374fc 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py @@ -17,35 +17,40 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NullableClientConfiguration from .operations import ( - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - DurationOperations, - StringOperations, + NullableClientBytesOperations, + NullableClientCollectionsByteOperations, + NullableClientCollectionsModelOperations, + NullableClientCollectionsStringOperations, + NullableClientDatetimeOperations, + NullableClientDurationOperations, + NullableClientStringOperations, ) class NullableClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with nullable properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.nullable.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.nullable.aio.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.nullable.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.nullable.aio.operations.DurationOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.nullable.aio.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.nullable.aio.operations.CollectionsModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.nullable.aio.operations.CollectionsStringOperations + :ivar nullable_client_string: NullableClientStringOperations operations + :vartype nullable_client_string: + typetest.property.nullable.aio.operations.NullableClientStringOperations + :ivar nullable_client_bytes: NullableClientBytesOperations operations + :vartype nullable_client_bytes: + typetest.property.nullable.aio.operations.NullableClientBytesOperations + :ivar nullable_client_datetime: NullableClientDatetimeOperations operations + :vartype nullable_client_datetime: + typetest.property.nullable.aio.operations.NullableClientDatetimeOperations + :ivar nullable_client_duration: NullableClientDurationOperations operations + :vartype nullable_client_duration: + typetest.property.nullable.aio.operations.NullableClientDurationOperations + :ivar nullable_client_collections_byte: NullableClientCollectionsByteOperations operations + :vartype nullable_client_collections_byte: + typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations + :ivar nullable_client_collections_model: NullableClientCollectionsModelOperations operations + :vartype nullable_client_collections_model: + typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations + :ivar nullable_client_collections_string: NullableClientCollectionsStringOperations operations + :vartype nullable_client_collections_string: + typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -78,17 +83,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.nullable_client_string = NullableClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.nullable_client_bytes = NullableClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_string = CollectionsStringOperations( + self.nullable_client_datetime = NullableClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_duration = NullableClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_byte = NullableClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_model = NullableClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_string = NullableClientCollectionsStringOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py index 30338a73d8..fe90592a57 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py @@ -12,26 +12,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore +from ._operations import NullableClientStringOperations # type: ignore +from ._operations import NullableClientBytesOperations # type: ignore +from ._operations import NullableClientDatetimeOperations # type: ignore +from ._operations import NullableClientDurationOperations # type: ignore +from ._operations import NullableClientCollectionsByteOperations # type: ignore +from ._operations import NullableClientCollectionsModelOperations # type: ignore +from ._operations import NullableClientCollectionsStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "CollectionsStringOperations", + "NullableClientStringOperations", + "NullableClientBytesOperations", + "NullableClientDatetimeOperations", + "NullableClientDurationOperations", + "NullableClientCollectionsByteOperations", + "NullableClientCollectionsModelOperations", + "NullableClientCollectionsStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py index fd9a576823..fd1198a430 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py @@ -31,34 +31,34 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_bytes_get_non_null_request, - build_bytes_get_null_request, - build_bytes_patch_non_null_request, - build_bytes_patch_null_request, - build_collections_byte_get_non_null_request, - build_collections_byte_get_null_request, - build_collections_byte_patch_non_null_request, - build_collections_byte_patch_null_request, - build_collections_model_get_non_null_request, - build_collections_model_get_null_request, - build_collections_model_patch_non_null_request, - build_collections_model_patch_null_request, - build_collections_string_get_non_null_request, - build_collections_string_get_null_request, - build_collections_string_patch_non_null_request, - build_collections_string_patch_null_request, - build_datetime_get_non_null_request, - build_datetime_get_null_request, - build_datetime_patch_non_null_request, - build_datetime_patch_null_request, - build_duration_get_non_null_request, - build_duration_get_null_request, - build_duration_patch_non_null_request, - build_duration_patch_null_request, - build_string_get_non_null_request, - build_string_get_null_request, - build_string_patch_non_null_request, - build_string_patch_null_request, + build_nullable_client_bytes_get_non_null_request, + build_nullable_client_bytes_get_null_request, + build_nullable_client_bytes_patch_non_null_request, + build_nullable_client_bytes_patch_null_request, + build_nullable_client_collections_byte_get_non_null_request, + build_nullable_client_collections_byte_get_null_request, + build_nullable_client_collections_byte_patch_non_null_request, + build_nullable_client_collections_byte_patch_null_request, + build_nullable_client_collections_model_get_non_null_request, + build_nullable_client_collections_model_get_null_request, + build_nullable_client_collections_model_patch_non_null_request, + build_nullable_client_collections_model_patch_null_request, + build_nullable_client_collections_string_get_non_null_request, + build_nullable_client_collections_string_get_null_request, + build_nullable_client_collections_string_patch_non_null_request, + build_nullable_client_collections_string_patch_null_request, + build_nullable_client_datetime_get_non_null_request, + build_nullable_client_datetime_get_null_request, + build_nullable_client_datetime_patch_non_null_request, + build_nullable_client_datetime_patch_null_request, + build_nullable_client_duration_get_non_null_request, + build_nullable_client_duration_get_null_request, + build_nullable_client_duration_patch_non_null_request, + build_nullable_client_duration_patch_null_request, + build_nullable_client_string_get_non_null_request, + build_nullable_client_string_get_null_request, + build_nullable_client_string_patch_non_null_request, + build_nullable_client_string_patch_null_request, ) from .._configuration import NullableClientConfiguration @@ -67,14 +67,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class NullableClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`string` attribute. + :attr:`nullable_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_non_null_request( + _request = build_nullable_client_string_get_non_null_request( headers=_headers, params=_params, ) @@ -161,7 +161,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_null_request( + _request = build_nullable_client_string_get_null_request( headers=_headers, params=_params, ) @@ -275,7 +275,7 @@ async def patch_non_null(self, body: Union[_models.StringProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_non_null_request( + _request = build_nullable_client_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -379,7 +379,7 @@ async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_null_request( + _request = build_nullable_client_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -405,14 +405,14 @@ async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class NullableClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`bytes` attribute. + :attr:`nullable_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -443,7 +443,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_non_null_request( + _request = build_nullable_client_bytes_get_non_null_request( headers=_headers, params=_params, ) @@ -499,7 +499,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_null_request( + _request = build_nullable_client_bytes_get_null_request( headers=_headers, params=_params, ) @@ -613,7 +613,7 @@ async def patch_non_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_non_null_request( + _request = build_nullable_client_bytes_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -717,7 +717,7 @@ async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_null_request( + _request = build_nullable_client_bytes_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -743,14 +743,14 @@ async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class NullableClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`datetime` attribute. + :attr:`nullable_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -781,7 +781,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_non_null_request( + _request = build_nullable_client_datetime_get_non_null_request( headers=_headers, params=_params, ) @@ -837,7 +837,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_null_request( + _request = build_nullable_client_datetime_get_null_request( headers=_headers, params=_params, ) @@ -951,7 +951,7 @@ async def patch_non_null(self, body: Union[_models.DatetimeProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_non_null_request( + _request = build_nullable_client_datetime_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1055,7 +1055,7 @@ async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_null_request( + _request = build_nullable_client_datetime_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1081,14 +1081,14 @@ async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class NullableClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`duration` attribute. + :attr:`nullable_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1119,7 +1119,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_non_null_request( + _request = build_nullable_client_duration_get_non_null_request( headers=_headers, params=_params, ) @@ -1175,7 +1175,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_null_request( + _request = build_nullable_client_duration_get_null_request( headers=_headers, params=_params, ) @@ -1289,7 +1289,7 @@ async def patch_non_null(self, body: Union[_models.DurationProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_non_null_request( + _request = build_nullable_client_duration_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1393,7 +1393,7 @@ async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_null_request( + _request = build_nullable_client_duration_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1419,14 +1419,14 @@ async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class NullableClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_byte` attribute. + :attr:`nullable_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1457,7 +1457,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_non_null_request( + _request = build_nullable_client_collections_byte_get_non_null_request( headers=_headers, params=_params, ) @@ -1513,7 +1513,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_null_request( + _request = build_nullable_client_collections_byte_get_null_request( headers=_headers, params=_params, ) @@ -1633,7 +1633,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_non_null_request( + _request = build_nullable_client_collections_byte_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1741,7 +1741,7 @@ async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_null_request( + _request = build_nullable_client_collections_byte_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1767,14 +1767,14 @@ async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class NullableClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_model` attribute. + :attr:`nullable_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1806,7 +1806,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_non_null_request( + _request = build_nullable_client_collections_model_get_non_null_request( headers=_headers, params=_params, ) @@ -1863,7 +1863,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_null_request( + _request = build_nullable_client_collections_model_get_null_request( headers=_headers, params=_params, ) @@ -1983,7 +1983,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_non_null_request( + _request = build_nullable_client_collections_model_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2091,7 +2091,7 @@ async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_null_request( + _request = build_nullable_client_collections_model_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2117,14 +2117,14 @@ async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class NullableClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_string` attribute. + :attr:`nullable_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2156,7 +2156,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_non_null_request( + _request = build_nullable_client_collections_string_get_non_null_request( headers=_headers, params=_params, ) @@ -2213,7 +2213,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_null_request( + _request = build_nullable_client_collections_string_get_null_request( headers=_headers, params=_params, ) @@ -2334,7 +2334,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_non_null_request( + _request = build_nullable_client_collections_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2443,7 +2443,7 @@ async def patch_null(self, body: Union[_models.CollectionsStringProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_null_request( + _request = build_nullable_client_collections_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py index 30338a73d8..fe90592a57 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py @@ -12,26 +12,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore +from ._operations import NullableClientStringOperations # type: ignore +from ._operations import NullableClientBytesOperations # type: ignore +from ._operations import NullableClientDatetimeOperations # type: ignore +from ._operations import NullableClientDurationOperations # type: ignore +from ._operations import NullableClientCollectionsByteOperations # type: ignore +from ._operations import NullableClientCollectionsModelOperations # type: ignore +from ._operations import NullableClientCollectionsStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "CollectionsStringOperations", + "NullableClientStringOperations", + "NullableClientBytesOperations", + "NullableClientDatetimeOperations", + "NullableClientDurationOperations", + "NullableClientCollectionsByteOperations", + "NullableClientCollectionsModelOperations", + "NullableClientCollectionsStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py index da68b3dea3..ffa0ad7917 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -54,7 +54,7 @@ def build_string_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -68,7 +68,7 @@ def build_string_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -82,7 +82,7 @@ def build_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_string_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -96,7 +96,7 @@ def build_string_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -110,7 +110,7 @@ def build_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -124,7 +124,7 @@ def build_bytes_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -138,7 +138,7 @@ def build_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +152,7 @@ def build_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -166,7 +166,7 @@ def build_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -180,7 +180,9 @@ def build_datetime_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -194,7 +196,7 @@ def build_datetime_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -208,7 +210,7 @@ def build_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -222,7 +224,7 @@ def build_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -236,7 +238,9 @@ def build_duration_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -250,7 +254,7 @@ def build_duration_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_duration_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -264,7 +268,9 @@ def build_duration_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -278,7 +284,9 @@ def build_collections_byte_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_collections_byte_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -292,7 +300,9 @@ def build_collections_byte_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -306,7 +316,9 @@ def build_collections_byte_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_byte_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -320,7 +332,9 @@ def build_collections_byte_patch_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -334,7 +348,9 @@ def build_collections_model_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_collections_model_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -348,7 +364,9 @@ def build_collections_model_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -362,7 +380,9 @@ def build_collections_model_patch_non_null_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_model_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -376,7 +396,9 @@ def build_collections_model_patch_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -390,7 +412,9 @@ def build_collections_string_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -404,7 +428,9 @@ def build_collections_string_get_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -418,7 +444,9 @@ def build_collections_string_patch_non_null_request(**kwargs: Any) -> HttpReques return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_string_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -432,14 +460,14 @@ def build_collections_string_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -class StringOperations: +class NullableClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`string` attribute. + :attr:`nullable_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -470,7 +498,7 @@ def get_non_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_non_null_request( + _request = build_nullable_client_string_get_non_null_request( headers=_headers, params=_params, ) @@ -526,7 +554,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_null_request( + _request = build_nullable_client_string_get_null_request( headers=_headers, params=_params, ) @@ -640,7 +668,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_non_null_request( + _request = build_nullable_client_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -742,7 +770,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_null_request( + _request = build_nullable_client_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -768,14 +796,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class NullableClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`bytes` attribute. + :attr:`nullable_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -806,7 +834,7 @@ def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_non_null_request( + _request = build_nullable_client_bytes_get_non_null_request( headers=_headers, params=_params, ) @@ -862,7 +890,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_null_request( + _request = build_nullable_client_bytes_get_null_request( headers=_headers, params=_params, ) @@ -976,7 +1004,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_non_null_request( + _request = build_nullable_client_bytes_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1078,7 +1106,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_null_request( + _request = build_nullable_client_bytes_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1104,14 +1132,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class NullableClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`datetime` attribute. + :attr:`nullable_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1142,7 +1170,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_non_null_request( + _request = build_nullable_client_datetime_get_non_null_request( headers=_headers, params=_params, ) @@ -1198,7 +1226,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_null_request( + _request = build_nullable_client_datetime_get_null_request( headers=_headers, params=_params, ) @@ -1312,7 +1340,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_non_null_request( + _request = build_nullable_client_datetime_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1414,7 +1442,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_null_request( + _request = build_nullable_client_datetime_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1440,14 +1468,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class NullableClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`duration` attribute. + :attr:`nullable_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1478,7 +1506,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_non_null_request( + _request = build_nullable_client_duration_get_non_null_request( headers=_headers, params=_params, ) @@ -1534,7 +1562,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_null_request( + _request = build_nullable_client_duration_get_null_request( headers=_headers, params=_params, ) @@ -1648,7 +1676,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_non_null_request( + _request = build_nullable_client_duration_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1750,7 +1778,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_null_request( + _request = build_nullable_client_duration_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1776,14 +1804,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class NullableClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_byte` attribute. + :attr:`nullable_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1814,7 +1842,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_non_null_request( + _request = build_nullable_client_collections_byte_get_non_null_request( headers=_headers, params=_params, ) @@ -1870,7 +1898,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_null_request( + _request = build_nullable_client_collections_byte_get_null_request( headers=_headers, params=_params, ) @@ -1911,7 +1939,7 @@ def patch_non_null( body: _models.CollectionsByteProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -1988,7 +2016,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_non_null_request( + _request = build_nullable_client_collections_byte_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2019,7 +2047,7 @@ def patch_null( body: _models.CollectionsByteProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2094,7 +2122,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_null_request( + _request = build_nullable_client_collections_byte_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2120,14 +2148,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class NullableClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_model` attribute. + :attr:`nullable_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2159,7 +2187,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_non_null_request( + _request = build_nullable_client_collections_model_get_non_null_request( headers=_headers, params=_params, ) @@ -2216,7 +2244,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_null_request( + _request = build_nullable_client_collections_model_get_null_request( headers=_headers, params=_params, ) @@ -2257,7 +2285,7 @@ def patch_non_null( body: _models.CollectionsModelProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -2334,7 +2362,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_non_null_request( + _request = build_nullable_client_collections_model_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2365,7 +2393,7 @@ def patch_null( body: _models.CollectionsModelProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2440,7 +2468,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_null_request( + _request = build_nullable_client_collections_model_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2466,14 +2494,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class NullableClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_string` attribute. + :attr:`nullable_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2505,7 +2533,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_non_null_request( + _request = build_nullable_client_collections_string_get_non_null_request( headers=_headers, params=_params, ) @@ -2562,7 +2590,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_null_request( + _request = build_nullable_client_collections_string_get_null_request( headers=_headers, params=_params, ) @@ -2603,7 +2631,7 @@ def patch_non_null( body: _models.CollectionsStringProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -2681,7 +2709,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_non_null_request( + _request = build_nullable_client_collections_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2712,7 +2740,7 @@ def patch_null( body: _models.CollectionsStringProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2788,7 +2816,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_null_request( + _request = build_nullable_client_collections_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-property-optional/apiview-properties.json index 1ff9cc3430..ad7cd77dc1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/apiview-properties.json @@ -17,133 +17,133 @@ "typetest.property.optional.models.UnionFloatLiteralProperty": "Type.Property.Optional.UnionFloatLiteralProperty", "typetest.property.optional.models.UnionIntLiteralProperty": "Type.Property.Optional.UnionIntLiteralProperty", "typetest.property.optional.models.UnionStringLiteralProperty": "Type.Property.Optional.UnionStringLiteralProperty", - "typetest.property.optional.operations.StringOperations.get_all": "Type.Property.Optional.String.getAll", - "typetest.property.optional.aio.operations.StringOperations.get_all": "Type.Property.Optional.String.getAll", - "typetest.property.optional.operations.StringOperations.get_default": "Type.Property.Optional.String.getDefault", - "typetest.property.optional.aio.operations.StringOperations.get_default": "Type.Property.Optional.String.getDefault", - "typetest.property.optional.operations.StringOperations.put_all": "Type.Property.Optional.String.putAll", - "typetest.property.optional.aio.operations.StringOperations.put_all": "Type.Property.Optional.String.putAll", - "typetest.property.optional.operations.StringOperations.put_default": "Type.Property.Optional.String.putDefault", - "typetest.property.optional.aio.operations.StringOperations.put_default": "Type.Property.Optional.String.putDefault", - "typetest.property.optional.operations.BytesOperations.get_all": "Type.Property.Optional.Bytes.getAll", - "typetest.property.optional.aio.operations.BytesOperations.get_all": "Type.Property.Optional.Bytes.getAll", - "typetest.property.optional.operations.BytesOperations.get_default": "Type.Property.Optional.Bytes.getDefault", - "typetest.property.optional.aio.operations.BytesOperations.get_default": "Type.Property.Optional.Bytes.getDefault", - "typetest.property.optional.operations.BytesOperations.put_all": "Type.Property.Optional.Bytes.putAll", - "typetest.property.optional.aio.operations.BytesOperations.put_all": "Type.Property.Optional.Bytes.putAll", - "typetest.property.optional.operations.BytesOperations.put_default": "Type.Property.Optional.Bytes.putDefault", - "typetest.property.optional.aio.operations.BytesOperations.put_default": "Type.Property.Optional.Bytes.putDefault", - "typetest.property.optional.operations.DatetimeOperations.get_all": "Type.Property.Optional.Datetime.getAll", - "typetest.property.optional.aio.operations.DatetimeOperations.get_all": "Type.Property.Optional.Datetime.getAll", - "typetest.property.optional.operations.DatetimeOperations.get_default": "Type.Property.Optional.Datetime.getDefault", - "typetest.property.optional.aio.operations.DatetimeOperations.get_default": "Type.Property.Optional.Datetime.getDefault", - "typetest.property.optional.operations.DatetimeOperations.put_all": "Type.Property.Optional.Datetime.putAll", - "typetest.property.optional.aio.operations.DatetimeOperations.put_all": "Type.Property.Optional.Datetime.putAll", - "typetest.property.optional.operations.DatetimeOperations.put_default": "Type.Property.Optional.Datetime.putDefault", - "typetest.property.optional.aio.operations.DatetimeOperations.put_default": "Type.Property.Optional.Datetime.putDefault", - "typetest.property.optional.operations.DurationOperations.get_all": "Type.Property.Optional.Duration.getAll", - "typetest.property.optional.aio.operations.DurationOperations.get_all": "Type.Property.Optional.Duration.getAll", - "typetest.property.optional.operations.DurationOperations.get_default": "Type.Property.Optional.Duration.getDefault", - "typetest.property.optional.aio.operations.DurationOperations.get_default": "Type.Property.Optional.Duration.getDefault", - "typetest.property.optional.operations.DurationOperations.put_all": "Type.Property.Optional.Duration.putAll", - "typetest.property.optional.aio.operations.DurationOperations.put_all": "Type.Property.Optional.Duration.putAll", - "typetest.property.optional.operations.DurationOperations.put_default": "Type.Property.Optional.Duration.putDefault", - "typetest.property.optional.aio.operations.DurationOperations.put_default": "Type.Property.Optional.Duration.putDefault", - "typetest.property.optional.operations.PlainDateOperations.get_all": "Type.Property.Optional.PlainDate.getAll", - "typetest.property.optional.aio.operations.PlainDateOperations.get_all": "Type.Property.Optional.PlainDate.getAll", - "typetest.property.optional.operations.PlainDateOperations.get_default": "Type.Property.Optional.PlainDate.getDefault", - "typetest.property.optional.aio.operations.PlainDateOperations.get_default": "Type.Property.Optional.PlainDate.getDefault", - "typetest.property.optional.operations.PlainDateOperations.put_all": "Type.Property.Optional.PlainDate.putAll", - "typetest.property.optional.aio.operations.PlainDateOperations.put_all": "Type.Property.Optional.PlainDate.putAll", - "typetest.property.optional.operations.PlainDateOperations.put_default": "Type.Property.Optional.PlainDate.putDefault", - "typetest.property.optional.aio.operations.PlainDateOperations.put_default": "Type.Property.Optional.PlainDate.putDefault", - "typetest.property.optional.operations.PlainTimeOperations.get_all": "Type.Property.Optional.PlainTime.getAll", - "typetest.property.optional.aio.operations.PlainTimeOperations.get_all": "Type.Property.Optional.PlainTime.getAll", - "typetest.property.optional.operations.PlainTimeOperations.get_default": "Type.Property.Optional.PlainTime.getDefault", - "typetest.property.optional.aio.operations.PlainTimeOperations.get_default": "Type.Property.Optional.PlainTime.getDefault", - "typetest.property.optional.operations.PlainTimeOperations.put_all": "Type.Property.Optional.PlainTime.putAll", - "typetest.property.optional.aio.operations.PlainTimeOperations.put_all": "Type.Property.Optional.PlainTime.putAll", - "typetest.property.optional.operations.PlainTimeOperations.put_default": "Type.Property.Optional.PlainTime.putDefault", - "typetest.property.optional.aio.operations.PlainTimeOperations.put_default": "Type.Property.Optional.PlainTime.putDefault", - "typetest.property.optional.operations.CollectionsByteOperations.get_all": "Type.Property.Optional.CollectionsByte.getAll", - "typetest.property.optional.aio.operations.CollectionsByteOperations.get_all": "Type.Property.Optional.CollectionsByte.getAll", - "typetest.property.optional.operations.CollectionsByteOperations.get_default": "Type.Property.Optional.CollectionsByte.getDefault", - "typetest.property.optional.aio.operations.CollectionsByteOperations.get_default": "Type.Property.Optional.CollectionsByte.getDefault", - "typetest.property.optional.operations.CollectionsByteOperations.put_all": "Type.Property.Optional.CollectionsByte.putAll", - "typetest.property.optional.aio.operations.CollectionsByteOperations.put_all": "Type.Property.Optional.CollectionsByte.putAll", - "typetest.property.optional.operations.CollectionsByteOperations.put_default": "Type.Property.Optional.CollectionsByte.putDefault", - "typetest.property.optional.aio.operations.CollectionsByteOperations.put_default": "Type.Property.Optional.CollectionsByte.putDefault", - "typetest.property.optional.operations.CollectionsModelOperations.get_all": "Type.Property.Optional.CollectionsModel.getAll", - "typetest.property.optional.aio.operations.CollectionsModelOperations.get_all": "Type.Property.Optional.CollectionsModel.getAll", - "typetest.property.optional.operations.CollectionsModelOperations.get_default": "Type.Property.Optional.CollectionsModel.getDefault", - "typetest.property.optional.aio.operations.CollectionsModelOperations.get_default": "Type.Property.Optional.CollectionsModel.getDefault", - "typetest.property.optional.operations.CollectionsModelOperations.put_all": "Type.Property.Optional.CollectionsModel.putAll", - "typetest.property.optional.aio.operations.CollectionsModelOperations.put_all": "Type.Property.Optional.CollectionsModel.putAll", - "typetest.property.optional.operations.CollectionsModelOperations.put_default": "Type.Property.Optional.CollectionsModel.putDefault", - "typetest.property.optional.aio.operations.CollectionsModelOperations.put_default": "Type.Property.Optional.CollectionsModel.putDefault", - "typetest.property.optional.operations.StringLiteralOperations.get_all": "Type.Property.Optional.StringLiteral.getAll", - "typetest.property.optional.aio.operations.StringLiteralOperations.get_all": "Type.Property.Optional.StringLiteral.getAll", - "typetest.property.optional.operations.StringLiteralOperations.get_default": "Type.Property.Optional.StringLiteral.getDefault", - "typetest.property.optional.aio.operations.StringLiteralOperations.get_default": "Type.Property.Optional.StringLiteral.getDefault", - "typetest.property.optional.operations.StringLiteralOperations.put_all": "Type.Property.Optional.StringLiteral.putAll", - "typetest.property.optional.aio.operations.StringLiteralOperations.put_all": "Type.Property.Optional.StringLiteral.putAll", - "typetest.property.optional.operations.StringLiteralOperations.put_default": "Type.Property.Optional.StringLiteral.putDefault", - "typetest.property.optional.aio.operations.StringLiteralOperations.put_default": "Type.Property.Optional.StringLiteral.putDefault", - "typetest.property.optional.operations.IntLiteralOperations.get_all": "Type.Property.Optional.IntLiteral.getAll", - "typetest.property.optional.aio.operations.IntLiteralOperations.get_all": "Type.Property.Optional.IntLiteral.getAll", - "typetest.property.optional.operations.IntLiteralOperations.get_default": "Type.Property.Optional.IntLiteral.getDefault", - "typetest.property.optional.aio.operations.IntLiteralOperations.get_default": "Type.Property.Optional.IntLiteral.getDefault", - "typetest.property.optional.operations.IntLiteralOperations.put_all": "Type.Property.Optional.IntLiteral.putAll", - "typetest.property.optional.aio.operations.IntLiteralOperations.put_all": "Type.Property.Optional.IntLiteral.putAll", - "typetest.property.optional.operations.IntLiteralOperations.put_default": "Type.Property.Optional.IntLiteral.putDefault", - "typetest.property.optional.aio.operations.IntLiteralOperations.put_default": "Type.Property.Optional.IntLiteral.putDefault", - "typetest.property.optional.operations.FloatLiteralOperations.get_all": "Type.Property.Optional.FloatLiteral.getAll", - "typetest.property.optional.aio.operations.FloatLiteralOperations.get_all": "Type.Property.Optional.FloatLiteral.getAll", - "typetest.property.optional.operations.FloatLiteralOperations.get_default": "Type.Property.Optional.FloatLiteral.getDefault", - "typetest.property.optional.aio.operations.FloatLiteralOperations.get_default": "Type.Property.Optional.FloatLiteral.getDefault", - "typetest.property.optional.operations.FloatLiteralOperations.put_all": "Type.Property.Optional.FloatLiteral.putAll", - "typetest.property.optional.aio.operations.FloatLiteralOperations.put_all": "Type.Property.Optional.FloatLiteral.putAll", - "typetest.property.optional.operations.FloatLiteralOperations.put_default": "Type.Property.Optional.FloatLiteral.putDefault", - "typetest.property.optional.aio.operations.FloatLiteralOperations.put_default": "Type.Property.Optional.FloatLiteral.putDefault", - "typetest.property.optional.operations.BooleanLiteralOperations.get_all": "Type.Property.Optional.BooleanLiteral.getAll", - "typetest.property.optional.aio.operations.BooleanLiteralOperations.get_all": "Type.Property.Optional.BooleanLiteral.getAll", - "typetest.property.optional.operations.BooleanLiteralOperations.get_default": "Type.Property.Optional.BooleanLiteral.getDefault", - "typetest.property.optional.aio.operations.BooleanLiteralOperations.get_default": "Type.Property.Optional.BooleanLiteral.getDefault", - "typetest.property.optional.operations.BooleanLiteralOperations.put_all": "Type.Property.Optional.BooleanLiteral.putAll", - "typetest.property.optional.aio.operations.BooleanLiteralOperations.put_all": "Type.Property.Optional.BooleanLiteral.putAll", - "typetest.property.optional.operations.BooleanLiteralOperations.put_default": "Type.Property.Optional.BooleanLiteral.putDefault", - "typetest.property.optional.aio.operations.BooleanLiteralOperations.put_default": "Type.Property.Optional.BooleanLiteral.putDefault", - "typetest.property.optional.operations.UnionStringLiteralOperations.get_all": "Type.Property.Optional.UnionStringLiteral.getAll", - "typetest.property.optional.aio.operations.UnionStringLiteralOperations.get_all": "Type.Property.Optional.UnionStringLiteral.getAll", - "typetest.property.optional.operations.UnionStringLiteralOperations.get_default": "Type.Property.Optional.UnionStringLiteral.getDefault", - "typetest.property.optional.aio.operations.UnionStringLiteralOperations.get_default": "Type.Property.Optional.UnionStringLiteral.getDefault", - "typetest.property.optional.operations.UnionStringLiteralOperations.put_all": "Type.Property.Optional.UnionStringLiteral.putAll", - "typetest.property.optional.aio.operations.UnionStringLiteralOperations.put_all": "Type.Property.Optional.UnionStringLiteral.putAll", - "typetest.property.optional.operations.UnionStringLiteralOperations.put_default": "Type.Property.Optional.UnionStringLiteral.putDefault", - "typetest.property.optional.aio.operations.UnionStringLiteralOperations.put_default": "Type.Property.Optional.UnionStringLiteral.putDefault", - "typetest.property.optional.operations.UnionIntLiteralOperations.get_all": "Type.Property.Optional.UnionIntLiteral.getAll", - "typetest.property.optional.aio.operations.UnionIntLiteralOperations.get_all": "Type.Property.Optional.UnionIntLiteral.getAll", - "typetest.property.optional.operations.UnionIntLiteralOperations.get_default": "Type.Property.Optional.UnionIntLiteral.getDefault", - "typetest.property.optional.aio.operations.UnionIntLiteralOperations.get_default": "Type.Property.Optional.UnionIntLiteral.getDefault", - "typetest.property.optional.operations.UnionIntLiteralOperations.put_all": "Type.Property.Optional.UnionIntLiteral.putAll", - "typetest.property.optional.aio.operations.UnionIntLiteralOperations.put_all": "Type.Property.Optional.UnionIntLiteral.putAll", - "typetest.property.optional.operations.UnionIntLiteralOperations.put_default": "Type.Property.Optional.UnionIntLiteral.putDefault", - "typetest.property.optional.aio.operations.UnionIntLiteralOperations.put_default": "Type.Property.Optional.UnionIntLiteral.putDefault", - "typetest.property.optional.operations.UnionFloatLiteralOperations.get_all": "Type.Property.Optional.UnionFloatLiteral.getAll", - "typetest.property.optional.aio.operations.UnionFloatLiteralOperations.get_all": "Type.Property.Optional.UnionFloatLiteral.getAll", - "typetest.property.optional.operations.UnionFloatLiteralOperations.get_default": "Type.Property.Optional.UnionFloatLiteral.getDefault", - "typetest.property.optional.aio.operations.UnionFloatLiteralOperations.get_default": "Type.Property.Optional.UnionFloatLiteral.getDefault", - "typetest.property.optional.operations.UnionFloatLiteralOperations.put_all": "Type.Property.Optional.UnionFloatLiteral.putAll", - "typetest.property.optional.aio.operations.UnionFloatLiteralOperations.put_all": "Type.Property.Optional.UnionFloatLiteral.putAll", - "typetest.property.optional.operations.UnionFloatLiteralOperations.put_default": "Type.Property.Optional.UnionFloatLiteral.putDefault", - "typetest.property.optional.aio.operations.UnionFloatLiteralOperations.put_default": "Type.Property.Optional.UnionFloatLiteral.putDefault", - "typetest.property.optional.operations.RequiredAndOptionalOperations.get_all": "Type.Property.Optional.RequiredAndOptional.getAll", - "typetest.property.optional.aio.operations.RequiredAndOptionalOperations.get_all": "Type.Property.Optional.RequiredAndOptional.getAll", - "typetest.property.optional.operations.RequiredAndOptionalOperations.get_required_only": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly", - "typetest.property.optional.aio.operations.RequiredAndOptionalOperations.get_required_only": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly", - "typetest.property.optional.operations.RequiredAndOptionalOperations.put_all": "Type.Property.Optional.RequiredAndOptional.putAll", - "typetest.property.optional.aio.operations.RequiredAndOptionalOperations.put_all": "Type.Property.Optional.RequiredAndOptional.putAll", - "typetest.property.optional.operations.RequiredAndOptionalOperations.put_required_only": "Type.Property.Optional.RequiredAndOptional.putRequiredOnly", - "typetest.property.optional.aio.operations.RequiredAndOptionalOperations.put_required_only": "Type.Property.Optional.RequiredAndOptional.putRequiredOnly" + "typetest.property.optional.operations.OptionalClientStringOperations.get_all": "Type.Property.Optional.String.getAll", + "typetest.property.optional.aio.operations.OptionalClientStringOperations.get_all": "Type.Property.Optional.String.getAll", + "typetest.property.optional.operations.OptionalClientStringOperations.get_default": "Type.Property.Optional.String.getDefault", + "typetest.property.optional.aio.operations.OptionalClientStringOperations.get_default": "Type.Property.Optional.String.getDefault", + "typetest.property.optional.operations.OptionalClientStringOperations.put_all": "Type.Property.Optional.String.putAll", + "typetest.property.optional.aio.operations.OptionalClientStringOperations.put_all": "Type.Property.Optional.String.putAll", + "typetest.property.optional.operations.OptionalClientStringOperations.put_default": "Type.Property.Optional.String.putDefault", + "typetest.property.optional.aio.operations.OptionalClientStringOperations.put_default": "Type.Property.Optional.String.putDefault", + "typetest.property.optional.operations.OptionalClientBytesOperations.get_all": "Type.Property.Optional.Bytes.getAll", + "typetest.property.optional.aio.operations.OptionalClientBytesOperations.get_all": "Type.Property.Optional.Bytes.getAll", + "typetest.property.optional.operations.OptionalClientBytesOperations.get_default": "Type.Property.Optional.Bytes.getDefault", + "typetest.property.optional.aio.operations.OptionalClientBytesOperations.get_default": "Type.Property.Optional.Bytes.getDefault", + "typetest.property.optional.operations.OptionalClientBytesOperations.put_all": "Type.Property.Optional.Bytes.putAll", + "typetest.property.optional.aio.operations.OptionalClientBytesOperations.put_all": "Type.Property.Optional.Bytes.putAll", + "typetest.property.optional.operations.OptionalClientBytesOperations.put_default": "Type.Property.Optional.Bytes.putDefault", + "typetest.property.optional.aio.operations.OptionalClientBytesOperations.put_default": "Type.Property.Optional.Bytes.putDefault", + "typetest.property.optional.operations.OptionalClientDatetimeOperations.get_all": "Type.Property.Optional.Datetime.getAll", + "typetest.property.optional.aio.operations.OptionalClientDatetimeOperations.get_all": "Type.Property.Optional.Datetime.getAll", + "typetest.property.optional.operations.OptionalClientDatetimeOperations.get_default": "Type.Property.Optional.Datetime.getDefault", + "typetest.property.optional.aio.operations.OptionalClientDatetimeOperations.get_default": "Type.Property.Optional.Datetime.getDefault", + "typetest.property.optional.operations.OptionalClientDatetimeOperations.put_all": "Type.Property.Optional.Datetime.putAll", + "typetest.property.optional.aio.operations.OptionalClientDatetimeOperations.put_all": "Type.Property.Optional.Datetime.putAll", + "typetest.property.optional.operations.OptionalClientDatetimeOperations.put_default": "Type.Property.Optional.Datetime.putDefault", + "typetest.property.optional.aio.operations.OptionalClientDatetimeOperations.put_default": "Type.Property.Optional.Datetime.putDefault", + "typetest.property.optional.operations.OptionalClientDurationOperations.get_all": "Type.Property.Optional.Duration.getAll", + "typetest.property.optional.aio.operations.OptionalClientDurationOperations.get_all": "Type.Property.Optional.Duration.getAll", + "typetest.property.optional.operations.OptionalClientDurationOperations.get_default": "Type.Property.Optional.Duration.getDefault", + "typetest.property.optional.aio.operations.OptionalClientDurationOperations.get_default": "Type.Property.Optional.Duration.getDefault", + "typetest.property.optional.operations.OptionalClientDurationOperations.put_all": "Type.Property.Optional.Duration.putAll", + "typetest.property.optional.aio.operations.OptionalClientDurationOperations.put_all": "Type.Property.Optional.Duration.putAll", + "typetest.property.optional.operations.OptionalClientDurationOperations.put_default": "Type.Property.Optional.Duration.putDefault", + "typetest.property.optional.aio.operations.OptionalClientDurationOperations.put_default": "Type.Property.Optional.Duration.putDefault", + "typetest.property.optional.operations.OptionalClientPlainDateOperations.get_all": "Type.Property.Optional.PlainDate.getAll", + "typetest.property.optional.aio.operations.OptionalClientPlainDateOperations.get_all": "Type.Property.Optional.PlainDate.getAll", + "typetest.property.optional.operations.OptionalClientPlainDateOperations.get_default": "Type.Property.Optional.PlainDate.getDefault", + "typetest.property.optional.aio.operations.OptionalClientPlainDateOperations.get_default": "Type.Property.Optional.PlainDate.getDefault", + "typetest.property.optional.operations.OptionalClientPlainDateOperations.put_all": "Type.Property.Optional.PlainDate.putAll", + "typetest.property.optional.aio.operations.OptionalClientPlainDateOperations.put_all": "Type.Property.Optional.PlainDate.putAll", + "typetest.property.optional.operations.OptionalClientPlainDateOperations.put_default": "Type.Property.Optional.PlainDate.putDefault", + "typetest.property.optional.aio.operations.OptionalClientPlainDateOperations.put_default": "Type.Property.Optional.PlainDate.putDefault", + "typetest.property.optional.operations.OptionalClientPlainTimeOperations.get_all": "Type.Property.Optional.PlainTime.getAll", + "typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations.get_all": "Type.Property.Optional.PlainTime.getAll", + "typetest.property.optional.operations.OptionalClientPlainTimeOperations.get_default": "Type.Property.Optional.PlainTime.getDefault", + "typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations.get_default": "Type.Property.Optional.PlainTime.getDefault", + "typetest.property.optional.operations.OptionalClientPlainTimeOperations.put_all": "Type.Property.Optional.PlainTime.putAll", + "typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations.put_all": "Type.Property.Optional.PlainTime.putAll", + "typetest.property.optional.operations.OptionalClientPlainTimeOperations.put_default": "Type.Property.Optional.PlainTime.putDefault", + "typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations.put_default": "Type.Property.Optional.PlainTime.putDefault", + "typetest.property.optional.operations.OptionalClientCollectionsByteOperations.get_all": "Type.Property.Optional.CollectionsByte.getAll", + "typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations.get_all": "Type.Property.Optional.CollectionsByte.getAll", + "typetest.property.optional.operations.OptionalClientCollectionsByteOperations.get_default": "Type.Property.Optional.CollectionsByte.getDefault", + "typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations.get_default": "Type.Property.Optional.CollectionsByte.getDefault", + "typetest.property.optional.operations.OptionalClientCollectionsByteOperations.put_all": "Type.Property.Optional.CollectionsByte.putAll", + "typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations.put_all": "Type.Property.Optional.CollectionsByte.putAll", + "typetest.property.optional.operations.OptionalClientCollectionsByteOperations.put_default": "Type.Property.Optional.CollectionsByte.putDefault", + "typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations.put_default": "Type.Property.Optional.CollectionsByte.putDefault", + "typetest.property.optional.operations.OptionalClientCollectionsModelOperations.get_all": "Type.Property.Optional.CollectionsModel.getAll", + "typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations.get_all": "Type.Property.Optional.CollectionsModel.getAll", + "typetest.property.optional.operations.OptionalClientCollectionsModelOperations.get_default": "Type.Property.Optional.CollectionsModel.getDefault", + "typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations.get_default": "Type.Property.Optional.CollectionsModel.getDefault", + "typetest.property.optional.operations.OptionalClientCollectionsModelOperations.put_all": "Type.Property.Optional.CollectionsModel.putAll", + "typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations.put_all": "Type.Property.Optional.CollectionsModel.putAll", + "typetest.property.optional.operations.OptionalClientCollectionsModelOperations.put_default": "Type.Property.Optional.CollectionsModel.putDefault", + "typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations.put_default": "Type.Property.Optional.CollectionsModel.putDefault", + "typetest.property.optional.operations.OptionalClientStringLiteralOperations.get_all": "Type.Property.Optional.StringLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations.get_all": "Type.Property.Optional.StringLiteral.getAll", + "typetest.property.optional.operations.OptionalClientStringLiteralOperations.get_default": "Type.Property.Optional.StringLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations.get_default": "Type.Property.Optional.StringLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientStringLiteralOperations.put_all": "Type.Property.Optional.StringLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations.put_all": "Type.Property.Optional.StringLiteral.putAll", + "typetest.property.optional.operations.OptionalClientStringLiteralOperations.put_default": "Type.Property.Optional.StringLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations.put_default": "Type.Property.Optional.StringLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientIntLiteralOperations.get_all": "Type.Property.Optional.IntLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations.get_all": "Type.Property.Optional.IntLiteral.getAll", + "typetest.property.optional.operations.OptionalClientIntLiteralOperations.get_default": "Type.Property.Optional.IntLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations.get_default": "Type.Property.Optional.IntLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientIntLiteralOperations.put_all": "Type.Property.Optional.IntLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations.put_all": "Type.Property.Optional.IntLiteral.putAll", + "typetest.property.optional.operations.OptionalClientIntLiteralOperations.put_default": "Type.Property.Optional.IntLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations.put_default": "Type.Property.Optional.IntLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientFloatLiteralOperations.get_all": "Type.Property.Optional.FloatLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations.get_all": "Type.Property.Optional.FloatLiteral.getAll", + "typetest.property.optional.operations.OptionalClientFloatLiteralOperations.get_default": "Type.Property.Optional.FloatLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations.get_default": "Type.Property.Optional.FloatLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientFloatLiteralOperations.put_all": "Type.Property.Optional.FloatLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations.put_all": "Type.Property.Optional.FloatLiteral.putAll", + "typetest.property.optional.operations.OptionalClientFloatLiteralOperations.put_default": "Type.Property.Optional.FloatLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations.put_default": "Type.Property.Optional.FloatLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientBooleanLiteralOperations.get_all": "Type.Property.Optional.BooleanLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations.get_all": "Type.Property.Optional.BooleanLiteral.getAll", + "typetest.property.optional.operations.OptionalClientBooleanLiteralOperations.get_default": "Type.Property.Optional.BooleanLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations.get_default": "Type.Property.Optional.BooleanLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientBooleanLiteralOperations.put_all": "Type.Property.Optional.BooleanLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations.put_all": "Type.Property.Optional.BooleanLiteral.putAll", + "typetest.property.optional.operations.OptionalClientBooleanLiteralOperations.put_default": "Type.Property.Optional.BooleanLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations.put_default": "Type.Property.Optional.BooleanLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations.get_all": "Type.Property.Optional.UnionStringLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations.get_all": "Type.Property.Optional.UnionStringLiteral.getAll", + "typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations.get_default": "Type.Property.Optional.UnionStringLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations.get_default": "Type.Property.Optional.UnionStringLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations.put_all": "Type.Property.Optional.UnionStringLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations.put_all": "Type.Property.Optional.UnionStringLiteral.putAll", + "typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations.put_default": "Type.Property.Optional.UnionStringLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations.put_default": "Type.Property.Optional.UnionStringLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations.get_all": "Type.Property.Optional.UnionIntLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations.get_all": "Type.Property.Optional.UnionIntLiteral.getAll", + "typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations.get_default": "Type.Property.Optional.UnionIntLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations.get_default": "Type.Property.Optional.UnionIntLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations.put_all": "Type.Property.Optional.UnionIntLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations.put_all": "Type.Property.Optional.UnionIntLiteral.putAll", + "typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations.put_default": "Type.Property.Optional.UnionIntLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations.put_default": "Type.Property.Optional.UnionIntLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations.get_all": "Type.Property.Optional.UnionFloatLiteral.getAll", + "typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations.get_all": "Type.Property.Optional.UnionFloatLiteral.getAll", + "typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations.get_default": "Type.Property.Optional.UnionFloatLiteral.getDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations.get_default": "Type.Property.Optional.UnionFloatLiteral.getDefault", + "typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations.put_all": "Type.Property.Optional.UnionFloatLiteral.putAll", + "typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations.put_all": "Type.Property.Optional.UnionFloatLiteral.putAll", + "typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations.put_default": "Type.Property.Optional.UnionFloatLiteral.putDefault", + "typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations.put_default": "Type.Property.Optional.UnionFloatLiteral.putDefault", + "typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations.get_all": "Type.Property.Optional.RequiredAndOptional.getAll", + "typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations.get_all": "Type.Property.Optional.RequiredAndOptional.getAll", + "typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations.get_required_only": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly", + "typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations.get_required_only": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly", + "typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations.put_all": "Type.Property.Optional.RequiredAndOptional.putAll", + "typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations.put_all": "Type.Property.Optional.RequiredAndOptional.putAll", + "typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations.put_required_only": "Type.Property.Optional.RequiredAndOptional.putRequiredOnly", + "typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations.put_required_only": "Type.Property.Optional.RequiredAndOptional.putRequiredOnly" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations.py new file mode 100644 index 0000000000..eaaf21a95a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientBooleanLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_boolean_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_boolean_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_boolean_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_boolean_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_boolean_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_boolean_literal.put_all( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_boolean_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_boolean_literal.put_default( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations_async.py new file mode 100644 index 0000000000..50ec9094ef --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_boolean_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientBooleanLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_boolean_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_boolean_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_boolean_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_boolean_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_boolean_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_boolean_literal.put_all( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_boolean_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_boolean_literal.put_default( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations.py new file mode 100644 index 0000000000..d67107169c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientBytesOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_bytes_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_bytes.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_bytes_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_bytes.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_bytes_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_bytes.put_all( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_bytes_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_bytes.put_default( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations_async.py new file mode 100644 index 0000000000..3eea064690 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_bytes_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientBytesOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_bytes_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_bytes.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_bytes_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_bytes.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_bytes_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_bytes.put_all( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_bytes_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_bytes.put_default( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations.py new file mode 100644 index 0000000000..600477c230 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientCollectionsByteOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_byte_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_byte.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_byte_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_byte.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_byte_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_byte.put_all( + body={"property": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_byte_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_byte.put_default( + body={"property": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations_async.py new file mode 100644 index 0000000000..f24ed64f90 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_byte_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientCollectionsByteOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_byte_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_byte.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_byte_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_byte.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_byte_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_byte.put_all( + body={"property": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_byte_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_byte.put_default( + body={"property": [bytes("bytes", encoding="utf-8")]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations.py new file mode 100644 index 0000000000..1fbddd0ec3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientCollectionsModelOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_model_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_model.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_model_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_model.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_model_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_model.put_all( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_collections_model_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_collections_model.put_default( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations_async.py new file mode 100644 index 0000000000..25b5a8dcb9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_collections_model_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientCollectionsModelOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_model_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_model.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_model_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_model.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_model_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_model.put_all( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_collections_model_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_collections_model.put_default( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations.py new file mode 100644 index 0000000000..c441ffff61 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientDatetimeOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_datetime_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_datetime.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_datetime_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_datetime.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_datetime_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_datetime.put_all( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_datetime_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_datetime.put_default( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations_async.py new file mode 100644 index 0000000000..42aabe9865 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_datetime_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientDatetimeOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_datetime_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_datetime.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_datetime_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_datetime.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_datetime_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_datetime.put_all( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_datetime_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_datetime.put_default( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations.py new file mode 100644 index 0000000000..188dd21464 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientDurationOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_duration_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_duration.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_duration_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_duration.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_duration_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_duration.put_all( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_duration_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_duration.put_default( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations_async.py new file mode 100644 index 0000000000..b5afb5ecf8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_duration_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientDurationOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_duration_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_duration.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_duration_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_duration.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_duration_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_duration.put_all( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_duration_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_duration.put_default( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations.py new file mode 100644 index 0000000000..08d053a470 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientFloatLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_float_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_float_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_float_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_float_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_float_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_float_literal.put_all( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_float_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_float_literal.put_default( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations_async.py new file mode 100644 index 0000000000..904b7a8614 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_float_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientFloatLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_float_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_float_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_float_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_float_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_float_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_float_literal.put_all( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_float_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_float_literal.put_default( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations.py new file mode 100644 index 0000000000..5b893e0e14 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientIntLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_int_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_int_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_int_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_int_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_int_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_int_literal.put_all( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_int_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_int_literal.put_default( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations_async.py new file mode 100644 index 0000000000..2e9d519059 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_int_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientIntLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_int_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_int_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_int_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_int_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_int_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_int_literal.put_all( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_int_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_int_literal.put_default( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations.py new file mode 100644 index 0000000000..0b8f553927 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientPlainDateOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_date_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_date.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_date_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_date.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_date_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_date.put_all( + body={"property": "2020-02-20"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_date_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_date.put_default( + body={"property": "2020-02-20"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations_async.py new file mode 100644 index 0000000000..e87ffecfc1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_date_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientPlainDateOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_date_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_date.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_date_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_date.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_date_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_date.put_all( + body={"property": "2020-02-20"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_date_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_date.put_default( + body={"property": "2020-02-20"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations.py new file mode 100644 index 0000000000..7d9f898c10 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientPlainTimeOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_time_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_time.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_time_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_time.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_time_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_time.put_all( + body={"property": "12:30:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_plain_time_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_plain_time.put_default( + body={"property": "12:30:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations_async.py new file mode 100644 index 0000000000..abaea2eaa4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_plain_time_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientPlainTimeOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_time_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_time.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_time_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_time.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_time_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_time.put_all( + body={"property": "12:30:00"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_plain_time_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_plain_time.put_default( + body={"property": "12:30:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations.py new file mode 100644 index 0000000000..4c339ea12f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientRequiredAndOptionalOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_required_and_optional_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_required_and_optional.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_required_and_optional_get_required_only(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_required_and_optional.get_required_only() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_required_and_optional_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_required_and_optional.put_all( + body={"requiredProperty": 0, "optionalProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_required_and_optional_put_required_only(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_required_and_optional.put_required_only( + body={"requiredProperty": 0, "optionalProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations_async.py new file mode 100644 index 0000000000..58f3677f57 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_required_and_optional_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientRequiredAndOptionalOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_required_and_optional_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_required_and_optional.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_required_and_optional_get_required_only(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_required_and_optional.get_required_only() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_required_and_optional_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_required_and_optional.put_all( + body={"requiredProperty": 0, "optionalProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_required_and_optional_put_required_only(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_required_and_optional.put_required_only( + body={"requiredProperty": 0, "optionalProperty": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations.py new file mode 100644 index 0000000000..e06512cb4f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientStringLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string_literal.put_all( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string_literal.put_default( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations_async.py new file mode 100644 index 0000000000..e40bf17b2f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientStringLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string_literal.put_all( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string_literal.put_default( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations.py new file mode 100644 index 0000000000..c047318990 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientStringOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string.put_all( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_string_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_string.put_default( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations_async.py new file mode 100644 index 0000000000..a6bb866ab3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_string_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientStringOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string.put_all( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_string_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_string.put_default( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations.py new file mode 100644 index 0000000000..544e40d5d5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionFloatLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_float_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_float_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_float_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_float_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_float_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_float_literal.put_all( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_float_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_float_literal.put_default( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations_async.py new file mode 100644 index 0000000000..8e31b8deb8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_float_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionFloatLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_float_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_float_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_float_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_float_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_float_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_float_literal.put_all( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_float_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_float_literal.put_default( + body={"property": 1.25}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations.py new file mode 100644 index 0000000000..8983746128 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionIntLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_int_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_int_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_int_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_int_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_int_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_int_literal.put_all( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_int_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_int_literal.put_default( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations_async.py new file mode 100644 index 0000000000..c1a28ef249 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_int_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionIntLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_int_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_int_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_int_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_int_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_int_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_int_literal.put_all( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_int_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_int_literal.put_default( + body={"property": 1}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations.py new file mode 100644 index 0000000000..c878985f1a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import OptionalClientTestBase, OptionalPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionStringLiteralOperations(OptionalClientTestBase): + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_string_literal_get_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_string_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_string_literal_get_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_string_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_string_literal_put_all(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_string_literal.put_all( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy + def test_optional_client_union_string_literal_put_default(self, optional_endpoint): + client = self.create_client(endpoint=optional_endpoint) + response = client.optional_client_union_string_literal.put_default( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations_async.py new file mode 100644 index 0000000000..ff1fa2b2c3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/generated_tests/test_optional_optional_client_union_string_literal_operations_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import OptionalPreparer +from testpreparer_async import OptionalClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestOptionalOptionalClientUnionStringLiteralOperationsAsync(OptionalClientTestBaseAsync): + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_string_literal_get_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_string_literal.get_all() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_string_literal_get_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_string_literal.get_default() + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_string_literal_put_all(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_string_literal.put_all( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... + + @OptionalPreparer() + @recorded_by_proxy_async + async def test_optional_client_union_string_literal_put_default(self, optional_endpoint): + client = self.create_async_client(endpoint=optional_endpoint) + response = await client.optional_client_union_string_literal.put_default( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_client.py index b06efb80a5..adee9ea456 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/_client.py @@ -17,62 +17,78 @@ from ._configuration import OptionalClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanLiteralOperations, - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - DatetimeOperations, - DurationOperations, - FloatLiteralOperations, - IntLiteralOperations, - PlainDateOperations, - PlainTimeOperations, - RequiredAndOptionalOperations, - StringLiteralOperations, - StringOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, + OptionalClientBooleanLiteralOperations, + OptionalClientBytesOperations, + OptionalClientCollectionsByteOperations, + OptionalClientCollectionsModelOperations, + OptionalClientDatetimeOperations, + OptionalClientDurationOperations, + OptionalClientFloatLiteralOperations, + OptionalClientIntLiteralOperations, + OptionalClientPlainDateOperations, + OptionalClientPlainTimeOperations, + OptionalClientRequiredAndOptionalOperations, + OptionalClientStringLiteralOperations, + OptionalClientStringOperations, + OptionalClientUnionFloatLiteralOperations, + OptionalClientUnionIntLiteralOperations, + OptionalClientUnionStringLiteralOperations, ) class OptionalClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with optional properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.optional.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.optional.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.optional.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.optional.operations.DurationOperations - :ivar plain_date: PlainDateOperations operations - :vartype plain_date: typetest.property.optional.operations.PlainDateOperations - :ivar plain_time: PlainTimeOperations operations - :vartype plain_time: typetest.property.optional.operations.PlainTimeOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.optional.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.optional.operations.CollectionsModelOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.optional.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.optional.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.optional.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.optional.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.optional.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.optional.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: typetest.property.optional.operations.UnionFloatLiteralOperations - :ivar required_and_optional: RequiredAndOptionalOperations operations - :vartype required_and_optional: - typetest.property.optional.operations.RequiredAndOptionalOperations + :ivar optional_client_string: OptionalClientStringOperations operations + :vartype optional_client_string: + typetest.property.optional.operations.OptionalClientStringOperations + :ivar optional_client_bytes: OptionalClientBytesOperations operations + :vartype optional_client_bytes: + typetest.property.optional.operations.OptionalClientBytesOperations + :ivar optional_client_datetime: OptionalClientDatetimeOperations operations + :vartype optional_client_datetime: + typetest.property.optional.operations.OptionalClientDatetimeOperations + :ivar optional_client_duration: OptionalClientDurationOperations operations + :vartype optional_client_duration: + typetest.property.optional.operations.OptionalClientDurationOperations + :ivar optional_client_plain_date: OptionalClientPlainDateOperations operations + :vartype optional_client_plain_date: + typetest.property.optional.operations.OptionalClientPlainDateOperations + :ivar optional_client_plain_time: OptionalClientPlainTimeOperations operations + :vartype optional_client_plain_time: + typetest.property.optional.operations.OptionalClientPlainTimeOperations + :ivar optional_client_collections_byte: OptionalClientCollectionsByteOperations operations + :vartype optional_client_collections_byte: + typetest.property.optional.operations.OptionalClientCollectionsByteOperations + :ivar optional_client_collections_model: OptionalClientCollectionsModelOperations operations + :vartype optional_client_collections_model: + typetest.property.optional.operations.OptionalClientCollectionsModelOperations + :ivar optional_client_string_literal: OptionalClientStringLiteralOperations operations + :vartype optional_client_string_literal: + typetest.property.optional.operations.OptionalClientStringLiteralOperations + :ivar optional_client_int_literal: OptionalClientIntLiteralOperations operations + :vartype optional_client_int_literal: + typetest.property.optional.operations.OptionalClientIntLiteralOperations + :ivar optional_client_float_literal: OptionalClientFloatLiteralOperations operations + :vartype optional_client_float_literal: + typetest.property.optional.operations.OptionalClientFloatLiteralOperations + :ivar optional_client_boolean_literal: OptionalClientBooleanLiteralOperations operations + :vartype optional_client_boolean_literal: + typetest.property.optional.operations.OptionalClientBooleanLiteralOperations + :ivar optional_client_union_string_literal: OptionalClientUnionStringLiteralOperations + operations + :vartype optional_client_union_string_literal: + typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations + :ivar optional_client_union_int_literal: OptionalClientUnionIntLiteralOperations operations + :vartype optional_client_union_int_literal: + typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations + :ivar optional_client_union_float_literal: OptionalClientUnionFloatLiteralOperations operations + :vartype optional_client_union_float_literal: + typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations + :ivar optional_client_required_and_optional: OptionalClientRequiredAndOptionalOperations + operations + :vartype optional_client_required_and_optional: + typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -105,32 +121,52 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_date = PlainDateOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_time = PlainTimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.optional_client_string = OptionalClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.optional_client_bytes = OptionalClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.optional_client_datetime = OptionalClientDatetimeOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.optional_client_duration = OptionalClientDurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.optional_client_plain_date = OptionalClientPlainDateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.required_and_optional = RequiredAndOptionalOperations( + self.optional_client_plain_time = OptionalClientPlainTimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_byte = OptionalClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_model = OptionalClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_string_literal = OptionalClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_int_literal = OptionalClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_float_literal = OptionalClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_boolean_literal = OptionalClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_string_literal = OptionalClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_int_literal = OptionalClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_float_literal = OptionalClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_required_and_optional = OptionalClientRequiredAndOptionalOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/_client.py index 504284f11f..2431135741 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/_client.py @@ -17,64 +17,78 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OptionalClientConfiguration from .operations import ( - BooleanLiteralOperations, - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - DatetimeOperations, - DurationOperations, - FloatLiteralOperations, - IntLiteralOperations, - PlainDateOperations, - PlainTimeOperations, - RequiredAndOptionalOperations, - StringLiteralOperations, - StringOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, + OptionalClientBooleanLiteralOperations, + OptionalClientBytesOperations, + OptionalClientCollectionsByteOperations, + OptionalClientCollectionsModelOperations, + OptionalClientDatetimeOperations, + OptionalClientDurationOperations, + OptionalClientFloatLiteralOperations, + OptionalClientIntLiteralOperations, + OptionalClientPlainDateOperations, + OptionalClientPlainTimeOperations, + OptionalClientRequiredAndOptionalOperations, + OptionalClientStringLiteralOperations, + OptionalClientStringOperations, + OptionalClientUnionFloatLiteralOperations, + OptionalClientUnionIntLiteralOperations, + OptionalClientUnionStringLiteralOperations, ) class OptionalClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with optional properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.optional.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.optional.aio.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.optional.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.optional.aio.operations.DurationOperations - :ivar plain_date: PlainDateOperations operations - :vartype plain_date: typetest.property.optional.aio.operations.PlainDateOperations - :ivar plain_time: PlainTimeOperations operations - :vartype plain_time: typetest.property.optional.aio.operations.PlainTimeOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.optional.aio.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.optional.aio.operations.CollectionsModelOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.optional.aio.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.optional.aio.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.optional.aio.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.optional.aio.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.optional.aio.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.optional.aio.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.optional.aio.operations.UnionFloatLiteralOperations - :ivar required_and_optional: RequiredAndOptionalOperations operations - :vartype required_and_optional: - typetest.property.optional.aio.operations.RequiredAndOptionalOperations + :ivar optional_client_string: OptionalClientStringOperations operations + :vartype optional_client_string: + typetest.property.optional.aio.operations.OptionalClientStringOperations + :ivar optional_client_bytes: OptionalClientBytesOperations operations + :vartype optional_client_bytes: + typetest.property.optional.aio.operations.OptionalClientBytesOperations + :ivar optional_client_datetime: OptionalClientDatetimeOperations operations + :vartype optional_client_datetime: + typetest.property.optional.aio.operations.OptionalClientDatetimeOperations + :ivar optional_client_duration: OptionalClientDurationOperations operations + :vartype optional_client_duration: + typetest.property.optional.aio.operations.OptionalClientDurationOperations + :ivar optional_client_plain_date: OptionalClientPlainDateOperations operations + :vartype optional_client_plain_date: + typetest.property.optional.aio.operations.OptionalClientPlainDateOperations + :ivar optional_client_plain_time: OptionalClientPlainTimeOperations operations + :vartype optional_client_plain_time: + typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations + :ivar optional_client_collections_byte: OptionalClientCollectionsByteOperations operations + :vartype optional_client_collections_byte: + typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations + :ivar optional_client_collections_model: OptionalClientCollectionsModelOperations operations + :vartype optional_client_collections_model: + typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations + :ivar optional_client_string_literal: OptionalClientStringLiteralOperations operations + :vartype optional_client_string_literal: + typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations + :ivar optional_client_int_literal: OptionalClientIntLiteralOperations operations + :vartype optional_client_int_literal: + typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations + :ivar optional_client_float_literal: OptionalClientFloatLiteralOperations operations + :vartype optional_client_float_literal: + typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations + :ivar optional_client_boolean_literal: OptionalClientBooleanLiteralOperations operations + :vartype optional_client_boolean_literal: + typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations + :ivar optional_client_union_string_literal: OptionalClientUnionStringLiteralOperations + operations + :vartype optional_client_union_string_literal: + typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations + :ivar optional_client_union_int_literal: OptionalClientUnionIntLiteralOperations operations + :vartype optional_client_union_int_literal: + typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations + :ivar optional_client_union_float_literal: OptionalClientUnionFloatLiteralOperations operations + :vartype optional_client_union_float_literal: + typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations + :ivar optional_client_required_and_optional: OptionalClientRequiredAndOptionalOperations + operations + :vartype optional_client_required_and_optional: + typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -107,32 +121,52 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_date = PlainDateOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_time = PlainTimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.optional_client_string = OptionalClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.optional_client_bytes = OptionalClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.optional_client_datetime = OptionalClientDatetimeOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.optional_client_duration = OptionalClientDurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.optional_client_plain_date = OptionalClientPlainDateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.required_and_optional = RequiredAndOptionalOperations( + self.optional_client_plain_time = OptionalClientPlainTimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_byte = OptionalClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_model = OptionalClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_string_literal = OptionalClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_int_literal = OptionalClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_float_literal = OptionalClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_boolean_literal = OptionalClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_string_literal = OptionalClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_int_literal = OptionalClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_float_literal = OptionalClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_required_and_optional = OptionalClientRequiredAndOptionalOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py index c6d4de0737..0ccd335fd0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py @@ -12,44 +12,44 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import PlainDateOperations # type: ignore -from ._operations import PlainTimeOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import RequiredAndOptionalOperations # type: ignore +from ._operations import OptionalClientStringOperations # type: ignore +from ._operations import OptionalClientBytesOperations # type: ignore +from ._operations import OptionalClientDatetimeOperations # type: ignore +from ._operations import OptionalClientDurationOperations # type: ignore +from ._operations import OptionalClientPlainDateOperations # type: ignore +from ._operations import OptionalClientPlainTimeOperations # type: ignore +from ._operations import OptionalClientCollectionsByteOperations # type: ignore +from ._operations import OptionalClientCollectionsModelOperations # type: ignore +from ._operations import OptionalClientStringLiteralOperations # type: ignore +from ._operations import OptionalClientIntLiteralOperations # type: ignore +from ._operations import OptionalClientFloatLiteralOperations # type: ignore +from ._operations import OptionalClientBooleanLiteralOperations # type: ignore +from ._operations import OptionalClientUnionStringLiteralOperations # type: ignore +from ._operations import OptionalClientUnionIntLiteralOperations # type: ignore +from ._operations import OptionalClientUnionFloatLiteralOperations # type: ignore +from ._operations import OptionalClientRequiredAndOptionalOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "PlainDateOperations", - "PlainTimeOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "RequiredAndOptionalOperations", + "OptionalClientStringOperations", + "OptionalClientBytesOperations", + "OptionalClientDatetimeOperations", + "OptionalClientDurationOperations", + "OptionalClientPlainDateOperations", + "OptionalClientPlainTimeOperations", + "OptionalClientCollectionsByteOperations", + "OptionalClientCollectionsModelOperations", + "OptionalClientStringLiteralOperations", + "OptionalClientIntLiteralOperations", + "OptionalClientFloatLiteralOperations", + "OptionalClientBooleanLiteralOperations", + "OptionalClientUnionStringLiteralOperations", + "OptionalClientUnionIntLiteralOperations", + "OptionalClientUnionFloatLiteralOperations", + "OptionalClientRequiredAndOptionalOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py index 9874f5d5f4..b5e29331b1 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py @@ -31,70 +31,70 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_literal_get_all_request, - build_boolean_literal_get_default_request, - build_boolean_literal_put_all_request, - build_boolean_literal_put_default_request, - build_bytes_get_all_request, - build_bytes_get_default_request, - build_bytes_put_all_request, - build_bytes_put_default_request, - build_collections_byte_get_all_request, - build_collections_byte_get_default_request, - build_collections_byte_put_all_request, - build_collections_byte_put_default_request, - build_collections_model_get_all_request, - build_collections_model_get_default_request, - build_collections_model_put_all_request, - build_collections_model_put_default_request, - build_datetime_get_all_request, - build_datetime_get_default_request, - build_datetime_put_all_request, - build_datetime_put_default_request, - build_duration_get_all_request, - build_duration_get_default_request, - build_duration_put_all_request, - build_duration_put_default_request, - build_float_literal_get_all_request, - build_float_literal_get_default_request, - build_float_literal_put_all_request, - build_float_literal_put_default_request, - build_int_literal_get_all_request, - build_int_literal_get_default_request, - build_int_literal_put_all_request, - build_int_literal_put_default_request, - build_plain_date_get_all_request, - build_plain_date_get_default_request, - build_plain_date_put_all_request, - build_plain_date_put_default_request, - build_plain_time_get_all_request, - build_plain_time_get_default_request, - build_plain_time_put_all_request, - build_plain_time_put_default_request, - build_required_and_optional_get_all_request, - build_required_and_optional_get_required_only_request, - build_required_and_optional_put_all_request, - build_required_and_optional_put_required_only_request, - build_string_get_all_request, - build_string_get_default_request, - build_string_literal_get_all_request, - build_string_literal_get_default_request, - build_string_literal_put_all_request, - build_string_literal_put_default_request, - build_string_put_all_request, - build_string_put_default_request, - build_union_float_literal_get_all_request, - build_union_float_literal_get_default_request, - build_union_float_literal_put_all_request, - build_union_float_literal_put_default_request, - build_union_int_literal_get_all_request, - build_union_int_literal_get_default_request, - build_union_int_literal_put_all_request, - build_union_int_literal_put_default_request, - build_union_string_literal_get_all_request, - build_union_string_literal_get_default_request, - build_union_string_literal_put_all_request, - build_union_string_literal_put_default_request, + build_optional_client_boolean_literal_get_all_request, + build_optional_client_boolean_literal_get_default_request, + build_optional_client_boolean_literal_put_all_request, + build_optional_client_boolean_literal_put_default_request, + build_optional_client_bytes_get_all_request, + build_optional_client_bytes_get_default_request, + build_optional_client_bytes_put_all_request, + build_optional_client_bytes_put_default_request, + build_optional_client_collections_byte_get_all_request, + build_optional_client_collections_byte_get_default_request, + build_optional_client_collections_byte_put_all_request, + build_optional_client_collections_byte_put_default_request, + build_optional_client_collections_model_get_all_request, + build_optional_client_collections_model_get_default_request, + build_optional_client_collections_model_put_all_request, + build_optional_client_collections_model_put_default_request, + build_optional_client_datetime_get_all_request, + build_optional_client_datetime_get_default_request, + build_optional_client_datetime_put_all_request, + build_optional_client_datetime_put_default_request, + build_optional_client_duration_get_all_request, + build_optional_client_duration_get_default_request, + build_optional_client_duration_put_all_request, + build_optional_client_duration_put_default_request, + build_optional_client_float_literal_get_all_request, + build_optional_client_float_literal_get_default_request, + build_optional_client_float_literal_put_all_request, + build_optional_client_float_literal_put_default_request, + build_optional_client_int_literal_get_all_request, + build_optional_client_int_literal_get_default_request, + build_optional_client_int_literal_put_all_request, + build_optional_client_int_literal_put_default_request, + build_optional_client_plain_date_get_all_request, + build_optional_client_plain_date_get_default_request, + build_optional_client_plain_date_put_all_request, + build_optional_client_plain_date_put_default_request, + build_optional_client_plain_time_get_all_request, + build_optional_client_plain_time_get_default_request, + build_optional_client_plain_time_put_all_request, + build_optional_client_plain_time_put_default_request, + build_optional_client_required_and_optional_get_all_request, + build_optional_client_required_and_optional_get_required_only_request, + build_optional_client_required_and_optional_put_all_request, + build_optional_client_required_and_optional_put_required_only_request, + build_optional_client_string_get_all_request, + build_optional_client_string_get_default_request, + build_optional_client_string_literal_get_all_request, + build_optional_client_string_literal_get_default_request, + build_optional_client_string_literal_put_all_request, + build_optional_client_string_literal_put_default_request, + build_optional_client_string_put_all_request, + build_optional_client_string_put_default_request, + build_optional_client_union_float_literal_get_all_request, + build_optional_client_union_float_literal_get_default_request, + build_optional_client_union_float_literal_put_all_request, + build_optional_client_union_float_literal_put_default_request, + build_optional_client_union_int_literal_get_all_request, + build_optional_client_union_int_literal_get_default_request, + build_optional_client_union_int_literal_put_all_request, + build_optional_client_union_int_literal_put_default_request, + build_optional_client_union_string_literal_get_all_request, + build_optional_client_union_string_literal_get_default_request, + build_optional_client_union_string_literal_put_all_request, + build_optional_client_union_string_literal_put_default_request, ) from .._configuration import OptionalClientConfiguration @@ -103,14 +103,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class OptionalClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`string` attribute. + :attr:`optional_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -141,7 +141,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_all_request( + _request = build_optional_client_string_get_all_request( headers=_headers, params=_params, ) @@ -197,7 +197,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_default_request( + _request = build_optional_client_string_get_default_request( headers=_headers, params=_params, ) @@ -307,7 +307,7 @@ async def put_all(self, body: Union[_models.StringProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_all_request( + _request = build_optional_client_string_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -407,7 +407,7 @@ async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_default_request( + _request = build_optional_client_string_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -433,14 +433,14 @@ async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class OptionalClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`bytes` attribute. + :attr:`optional_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -471,7 +471,7 @@ async def get_all(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_all_request( + _request = build_optional_client_bytes_get_all_request( headers=_headers, params=_params, ) @@ -527,7 +527,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_default_request( + _request = build_optional_client_bytes_get_default_request( headers=_headers, params=_params, ) @@ -637,7 +637,7 @@ async def put_all(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_all_request( + _request = build_optional_client_bytes_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -737,7 +737,7 @@ async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_default_request( + _request = build_optional_client_bytes_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -763,14 +763,14 @@ async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class OptionalClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`datetime` attribute. + :attr:`optional_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -801,7 +801,7 @@ async def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_all_request( + _request = build_optional_client_datetime_get_all_request( headers=_headers, params=_params, ) @@ -857,7 +857,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_default_request( + _request = build_optional_client_datetime_get_default_request( headers=_headers, params=_params, ) @@ -967,7 +967,7 @@ async def put_all(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_all_request( + _request = build_optional_client_datetime_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1067,7 +1067,7 @@ async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_default_request( + _request = build_optional_client_datetime_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1093,14 +1093,14 @@ async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class OptionalClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`duration` attribute. + :attr:`optional_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1131,7 +1131,7 @@ async def get_all(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_all_request( + _request = build_optional_client_duration_get_all_request( headers=_headers, params=_params, ) @@ -1187,7 +1187,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_default_request( + _request = build_optional_client_duration_get_default_request( headers=_headers, params=_params, ) @@ -1297,7 +1297,7 @@ async def put_all(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_all_request( + _request = build_optional_client_duration_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1397,7 +1397,7 @@ async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_default_request( + _request = build_optional_client_duration_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1423,14 +1423,14 @@ async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class PlainDateOperations: +class OptionalClientPlainDateOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`plain_date` attribute. + :attr:`optional_client_plain_date` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1461,7 +1461,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_all_request( + _request = build_optional_client_plain_date_get_all_request( headers=_headers, params=_params, ) @@ -1517,7 +1517,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_default_request( + _request = build_optional_client_plain_date_get_default_request( headers=_headers, params=_params, ) @@ -1627,7 +1627,7 @@ async def put_all(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_all_request( + _request = build_optional_client_plain_date_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1727,7 +1727,7 @@ async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_default_request( + _request = build_optional_client_plain_date_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1753,14 +1753,14 @@ async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class PlainTimeOperations: +class OptionalClientPlainTimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`plain_time` attribute. + :attr:`optional_client_plain_time` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1791,7 +1791,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_all_request( + _request = build_optional_client_plain_time_get_all_request( headers=_headers, params=_params, ) @@ -1847,7 +1847,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_default_request( + _request = build_optional_client_plain_time_get_default_request( headers=_headers, params=_params, ) @@ -1957,7 +1957,7 @@ async def put_all(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_all_request( + _request = build_optional_client_plain_time_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2057,7 +2057,7 @@ async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_default_request( + _request = build_optional_client_plain_time_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2083,14 +2083,14 @@ async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class OptionalClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`collections_byte` attribute. + :attr:`optional_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2121,7 +2121,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_all_request( + _request = build_optional_client_collections_byte_get_all_request( headers=_headers, params=_params, ) @@ -2177,7 +2177,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_default_request( + _request = build_optional_client_collections_byte_get_default_request( headers=_headers, params=_params, ) @@ -2287,7 +2287,7 @@ async def put_all(self, body: Union[_models.CollectionsByteProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_all_request( + _request = build_optional_client_collections_byte_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2387,7 +2387,7 @@ async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_default_request( + _request = build_optional_client_collections_byte_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2413,14 +2413,14 @@ async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class OptionalClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`collections_model` attribute. + :attr:`optional_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2452,7 +2452,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_all_request( + _request = build_optional_client_collections_model_get_all_request( headers=_headers, params=_params, ) @@ -2509,7 +2509,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_default_request( + _request = build_optional_client_collections_model_get_default_request( headers=_headers, params=_params, ) @@ -2619,7 +2619,7 @@ async def put_all(self, body: Union[_models.CollectionsModelProperty, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_all_request( + _request = build_optional_client_collections_model_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2719,7 +2719,7 @@ async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_default_request( + _request = build_optional_client_collections_model_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2745,14 +2745,14 @@ async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class OptionalClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`string_literal` attribute. + :attr:`optional_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2783,7 +2783,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_all_request( + _request = build_optional_client_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -2839,7 +2839,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_default_request( + _request = build_optional_client_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -2949,7 +2949,7 @@ async def put_all(self, body: Union[_models.StringLiteralProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_all_request( + _request = build_optional_client_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3049,7 +3049,7 @@ async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_default_request( + _request = build_optional_client_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3075,14 +3075,14 @@ async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[ return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class OptionalClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`int_literal` attribute. + :attr:`optional_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3113,7 +3113,7 @@ async def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_all_request( + _request = build_optional_client_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -3169,7 +3169,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_default_request( + _request = build_optional_client_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -3279,7 +3279,7 @@ async def put_all(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_all_request( + _request = build_optional_client_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3379,7 +3379,7 @@ async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_default_request( + _request = build_optional_client_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3405,14 +3405,14 @@ async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class OptionalClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`float_literal` attribute. + :attr:`optional_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3443,7 +3443,7 @@ async def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_all_request( + _request = build_optional_client_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -3499,7 +3499,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_default_request( + _request = build_optional_client_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -3609,7 +3609,7 @@ async def put_all(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_all_request( + _request = build_optional_client_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3709,7 +3709,7 @@ async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_default_request( + _request = build_optional_client_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3735,14 +3735,14 @@ async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class OptionalClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`boolean_literal` attribute. + :attr:`optional_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3773,7 +3773,7 @@ async def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_all_request( + _request = build_optional_client_boolean_literal_get_all_request( headers=_headers, params=_params, ) @@ -3829,7 +3829,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_default_request( + _request = build_optional_client_boolean_literal_get_default_request( headers=_headers, params=_params, ) @@ -3939,7 +3939,7 @@ async def put_all(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_all_request( + _request = build_optional_client_boolean_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4039,7 +4039,7 @@ async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_default_request( + _request = build_optional_client_boolean_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4065,14 +4065,14 @@ async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class OptionalClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_string_literal` attribute. + :attr:`optional_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4104,7 +4104,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_all_request( + _request = build_optional_client_union_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -4161,7 +4161,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_default_request( + _request = build_optional_client_union_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -4272,7 +4272,7 @@ async def put_all(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_all_request( + _request = build_optional_client_union_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4375,7 +4375,7 @@ async def put_default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_default_request( + _request = build_optional_client_union_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4401,14 +4401,14 @@ async def put_default( return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class OptionalClientUnionIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_int_literal` attribute. + :attr:`optional_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4439,7 +4439,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_all_request( + _request = build_optional_client_union_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -4495,7 +4495,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_default_request( + _request = build_optional_client_union_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -4605,7 +4605,7 @@ async def put_all(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_all_request( + _request = build_optional_client_union_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4705,7 +4705,7 @@ async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_default_request( + _request = build_optional_client_union_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4731,14 +4731,14 @@ async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class OptionalClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_float_literal` attribute. + :attr:`optional_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4770,7 +4770,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_all_request( + _request = build_optional_client_union_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -4827,7 +4827,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_default_request( + _request = build_optional_client_union_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -4938,7 +4938,7 @@ async def put_all(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_all_request( + _request = build_optional_client_union_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5039,7 +5039,7 @@ async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_default_request( + _request = build_optional_client_union_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5065,14 +5065,14 @@ async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, return cls(pipeline_response, None, {}) # type: ignore -class RequiredAndOptionalOperations: +class OptionalClientRequiredAndOptionalOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`required_and_optional` attribute. + :attr:`optional_client_required_and_optional` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5104,7 +5104,7 @@ async def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_all_request( + _request = build_optional_client_required_and_optional_get_all_request( headers=_headers, params=_params, ) @@ -5161,7 +5161,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_required_only_request( + _request = build_optional_client_required_and_optional_get_required_only_request( headers=_headers, params=_params, ) @@ -5272,7 +5272,7 @@ async def put_all(self, body: Union[_models.RequiredAndOptionalProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_all_request( + _request = build_optional_client_required_and_optional_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5377,7 +5377,7 @@ async def put_required_only( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_required_only_request( + _request = build_optional_client_required_and_optional_put_required_only_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py index c6d4de0737..0ccd335fd0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py @@ -12,44 +12,44 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import PlainDateOperations # type: ignore -from ._operations import PlainTimeOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import RequiredAndOptionalOperations # type: ignore +from ._operations import OptionalClientStringOperations # type: ignore +from ._operations import OptionalClientBytesOperations # type: ignore +from ._operations import OptionalClientDatetimeOperations # type: ignore +from ._operations import OptionalClientDurationOperations # type: ignore +from ._operations import OptionalClientPlainDateOperations # type: ignore +from ._operations import OptionalClientPlainTimeOperations # type: ignore +from ._operations import OptionalClientCollectionsByteOperations # type: ignore +from ._operations import OptionalClientCollectionsModelOperations # type: ignore +from ._operations import OptionalClientStringLiteralOperations # type: ignore +from ._operations import OptionalClientIntLiteralOperations # type: ignore +from ._operations import OptionalClientFloatLiteralOperations # type: ignore +from ._operations import OptionalClientBooleanLiteralOperations # type: ignore +from ._operations import OptionalClientUnionStringLiteralOperations # type: ignore +from ._operations import OptionalClientUnionIntLiteralOperations # type: ignore +from ._operations import OptionalClientUnionFloatLiteralOperations # type: ignore +from ._operations import OptionalClientRequiredAndOptionalOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "PlainDateOperations", - "PlainTimeOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "RequiredAndOptionalOperations", + "OptionalClientStringOperations", + "OptionalClientBytesOperations", + "OptionalClientDatetimeOperations", + "OptionalClientDurationOperations", + "OptionalClientPlainDateOperations", + "OptionalClientPlainTimeOperations", + "OptionalClientCollectionsByteOperations", + "OptionalClientCollectionsModelOperations", + "OptionalClientStringLiteralOperations", + "OptionalClientIntLiteralOperations", + "OptionalClientFloatLiteralOperations", + "OptionalClientBooleanLiteralOperations", + "OptionalClientUnionStringLiteralOperations", + "OptionalClientUnionIntLiteralOperations", + "OptionalClientUnionFloatLiteralOperations", + "OptionalClientRequiredAndOptionalOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py index 7ab303946f..e5467ab271 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -54,7 +54,7 @@ def build_string_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -68,7 +68,7 @@ def build_string_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -82,7 +82,7 @@ def build_string_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -96,7 +96,7 @@ def build_string_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -110,7 +110,7 @@ def build_bytes_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -124,7 +124,7 @@ def build_bytes_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -138,7 +138,7 @@ def build_bytes_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +152,7 @@ def build_bytes_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -166,7 +166,7 @@ def build_datetime_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -180,7 +180,7 @@ def build_datetime_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -194,7 +194,7 @@ def build_datetime_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -208,7 +208,7 @@ def build_datetime_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -222,7 +222,7 @@ def build_duration_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -236,7 +236,7 @@ def build_duration_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -250,7 +250,7 @@ def build_duration_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -264,7 +264,7 @@ def build_duration_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -278,7 +278,7 @@ def build_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -292,7 +292,7 @@ def build_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -306,7 +306,7 @@ def build_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -320,7 +320,7 @@ def build_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -334,7 +334,7 @@ def build_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -348,7 +348,7 @@ def build_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -362,7 +362,7 @@ def build_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -376,7 +376,9 @@ def build_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_byte_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -390,7 +392,9 @@ def build_collections_byte_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_byte_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -404,7 +408,9 @@ def build_collections_byte_get_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_byte_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -418,7 +424,9 @@ def build_collections_byte_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_byte_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_byte_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -432,7 +440,9 @@ def build_collections_byte_put_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_model_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -446,7 +456,9 @@ def build_collections_model_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_model_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -460,7 +472,9 @@ def build_collections_model_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_model_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -474,7 +488,9 @@ def build_collections_model_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_model_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -488,7 +504,7 @@ def build_collections_model_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -502,7 +518,9 @@ def build_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -516,7 +534,7 @@ def build_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -530,7 +548,9 @@ def build_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -544,7 +564,7 @@ def build_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -558,7 +578,9 @@ def build_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -572,7 +594,7 @@ def build_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -586,7 +608,9 @@ def build_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -600,7 +624,7 @@ def build_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -614,7 +638,9 @@ def build_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -628,7 +654,7 @@ def build_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -642,7 +668,9 @@ def build_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -656,7 +684,9 @@ def build_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_boolean_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -670,7 +700,9 @@ def build_boolean_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_boolean_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -684,7 +716,9 @@ def build_boolean_literal_get_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_boolean_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -698,7 +732,9 @@ def build_boolean_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_boolean_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -712,7 +748,9 @@ def build_boolean_literal_put_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -726,7 +764,9 @@ def build_union_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -740,7 +780,9 @@ def build_union_string_literal_get_default_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -754,7 +796,9 @@ def build_union_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -768,7 +812,9 @@ def build_union_string_literal_put_default_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_union_int_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -782,7 +828,9 @@ def build_union_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_int_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -796,7 +844,9 @@ def build_union_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_union_int_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -810,7 +860,9 @@ def build_union_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_int_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -824,7 +876,9 @@ def build_union_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -838,7 +892,9 @@ def build_union_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -852,7 +908,9 @@ def build_union_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -866,7 +924,9 @@ def build_union_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -880,7 +940,9 @@ def build_union_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_required_and_optional_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -894,7 +956,7 @@ def build_required_and_optional_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_get_required_only_request( # pylint: disable=name-too-long +def build_optional_client_required_and_optional_get_required_only_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -910,7 +972,9 @@ def build_required_and_optional_get_required_only_request( # pylint: disable=na return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_required_and_optional_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -924,7 +988,7 @@ def build_required_and_optional_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_put_required_only_request( # pylint: disable=name-too-long +def build_optional_client_required_and_optional_put_required_only_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -940,14 +1004,14 @@ def build_required_and_optional_put_required_only_request( # pylint: disable=na return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class OptionalClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`string` attribute. + :attr:`optional_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -978,7 +1042,7 @@ def get_all(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_all_request( + _request = build_optional_client_string_get_all_request( headers=_headers, params=_params, ) @@ -1034,7 +1098,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_default_request( + _request = build_optional_client_string_get_default_request( headers=_headers, params=_params, ) @@ -1144,7 +1208,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_all_request( + _request = build_optional_client_string_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1246,7 +1310,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_default_request( + _request = build_optional_client_string_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1272,14 +1336,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class OptionalClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`bytes` attribute. + :attr:`optional_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1310,7 +1374,7 @@ def get_all(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_all_request( + _request = build_optional_client_bytes_get_all_request( headers=_headers, params=_params, ) @@ -1366,7 +1430,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_default_request( + _request = build_optional_client_bytes_get_default_request( headers=_headers, params=_params, ) @@ -1476,7 +1540,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_all_request( + _request = build_optional_client_bytes_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1578,7 +1642,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_default_request( + _request = build_optional_client_bytes_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1604,14 +1668,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class OptionalClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`datetime` attribute. + :attr:`optional_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1642,7 +1706,7 @@ def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_all_request( + _request = build_optional_client_datetime_get_all_request( headers=_headers, params=_params, ) @@ -1698,7 +1762,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_default_request( + _request = build_optional_client_datetime_get_default_request( headers=_headers, params=_params, ) @@ -1808,7 +1872,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_all_request( + _request = build_optional_client_datetime_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1910,7 +1974,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_default_request( + _request = build_optional_client_datetime_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1936,14 +2000,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class OptionalClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`duration` attribute. + :attr:`optional_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1974,7 +2038,7 @@ def get_all(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_all_request( + _request = build_optional_client_duration_get_all_request( headers=_headers, params=_params, ) @@ -2030,7 +2094,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_default_request( + _request = build_optional_client_duration_get_default_request( headers=_headers, params=_params, ) @@ -2140,7 +2204,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_all_request( + _request = build_optional_client_duration_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2242,7 +2306,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_default_request( + _request = build_optional_client_duration_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2268,14 +2332,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class PlainDateOperations: +class OptionalClientPlainDateOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`plain_date` attribute. + :attr:`optional_client_plain_date` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2306,7 +2370,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_all_request( + _request = build_optional_client_plain_date_get_all_request( headers=_headers, params=_params, ) @@ -2362,7 +2426,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_default_request( + _request = build_optional_client_plain_date_get_default_request( headers=_headers, params=_params, ) @@ -2474,7 +2538,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_all_request( + _request = build_optional_client_plain_date_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2576,7 +2640,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_default_request( + _request = build_optional_client_plain_date_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2602,14 +2666,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class PlainTimeOperations: +class OptionalClientPlainTimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`plain_time` attribute. + :attr:`optional_client_plain_time` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2640,7 +2704,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_all_request( + _request = build_optional_client_plain_time_get_all_request( headers=_headers, params=_params, ) @@ -2696,7 +2760,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_default_request( + _request = build_optional_client_plain_time_get_default_request( headers=_headers, params=_params, ) @@ -2808,7 +2872,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_all_request( + _request = build_optional_client_plain_time_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2910,7 +2974,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_default_request( + _request = build_optional_client_plain_time_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2936,14 +3000,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class OptionalClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`collections_byte` attribute. + :attr:`optional_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2974,7 +3038,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_all_request( + _request = build_optional_client_collections_byte_get_all_request( headers=_headers, params=_params, ) @@ -3030,7 +3094,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_default_request( + _request = build_optional_client_collections_byte_get_default_request( headers=_headers, params=_params, ) @@ -3142,7 +3206,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_all_request( + _request = build_optional_client_collections_byte_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3244,7 +3308,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_default_request( + _request = build_optional_client_collections_byte_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3270,14 +3334,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class OptionalClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`collections_model` attribute. + :attr:`optional_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3309,7 +3373,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_all_request( + _request = build_optional_client_collections_model_get_all_request( headers=_headers, params=_params, ) @@ -3366,7 +3430,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_default_request( + _request = build_optional_client_collections_model_get_default_request( headers=_headers, params=_params, ) @@ -3478,7 +3542,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_all_request( + _request = build_optional_client_collections_model_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3580,7 +3644,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_default_request( + _request = build_optional_client_collections_model_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3606,14 +3670,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class OptionalClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`string_literal` attribute. + :attr:`optional_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3644,7 +3708,7 @@ def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_all_request( + _request = build_optional_client_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -3700,7 +3764,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_default_request( + _request = build_optional_client_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -3812,7 +3876,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_all_request( + _request = build_optional_client_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3914,7 +3978,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_default_request( + _request = build_optional_client_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3940,14 +4004,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class OptionalClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`int_literal` attribute. + :attr:`optional_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3978,7 +4042,7 @@ def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_all_request( + _request = build_optional_client_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -4034,7 +4098,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_default_request( + _request = build_optional_client_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -4146,7 +4210,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_all_request( + _request = build_optional_client_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4248,7 +4312,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_default_request( + _request = build_optional_client_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4274,14 +4338,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class OptionalClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`float_literal` attribute. + :attr:`optional_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4312,7 +4376,7 @@ def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_all_request( + _request = build_optional_client_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -4368,7 +4432,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_default_request( + _request = build_optional_client_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -4480,7 +4544,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_all_request( + _request = build_optional_client_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4582,7 +4646,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_default_request( + _request = build_optional_client_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4608,14 +4672,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class OptionalClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`boolean_literal` attribute. + :attr:`optional_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4646,7 +4710,7 @@ def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_all_request( + _request = build_optional_client_boolean_literal_get_all_request( headers=_headers, params=_params, ) @@ -4702,7 +4766,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_default_request( + _request = build_optional_client_boolean_literal_get_default_request( headers=_headers, params=_params, ) @@ -4814,7 +4878,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_all_request( + _request = build_optional_client_boolean_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4916,7 +4980,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_default_request( + _request = build_optional_client_boolean_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4942,14 +5006,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class OptionalClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_string_literal` attribute. + :attr:`optional_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4981,7 +5045,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_all_request( + _request = build_optional_client_union_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -5038,7 +5102,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_default_request( + _request = build_optional_client_union_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -5151,7 +5215,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_all_request( + _request = build_optional_client_union_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5254,7 +5318,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_default_request( + _request = build_optional_client_union_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5280,14 +5344,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class OptionalClientUnionIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_int_literal` attribute. + :attr:`optional_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5318,7 +5382,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_all_request( + _request = build_optional_client_union_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -5374,7 +5438,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_default_request( + _request = build_optional_client_union_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -5486,7 +5550,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_all_request( + _request = build_optional_client_union_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5588,7 +5652,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_default_request( + _request = build_optional_client_union_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5614,14 +5678,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class OptionalClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_float_literal` attribute. + :attr:`optional_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5653,7 +5717,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_all_request( + _request = build_optional_client_union_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -5710,7 +5774,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_default_request( + _request = build_optional_client_union_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -5823,7 +5887,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_all_request( + _request = build_optional_client_union_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5926,7 +5990,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_default_request( + _request = build_optional_client_union_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5952,14 +6016,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RequiredAndOptionalOperations: +class OptionalClientRequiredAndOptionalOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`required_and_optional` attribute. + :attr:`optional_client_required_and_optional` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5991,7 +6055,7 @@ def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_all_request( + _request = build_optional_client_required_and_optional_get_all_request( headers=_headers, params=_params, ) @@ -6048,7 +6112,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_required_only_request( + _request = build_optional_client_required_and_optional_get_required_only_request( headers=_headers, params=_params, ) @@ -6161,7 +6225,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_all_request( + _request = build_optional_client_required_and_optional_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -6264,7 +6328,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_required_only_request( + _request = build_optional_client_required_and_optional_put_required_only_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/apiview-properties.json index 159c153dfb..72339e5a63 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/apiview-properties.json @@ -34,121 +34,121 @@ "typetest.property.valuetypes.models.FixedInnerEnum": "Type.Property.ValueTypes.FixedInnerEnum", "typetest.property.valuetypes.models.InnerEnum": "Type.Property.ValueTypes.InnerEnum", "typetest.property.valuetypes.models.ExtendedEnum": "Type.Property.ValueTypes.ExtendedEnum", - "typetest.property.valuetypes.operations.BooleanOperations.get": "Type.Property.ValueTypes.Boolean.get", - "typetest.property.valuetypes.aio.operations.BooleanOperations.get": "Type.Property.ValueTypes.Boolean.get", - "typetest.property.valuetypes.operations.BooleanOperations.put": "Type.Property.ValueTypes.Boolean.put", - "typetest.property.valuetypes.aio.operations.BooleanOperations.put": "Type.Property.ValueTypes.Boolean.put", - "typetest.property.valuetypes.operations.StringOperations.get": "Type.Property.ValueTypes.String.get", - "typetest.property.valuetypes.aio.operations.StringOperations.get": "Type.Property.ValueTypes.String.get", - "typetest.property.valuetypes.operations.StringOperations.put": "Type.Property.ValueTypes.String.put", - "typetest.property.valuetypes.aio.operations.StringOperations.put": "Type.Property.ValueTypes.String.put", - "typetest.property.valuetypes.operations.BytesOperations.get": "Type.Property.ValueTypes.Bytes.get", - "typetest.property.valuetypes.aio.operations.BytesOperations.get": "Type.Property.ValueTypes.Bytes.get", - "typetest.property.valuetypes.operations.BytesOperations.put": "Type.Property.ValueTypes.Bytes.put", - "typetest.property.valuetypes.aio.operations.BytesOperations.put": "Type.Property.ValueTypes.Bytes.put", - "typetest.property.valuetypes.operations.IntOperations.get": "Type.Property.ValueTypes.Int.get", - "typetest.property.valuetypes.aio.operations.IntOperations.get": "Type.Property.ValueTypes.Int.get", - "typetest.property.valuetypes.operations.IntOperations.put": "Type.Property.ValueTypes.Int.put", - "typetest.property.valuetypes.aio.operations.IntOperations.put": "Type.Property.ValueTypes.Int.put", - "typetest.property.valuetypes.operations.FloatOperations.get": "Type.Property.ValueTypes.Float.get", - "typetest.property.valuetypes.aio.operations.FloatOperations.get": "Type.Property.ValueTypes.Float.get", - "typetest.property.valuetypes.operations.FloatOperations.put": "Type.Property.ValueTypes.Float.put", - "typetest.property.valuetypes.aio.operations.FloatOperations.put": "Type.Property.ValueTypes.Float.put", - "typetest.property.valuetypes.operations.DecimalOperations.get": "Type.Property.ValueTypes.Decimal.get", - "typetest.property.valuetypes.aio.operations.DecimalOperations.get": "Type.Property.ValueTypes.Decimal.get", - "typetest.property.valuetypes.operations.DecimalOperations.put": "Type.Property.ValueTypes.Decimal.put", - "typetest.property.valuetypes.aio.operations.DecimalOperations.put": "Type.Property.ValueTypes.Decimal.put", - "typetest.property.valuetypes.operations.Decimal128Operations.get": "Type.Property.ValueTypes.Decimal128.get", - "typetest.property.valuetypes.aio.operations.Decimal128Operations.get": "Type.Property.ValueTypes.Decimal128.get", - "typetest.property.valuetypes.operations.Decimal128Operations.put": "Type.Property.ValueTypes.Decimal128.put", - "typetest.property.valuetypes.aio.operations.Decimal128Operations.put": "Type.Property.ValueTypes.Decimal128.put", - "typetest.property.valuetypes.operations.DatetimeOperations.get": "Type.Property.ValueTypes.Datetime.get", - "typetest.property.valuetypes.aio.operations.DatetimeOperations.get": "Type.Property.ValueTypes.Datetime.get", - "typetest.property.valuetypes.operations.DatetimeOperations.put": "Type.Property.ValueTypes.Datetime.put", - "typetest.property.valuetypes.aio.operations.DatetimeOperations.put": "Type.Property.ValueTypes.Datetime.put", - "typetest.property.valuetypes.operations.DurationOperations.get": "Type.Property.ValueTypes.Duration.get", - "typetest.property.valuetypes.aio.operations.DurationOperations.get": "Type.Property.ValueTypes.Duration.get", - "typetest.property.valuetypes.operations.DurationOperations.put": "Type.Property.ValueTypes.Duration.put", - "typetest.property.valuetypes.aio.operations.DurationOperations.put": "Type.Property.ValueTypes.Duration.put", - "typetest.property.valuetypes.operations.EnumOperations.get": "Type.Property.ValueTypes.Enum.get", - "typetest.property.valuetypes.aio.operations.EnumOperations.get": "Type.Property.ValueTypes.Enum.get", - "typetest.property.valuetypes.operations.EnumOperations.put": "Type.Property.ValueTypes.Enum.put", - "typetest.property.valuetypes.aio.operations.EnumOperations.put": "Type.Property.ValueTypes.Enum.put", - "typetest.property.valuetypes.operations.ExtensibleEnumOperations.get": "Type.Property.ValueTypes.ExtensibleEnum.get", - "typetest.property.valuetypes.aio.operations.ExtensibleEnumOperations.get": "Type.Property.ValueTypes.ExtensibleEnum.get", - "typetest.property.valuetypes.operations.ExtensibleEnumOperations.put": "Type.Property.ValueTypes.ExtensibleEnum.put", - "typetest.property.valuetypes.aio.operations.ExtensibleEnumOperations.put": "Type.Property.ValueTypes.ExtensibleEnum.put", - "typetest.property.valuetypes.operations.ModelOperations.get": "Type.Property.ValueTypes.Model.get", - "typetest.property.valuetypes.aio.operations.ModelOperations.get": "Type.Property.ValueTypes.Model.get", - "typetest.property.valuetypes.operations.ModelOperations.put": "Type.Property.ValueTypes.Model.put", - "typetest.property.valuetypes.aio.operations.ModelOperations.put": "Type.Property.ValueTypes.Model.put", - "typetest.property.valuetypes.operations.CollectionsStringOperations.get": "Type.Property.ValueTypes.CollectionsString.get", - "typetest.property.valuetypes.aio.operations.CollectionsStringOperations.get": "Type.Property.ValueTypes.CollectionsString.get", - "typetest.property.valuetypes.operations.CollectionsStringOperations.put": "Type.Property.ValueTypes.CollectionsString.put", - "typetest.property.valuetypes.aio.operations.CollectionsStringOperations.put": "Type.Property.ValueTypes.CollectionsString.put", - "typetest.property.valuetypes.operations.CollectionsIntOperations.get": "Type.Property.ValueTypes.CollectionsInt.get", - "typetest.property.valuetypes.aio.operations.CollectionsIntOperations.get": "Type.Property.ValueTypes.CollectionsInt.get", - "typetest.property.valuetypes.operations.CollectionsIntOperations.put": "Type.Property.ValueTypes.CollectionsInt.put", - "typetest.property.valuetypes.aio.operations.CollectionsIntOperations.put": "Type.Property.ValueTypes.CollectionsInt.put", - "typetest.property.valuetypes.operations.CollectionsModelOperations.get": "Type.Property.ValueTypes.CollectionsModel.get", - "typetest.property.valuetypes.aio.operations.CollectionsModelOperations.get": "Type.Property.ValueTypes.CollectionsModel.get", - "typetest.property.valuetypes.operations.CollectionsModelOperations.put": "Type.Property.ValueTypes.CollectionsModel.put", - "typetest.property.valuetypes.aio.operations.CollectionsModelOperations.put": "Type.Property.ValueTypes.CollectionsModel.put", - "typetest.property.valuetypes.operations.DictionaryStringOperations.get": "Type.Property.ValueTypes.DictionaryString.get", - "typetest.property.valuetypes.aio.operations.DictionaryStringOperations.get": "Type.Property.ValueTypes.DictionaryString.get", - "typetest.property.valuetypes.operations.DictionaryStringOperations.put": "Type.Property.ValueTypes.DictionaryString.put", - "typetest.property.valuetypes.aio.operations.DictionaryStringOperations.put": "Type.Property.ValueTypes.DictionaryString.put", - "typetest.property.valuetypes.operations.NeverOperations.get": "Type.Property.ValueTypes.Never.get", - "typetest.property.valuetypes.aio.operations.NeverOperations.get": "Type.Property.ValueTypes.Never.get", - "typetest.property.valuetypes.operations.NeverOperations.put": "Type.Property.ValueTypes.Never.put", - "typetest.property.valuetypes.aio.operations.NeverOperations.put": "Type.Property.ValueTypes.Never.put", - "typetest.property.valuetypes.operations.UnknownStringOperations.get": "Type.Property.ValueTypes.UnknownString.get", - "typetest.property.valuetypes.aio.operations.UnknownStringOperations.get": "Type.Property.ValueTypes.UnknownString.get", - "typetest.property.valuetypes.operations.UnknownStringOperations.put": "Type.Property.ValueTypes.UnknownString.put", - "typetest.property.valuetypes.aio.operations.UnknownStringOperations.put": "Type.Property.ValueTypes.UnknownString.put", - "typetest.property.valuetypes.operations.UnknownIntOperations.get": "Type.Property.ValueTypes.UnknownInt.get", - "typetest.property.valuetypes.aio.operations.UnknownIntOperations.get": "Type.Property.ValueTypes.UnknownInt.get", - "typetest.property.valuetypes.operations.UnknownIntOperations.put": "Type.Property.ValueTypes.UnknownInt.put", - "typetest.property.valuetypes.aio.operations.UnknownIntOperations.put": "Type.Property.ValueTypes.UnknownInt.put", - "typetest.property.valuetypes.operations.UnknownDictOperations.get": "Type.Property.ValueTypes.UnknownDict.get", - "typetest.property.valuetypes.aio.operations.UnknownDictOperations.get": "Type.Property.ValueTypes.UnknownDict.get", - "typetest.property.valuetypes.operations.UnknownDictOperations.put": "Type.Property.ValueTypes.UnknownDict.put", - "typetest.property.valuetypes.aio.operations.UnknownDictOperations.put": "Type.Property.ValueTypes.UnknownDict.put", - "typetest.property.valuetypes.operations.UnknownArrayOperations.get": "Type.Property.ValueTypes.UnknownArray.get", - "typetest.property.valuetypes.aio.operations.UnknownArrayOperations.get": "Type.Property.ValueTypes.UnknownArray.get", - "typetest.property.valuetypes.operations.UnknownArrayOperations.put": "Type.Property.ValueTypes.UnknownArray.put", - "typetest.property.valuetypes.aio.operations.UnknownArrayOperations.put": "Type.Property.ValueTypes.UnknownArray.put", - "typetest.property.valuetypes.operations.StringLiteralOperations.get": "Type.Property.ValueTypes.StringLiteral.get", - "typetest.property.valuetypes.aio.operations.StringLiteralOperations.get": "Type.Property.ValueTypes.StringLiteral.get", - "typetest.property.valuetypes.operations.StringLiteralOperations.put": "Type.Property.ValueTypes.StringLiteral.put", - "typetest.property.valuetypes.aio.operations.StringLiteralOperations.put": "Type.Property.ValueTypes.StringLiteral.put", - "typetest.property.valuetypes.operations.IntLiteralOperations.get": "Type.Property.ValueTypes.IntLiteral.get", - "typetest.property.valuetypes.aio.operations.IntLiteralOperations.get": "Type.Property.ValueTypes.IntLiteral.get", - "typetest.property.valuetypes.operations.IntLiteralOperations.put": "Type.Property.ValueTypes.IntLiteral.put", - "typetest.property.valuetypes.aio.operations.IntLiteralOperations.put": "Type.Property.ValueTypes.IntLiteral.put", - "typetest.property.valuetypes.operations.FloatLiteralOperations.get": "Type.Property.ValueTypes.FloatLiteral.get", - "typetest.property.valuetypes.aio.operations.FloatLiteralOperations.get": "Type.Property.ValueTypes.FloatLiteral.get", - "typetest.property.valuetypes.operations.FloatLiteralOperations.put": "Type.Property.ValueTypes.FloatLiteral.put", - "typetest.property.valuetypes.aio.operations.FloatLiteralOperations.put": "Type.Property.ValueTypes.FloatLiteral.put", - "typetest.property.valuetypes.operations.BooleanLiteralOperations.get": "Type.Property.ValueTypes.BooleanLiteral.get", - "typetest.property.valuetypes.aio.operations.BooleanLiteralOperations.get": "Type.Property.ValueTypes.BooleanLiteral.get", - "typetest.property.valuetypes.operations.BooleanLiteralOperations.put": "Type.Property.ValueTypes.BooleanLiteral.put", - "typetest.property.valuetypes.aio.operations.BooleanLiteralOperations.put": "Type.Property.ValueTypes.BooleanLiteral.put", - "typetest.property.valuetypes.operations.UnionStringLiteralOperations.get": "Type.Property.ValueTypes.UnionStringLiteral.get", - "typetest.property.valuetypes.aio.operations.UnionStringLiteralOperations.get": "Type.Property.ValueTypes.UnionStringLiteral.get", - "typetest.property.valuetypes.operations.UnionStringLiteralOperations.put": "Type.Property.ValueTypes.UnionStringLiteral.put", - "typetest.property.valuetypes.aio.operations.UnionStringLiteralOperations.put": "Type.Property.ValueTypes.UnionStringLiteral.put", - "typetest.property.valuetypes.operations.UnionIntLiteralOperations.get": "Type.Property.ValueTypes.UnionIntLiteral.get", - "typetest.property.valuetypes.aio.operations.UnionIntLiteralOperations.get": "Type.Property.ValueTypes.UnionIntLiteral.get", - "typetest.property.valuetypes.operations.UnionIntLiteralOperations.put": "Type.Property.ValueTypes.UnionIntLiteral.put", - "typetest.property.valuetypes.aio.operations.UnionIntLiteralOperations.put": "Type.Property.ValueTypes.UnionIntLiteral.put", - "typetest.property.valuetypes.operations.UnionFloatLiteralOperations.get": "Type.Property.ValueTypes.UnionFloatLiteral.get", - "typetest.property.valuetypes.aio.operations.UnionFloatLiteralOperations.get": "Type.Property.ValueTypes.UnionFloatLiteral.get", - "typetest.property.valuetypes.operations.UnionFloatLiteralOperations.put": "Type.Property.ValueTypes.UnionFloatLiteral.put", - "typetest.property.valuetypes.aio.operations.UnionFloatLiteralOperations.put": "Type.Property.ValueTypes.UnionFloatLiteral.put", - "typetest.property.valuetypes.operations.UnionEnumValueOperations.get": "Type.Property.ValueTypes.UnionEnumValue.get", - "typetest.property.valuetypes.aio.operations.UnionEnumValueOperations.get": "Type.Property.ValueTypes.UnionEnumValue.get", - "typetest.property.valuetypes.operations.UnionEnumValueOperations.put": "Type.Property.ValueTypes.UnionEnumValue.put", - "typetest.property.valuetypes.aio.operations.UnionEnumValueOperations.put": "Type.Property.ValueTypes.UnionEnumValue.put" + "typetest.property.valuetypes.operations.ValueTypesClientBooleanOperations.get": "Type.Property.ValueTypes.Boolean.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanOperations.get": "Type.Property.ValueTypes.Boolean.get", + "typetest.property.valuetypes.operations.ValueTypesClientBooleanOperations.put": "Type.Property.ValueTypes.Boolean.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanOperations.put": "Type.Property.ValueTypes.Boolean.put", + "typetest.property.valuetypes.operations.ValueTypesClientStringOperations.get": "Type.Property.ValueTypes.String.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientStringOperations.get": "Type.Property.ValueTypes.String.get", + "typetest.property.valuetypes.operations.ValueTypesClientStringOperations.put": "Type.Property.ValueTypes.String.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientStringOperations.put": "Type.Property.ValueTypes.String.put", + "typetest.property.valuetypes.operations.ValueTypesClientBytesOperations.get": "Type.Property.ValueTypes.Bytes.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBytesOperations.get": "Type.Property.ValueTypes.Bytes.get", + "typetest.property.valuetypes.operations.ValueTypesClientBytesOperations.put": "Type.Property.ValueTypes.Bytes.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBytesOperations.put": "Type.Property.ValueTypes.Bytes.put", + "typetest.property.valuetypes.operations.ValueTypesClientIntOperations.get": "Type.Property.ValueTypes.Int.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientIntOperations.get": "Type.Property.ValueTypes.Int.get", + "typetest.property.valuetypes.operations.ValueTypesClientIntOperations.put": "Type.Property.ValueTypes.Int.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientIntOperations.put": "Type.Property.ValueTypes.Int.put", + "typetest.property.valuetypes.operations.ValueTypesClientFloatOperations.get": "Type.Property.ValueTypes.Float.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientFloatOperations.get": "Type.Property.ValueTypes.Float.get", + "typetest.property.valuetypes.operations.ValueTypesClientFloatOperations.put": "Type.Property.ValueTypes.Float.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientFloatOperations.put": "Type.Property.ValueTypes.Float.put", + "typetest.property.valuetypes.operations.ValueTypesClientDecimalOperations.get": "Type.Property.ValueTypes.Decimal.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDecimalOperations.get": "Type.Property.ValueTypes.Decimal.get", + "typetest.property.valuetypes.operations.ValueTypesClientDecimalOperations.put": "Type.Property.ValueTypes.Decimal.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDecimalOperations.put": "Type.Property.ValueTypes.Decimal.put", + "typetest.property.valuetypes.operations.ValueTypesClientDecimal128Operations.get": "Type.Property.ValueTypes.Decimal128.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDecimal128Operations.get": "Type.Property.ValueTypes.Decimal128.get", + "typetest.property.valuetypes.operations.ValueTypesClientDecimal128Operations.put": "Type.Property.ValueTypes.Decimal128.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDecimal128Operations.put": "Type.Property.ValueTypes.Decimal128.put", + "typetest.property.valuetypes.operations.ValueTypesClientDatetimeOperations.get": "Type.Property.ValueTypes.Datetime.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDatetimeOperations.get": "Type.Property.ValueTypes.Datetime.get", + "typetest.property.valuetypes.operations.ValueTypesClientDatetimeOperations.put": "Type.Property.ValueTypes.Datetime.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDatetimeOperations.put": "Type.Property.ValueTypes.Datetime.put", + "typetest.property.valuetypes.operations.ValueTypesClientDurationOperations.get": "Type.Property.ValueTypes.Duration.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDurationOperations.get": "Type.Property.ValueTypes.Duration.get", + "typetest.property.valuetypes.operations.ValueTypesClientDurationOperations.put": "Type.Property.ValueTypes.Duration.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDurationOperations.put": "Type.Property.ValueTypes.Duration.put", + "typetest.property.valuetypes.operations.ValueTypesClientEnumOperations.get": "Type.Property.ValueTypes.Enum.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientEnumOperations.get": "Type.Property.ValueTypes.Enum.get", + "typetest.property.valuetypes.operations.ValueTypesClientEnumOperations.put": "Type.Property.ValueTypes.Enum.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientEnumOperations.put": "Type.Property.ValueTypes.Enum.put", + "typetest.property.valuetypes.operations.ValueTypesClientExtensibleEnumOperations.get": "Type.Property.ValueTypes.ExtensibleEnum.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientExtensibleEnumOperations.get": "Type.Property.ValueTypes.ExtensibleEnum.get", + "typetest.property.valuetypes.operations.ValueTypesClientExtensibleEnumOperations.put": "Type.Property.ValueTypes.ExtensibleEnum.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientExtensibleEnumOperations.put": "Type.Property.ValueTypes.ExtensibleEnum.put", + "typetest.property.valuetypes.operations.ValueTypesClientModelOperations.get": "Type.Property.ValueTypes.Model.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientModelOperations.get": "Type.Property.ValueTypes.Model.get", + "typetest.property.valuetypes.operations.ValueTypesClientModelOperations.put": "Type.Property.ValueTypes.Model.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientModelOperations.put": "Type.Property.ValueTypes.Model.put", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsStringOperations.get": "Type.Property.ValueTypes.CollectionsString.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsStringOperations.get": "Type.Property.ValueTypes.CollectionsString.get", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsStringOperations.put": "Type.Property.ValueTypes.CollectionsString.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsStringOperations.put": "Type.Property.ValueTypes.CollectionsString.put", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsIntOperations.get": "Type.Property.ValueTypes.CollectionsInt.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsIntOperations.get": "Type.Property.ValueTypes.CollectionsInt.get", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsIntOperations.put": "Type.Property.ValueTypes.CollectionsInt.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsIntOperations.put": "Type.Property.ValueTypes.CollectionsInt.put", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsModelOperations.get": "Type.Property.ValueTypes.CollectionsModel.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsModelOperations.get": "Type.Property.ValueTypes.CollectionsModel.get", + "typetest.property.valuetypes.operations.ValueTypesClientCollectionsModelOperations.put": "Type.Property.ValueTypes.CollectionsModel.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsModelOperations.put": "Type.Property.ValueTypes.CollectionsModel.put", + "typetest.property.valuetypes.operations.ValueTypesClientDictionaryStringOperations.get": "Type.Property.ValueTypes.DictionaryString.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDictionaryStringOperations.get": "Type.Property.ValueTypes.DictionaryString.get", + "typetest.property.valuetypes.operations.ValueTypesClientDictionaryStringOperations.put": "Type.Property.ValueTypes.DictionaryString.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientDictionaryStringOperations.put": "Type.Property.ValueTypes.DictionaryString.put", + "typetest.property.valuetypes.operations.ValueTypesClientNeverOperations.get": "Type.Property.ValueTypes.Never.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientNeverOperations.get": "Type.Property.ValueTypes.Never.get", + "typetest.property.valuetypes.operations.ValueTypesClientNeverOperations.put": "Type.Property.ValueTypes.Never.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientNeverOperations.put": "Type.Property.ValueTypes.Never.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownStringOperations.get": "Type.Property.ValueTypes.UnknownString.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownStringOperations.get": "Type.Property.ValueTypes.UnknownString.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownStringOperations.put": "Type.Property.ValueTypes.UnknownString.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownStringOperations.put": "Type.Property.ValueTypes.UnknownString.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownIntOperations.get": "Type.Property.ValueTypes.UnknownInt.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownIntOperations.get": "Type.Property.ValueTypes.UnknownInt.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownIntOperations.put": "Type.Property.ValueTypes.UnknownInt.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownIntOperations.put": "Type.Property.ValueTypes.UnknownInt.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownDictOperations.get": "Type.Property.ValueTypes.UnknownDict.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownDictOperations.get": "Type.Property.ValueTypes.UnknownDict.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownDictOperations.put": "Type.Property.ValueTypes.UnknownDict.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownDictOperations.put": "Type.Property.ValueTypes.UnknownDict.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownArrayOperations.get": "Type.Property.ValueTypes.UnknownArray.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownArrayOperations.get": "Type.Property.ValueTypes.UnknownArray.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnknownArrayOperations.put": "Type.Property.ValueTypes.UnknownArray.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownArrayOperations.put": "Type.Property.ValueTypes.UnknownArray.put", + "typetest.property.valuetypes.operations.ValueTypesClientStringLiteralOperations.get": "Type.Property.ValueTypes.StringLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientStringLiteralOperations.get": "Type.Property.ValueTypes.StringLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientStringLiteralOperations.put": "Type.Property.ValueTypes.StringLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientStringLiteralOperations.put": "Type.Property.ValueTypes.StringLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientIntLiteralOperations.get": "Type.Property.ValueTypes.IntLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientIntLiteralOperations.get": "Type.Property.ValueTypes.IntLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientIntLiteralOperations.put": "Type.Property.ValueTypes.IntLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientIntLiteralOperations.put": "Type.Property.ValueTypes.IntLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientFloatLiteralOperations.get": "Type.Property.ValueTypes.FloatLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientFloatLiteralOperations.get": "Type.Property.ValueTypes.FloatLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientFloatLiteralOperations.put": "Type.Property.ValueTypes.FloatLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientFloatLiteralOperations.put": "Type.Property.ValueTypes.FloatLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientBooleanLiteralOperations.get": "Type.Property.ValueTypes.BooleanLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanLiteralOperations.get": "Type.Property.ValueTypes.BooleanLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientBooleanLiteralOperations.put": "Type.Property.ValueTypes.BooleanLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanLiteralOperations.put": "Type.Property.ValueTypes.BooleanLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnionStringLiteralOperations.get": "Type.Property.ValueTypes.UnionStringLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionStringLiteralOperations.get": "Type.Property.ValueTypes.UnionStringLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnionStringLiteralOperations.put": "Type.Property.ValueTypes.UnionStringLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionStringLiteralOperations.put": "Type.Property.ValueTypes.UnionStringLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnionIntLiteralOperations.get": "Type.Property.ValueTypes.UnionIntLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionIntLiteralOperations.get": "Type.Property.ValueTypes.UnionIntLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnionIntLiteralOperations.put": "Type.Property.ValueTypes.UnionIntLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionIntLiteralOperations.put": "Type.Property.ValueTypes.UnionIntLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnionFloatLiteralOperations.get": "Type.Property.ValueTypes.UnionFloatLiteral.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionFloatLiteralOperations.get": "Type.Property.ValueTypes.UnionFloatLiteral.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnionFloatLiteralOperations.put": "Type.Property.ValueTypes.UnionFloatLiteral.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionFloatLiteralOperations.put": "Type.Property.ValueTypes.UnionFloatLiteral.put", + "typetest.property.valuetypes.operations.ValueTypesClientUnionEnumValueOperations.get": "Type.Property.ValueTypes.UnionEnumValue.get", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionEnumValueOperations.get": "Type.Property.ValueTypes.UnionEnumValue.get", + "typetest.property.valuetypes.operations.ValueTypesClientUnionEnumValueOperations.put": "Type.Property.ValueTypes.UnionEnumValue.put", + "typetest.property.valuetypes.aio.operations.ValueTypesClientUnionEnumValueOperations.put": "Type.Property.ValueTypes.UnionEnumValue.put" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations.py new file mode 100644 index 0000000000..b47c1cd9b3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBooleanLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_boolean_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_boolean_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_boolean_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_boolean_literal.put( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations_async.py new file mode 100644 index 0000000000..de7c543036 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBooleanLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_boolean_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_boolean_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_boolean_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_boolean_literal.put( + body={"property": True}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations.py new file mode 100644 index 0000000000..ac80e885a1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBooleanOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_boolean_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_boolean.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_boolean_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_boolean.put( + body={"property": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations_async.py new file mode 100644 index 0000000000..bf848273a6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_boolean_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBooleanOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_boolean_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_boolean.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_boolean_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_boolean.put( + body={"property": bool}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations.py new file mode 100644 index 0000000000..b78615b944 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBytesOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_bytes_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_bytes.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_bytes_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_bytes.put( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations_async.py new file mode 100644 index 0000000000..4aaa57379e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_bytes_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientBytesOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_bytes_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_bytes.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_bytes_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_bytes.put( + body={"property": bytes("bytes", encoding="utf-8")}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations.py new file mode 100644 index 0000000000..dc2d6012bf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsIntOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_int_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_int_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_int.put( + body={"property": [0]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations_async.py new file mode 100644 index 0000000000..4189d09a44 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_int_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsIntOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_int_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_int_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_int.put( + body={"property": [0]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations.py new file mode 100644 index 0000000000..9255343d27 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsModelOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_model_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_model.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_model_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_model.put( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations_async.py new file mode 100644 index 0000000000..0f23083418 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_model_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsModelOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_model_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_model.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_model_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_model.put( + body={"property": [{"property": "str"}]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations.py new file mode 100644 index 0000000000..7923803b36 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsStringOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_string_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_collections_string_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_collections_string.put( + body={"property": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations_async.py new file mode 100644 index 0000000000..30334dee32 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_collections_string_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientCollectionsStringOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_string_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_collections_string_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_collections_string.put( + body={"property": ["str"]}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations.py new file mode 100644 index 0000000000..274783bd29 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDatetimeOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_datetime_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_datetime.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_datetime_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_datetime.put( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations_async.py new file mode 100644 index 0000000000..894d07316e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_datetime_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDatetimeOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_datetime_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_datetime.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_datetime_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_datetime.put( + body={"property": "2020-02-20 00:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations.py new file mode 100644 index 0000000000..2760829b30 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDecimal128Operations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_decimal128_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_decimal128.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_decimal128_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_decimal128.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations_async.py new file mode 100644 index 0000000000..679f993587 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal128_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDecimal128OperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_decimal128_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_decimal128.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_decimal128_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_decimal128.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations.py new file mode 100644 index 0000000000..30c18351a5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDecimalOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_decimal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_decimal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_decimal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_decimal.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations_async.py new file mode 100644 index 0000000000..8cd0652eb0 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_decimal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDecimalOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_decimal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_decimal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_decimal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_decimal.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations.py new file mode 100644 index 0000000000..77244dce18 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDictionaryStringOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_dictionary_string_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_dictionary_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_dictionary_string_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_dictionary_string.put( + body={"property": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations_async.py new file mode 100644 index 0000000000..bf9fae2ae4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_dictionary_string_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDictionaryStringOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_dictionary_string_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_dictionary_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_dictionary_string_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_dictionary_string.put( + body={"property": {"str": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations.py new file mode 100644 index 0000000000..7f55a8e404 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDurationOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_duration_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_duration.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_duration_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_duration.put( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations_async.py new file mode 100644 index 0000000000..1b6be69b9e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_duration_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientDurationOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_duration_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_duration.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_duration_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_duration.put( + body={"property": "1 day, 0:00:00"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations.py new file mode 100644 index 0000000000..6e4492a39f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientEnumOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_enum_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_enum.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_enum_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_enum.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations_async.py new file mode 100644 index 0000000000..2833b0e72d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_enum_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientEnumOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_enum_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_enum.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_enum_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_enum.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations.py new file mode 100644 index 0000000000..3d4476bea4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientExtensibleEnumOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_extensible_enum_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_extensible_enum.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_extensible_enum_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_extensible_enum.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations_async.py new file mode 100644 index 0000000000..a4c9f07128 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_extensible_enum_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientExtensibleEnumOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_extensible_enum_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_extensible_enum.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_extensible_enum_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_extensible_enum.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations.py new file mode 100644 index 0000000000..8af013deb9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientFloatLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_float_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_float_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_float_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_float_literal.put( + body={"property": 43.125}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations_async.py new file mode 100644 index 0000000000..ff3b1a4510 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientFloatLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_float_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_float_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_float_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_float_literal.put( + body={"property": 43.125}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations.py new file mode 100644 index 0000000000..25f2a2278b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientFloatOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_float_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_float.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_float_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_float.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations_async.py new file mode 100644 index 0000000000..f66a80ec30 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_float_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientFloatOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_float_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_float.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_float_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_float.put( + body={"property": 0.0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations.py new file mode 100644 index 0000000000..4ddeac93ce --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientIntLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_int_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_int_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_int_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_int_literal.put( + body={"property": 42}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations_async.py new file mode 100644 index 0000000000..6a6e2d73d7 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientIntLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_int_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_int_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_int_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_int_literal.put( + body={"property": 42}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations.py new file mode 100644 index 0000000000..4b07ff5e59 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientIntOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_int_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_int_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_int.put( + body={"property": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations_async.py new file mode 100644 index 0000000000..bc2d474622 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_int_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientIntOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_int_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_int_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_int.put( + body={"property": 0}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations.py new file mode 100644 index 0000000000..babd93b114 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientModelOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_model_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_model.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_model_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_model.put( + body={"property": {"property": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations_async.py new file mode 100644 index 0000000000..7049b2d90c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_model_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientModelOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_model_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_model.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_model_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_model.put( + body={"property": {"property": "str"}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations.py new file mode 100644 index 0000000000..c64ec093bc --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientNeverOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_never_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_never.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_never_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_never.put( + body={}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations_async.py new file mode 100644 index 0000000000..0d1c4ce99c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_never_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientNeverOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_never_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_never.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_never_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_never.put( + body={}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations.py new file mode 100644 index 0000000000..3d63d82b5b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientStringLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_string_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_string_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_string_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_string_literal.put( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations_async.py new file mode 100644 index 0000000000..c6fc3afb8f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientStringLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_string_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_string_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_string_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_string_literal.put( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations.py new file mode 100644 index 0000000000..e4a3e754a5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientStringOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_string_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_string_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_string.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations_async.py new file mode 100644 index 0000000000..f6b14d36f8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_string_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientStringOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_string_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_string_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_string.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations.py new file mode 100644 index 0000000000..fa210361dd --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionEnumValueOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_enum_value_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_enum_value.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_enum_value_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_enum_value.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations_async.py new file mode 100644 index 0000000000..2118e50106 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_enum_value_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionEnumValueOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_enum_value_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_enum_value.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_enum_value_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_enum_value.put( + body={"property": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations.py new file mode 100644 index 0000000000..66a0ed9cfa --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionFloatLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_float_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_float_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_float_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_float_literal.put( + body={"property": 43.125}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations_async.py new file mode 100644 index 0000000000..553e61001a --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_float_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionFloatLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_float_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_float_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_float_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_float_literal.put( + body={"property": 43.125}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations.py new file mode 100644 index 0000000000..fba8e5086d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionIntLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_int_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_int_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_int_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_int_literal.put( + body={"property": 42}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations_async.py new file mode 100644 index 0000000000..b194eed73e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_int_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionIntLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_int_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_int_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_int_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_int_literal.put( + body={"property": 42}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations.py new file mode 100644 index 0000000000..3792446459 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionStringLiteralOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_string_literal_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_string_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_union_string_literal_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_union_string_literal.put( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations_async.py new file mode 100644 index 0000000000..1dc37b9848 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_union_string_literal_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnionStringLiteralOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_string_literal_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_string_literal.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_union_string_literal_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_union_string_literal.put( + body={"property": "hello"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations.py new file mode 100644 index 0000000000..775fecc187 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownArrayOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_array_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_array.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_array_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_array.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations_async.py new file mode 100644 index 0000000000..3461af35e5 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_array_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownArrayOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_array_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_array.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_array_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_array.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations.py new file mode 100644 index 0000000000..3eafcfaf2e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownDictOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_dict_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_dict.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_dict_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_dict.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations_async.py new file mode 100644 index 0000000000..3e8eae21e8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_dict_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownDictOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_dict_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_dict.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_dict_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_dict.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations.py new file mode 100644 index 0000000000..736b6cd94d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownIntOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_int_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_int_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_int.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations_async.py new file mode 100644 index 0000000000..c5c30032f9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_int_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownIntOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_int_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_int.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_int_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_int.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations.py new file mode 100644 index 0000000000..ec2f0e5dde --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ValueTypesClientTestBase, ValueTypesPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownStringOperations(ValueTypesClientTestBase): + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_string_get(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy + def test_value_types_client_unknown_string_put(self, valuetypes_endpoint): + client = self.create_client(endpoint=valuetypes_endpoint) + response = client.value_types_client_unknown_string.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations_async.py new file mode 100644 index 0000000000..c9b84468f3 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/generated_tests/test_value_types_value_types_client_unknown_string_operations_async.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ValueTypesPreparer +from testpreparer_async import ValueTypesClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestValueTypesValueTypesClientUnknownStringOperationsAsync(ValueTypesClientTestBaseAsync): + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_string_get(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_string.get() + + # please add some check logic here by yourself + # ... + + @ValueTypesPreparer() + @recorded_by_proxy_async + async def test_value_types_client_unknown_string_put(self, valuetypes_endpoint): + client = self.create_async_client(endpoint=valuetypes_endpoint) + response = await client.value_types_client_unknown_string.put( + body={"property": {}}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py index e284c7ec2e..955f1862e0 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py @@ -17,102 +17,134 @@ from ._configuration import ValueTypesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanLiteralOperations, - BooleanOperations, - BytesOperations, - CollectionsIntOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - Decimal128Operations, - DecimalOperations, - DictionaryStringOperations, - DurationOperations, - EnumOperations, - ExtensibleEnumOperations, - FloatLiteralOperations, - FloatOperations, - IntLiteralOperations, - IntOperations, - ModelOperations, - NeverOperations, - StringLiteralOperations, - StringOperations, - UnionEnumValueOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, - UnknownArrayOperations, - UnknownDictOperations, - UnknownIntOperations, - UnknownStringOperations, + ValueTypesClientBooleanLiteralOperations, + ValueTypesClientBooleanOperations, + ValueTypesClientBytesOperations, + ValueTypesClientCollectionsIntOperations, + ValueTypesClientCollectionsModelOperations, + ValueTypesClientCollectionsStringOperations, + ValueTypesClientDatetimeOperations, + ValueTypesClientDecimal128Operations, + ValueTypesClientDecimalOperations, + ValueTypesClientDictionaryStringOperations, + ValueTypesClientDurationOperations, + ValueTypesClientEnumOperations, + ValueTypesClientExtensibleEnumOperations, + ValueTypesClientFloatLiteralOperations, + ValueTypesClientFloatOperations, + ValueTypesClientIntLiteralOperations, + ValueTypesClientIntOperations, + ValueTypesClientModelOperations, + ValueTypesClientNeverOperations, + ValueTypesClientStringLiteralOperations, + ValueTypesClientStringOperations, + ValueTypesClientUnionEnumValueOperations, + ValueTypesClientUnionFloatLiteralOperations, + ValueTypesClientUnionIntLiteralOperations, + ValueTypesClientUnionStringLiteralOperations, + ValueTypesClientUnknownArrayOperations, + ValueTypesClientUnknownDictOperations, + ValueTypesClientUnknownIntOperations, + ValueTypesClientUnknownStringOperations, ) class ValueTypesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various property types for models. - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.property.valuetypes.operations.BooleanOperations - :ivar string: StringOperations operations - :vartype string: typetest.property.valuetypes.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.valuetypes.operations.BytesOperations - :ivar int_operations: IntOperations operations - :vartype int_operations: typetest.property.valuetypes.operations.IntOperations - :ivar float: FloatOperations operations - :vartype float: typetest.property.valuetypes.operations.FloatOperations - :ivar decimal: DecimalOperations operations - :vartype decimal: typetest.property.valuetypes.operations.DecimalOperations - :ivar decimal128: Decimal128Operations operations - :vartype decimal128: typetest.property.valuetypes.operations.Decimal128Operations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.valuetypes.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.valuetypes.operations.DurationOperations - :ivar enum: EnumOperations operations - :vartype enum: typetest.property.valuetypes.operations.EnumOperations - :ivar extensible_enum: ExtensibleEnumOperations operations - :vartype extensible_enum: typetest.property.valuetypes.operations.ExtensibleEnumOperations - :ivar model: ModelOperations operations - :vartype model: typetest.property.valuetypes.operations.ModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.valuetypes.operations.CollectionsStringOperations - :ivar collections_int: CollectionsIntOperations operations - :vartype collections_int: typetest.property.valuetypes.operations.CollectionsIntOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.valuetypes.operations.CollectionsModelOperations - :ivar dictionary_string: DictionaryStringOperations operations - :vartype dictionary_string: typetest.property.valuetypes.operations.DictionaryStringOperations - :ivar never: NeverOperations operations - :vartype never: typetest.property.valuetypes.operations.NeverOperations - :ivar unknown_string: UnknownStringOperations operations - :vartype unknown_string: typetest.property.valuetypes.operations.UnknownStringOperations - :ivar unknown_int: UnknownIntOperations operations - :vartype unknown_int: typetest.property.valuetypes.operations.UnknownIntOperations - :ivar unknown_dict: UnknownDictOperations operations - :vartype unknown_dict: typetest.property.valuetypes.operations.UnknownDictOperations - :ivar unknown_array: UnknownArrayOperations operations - :vartype unknown_array: typetest.property.valuetypes.operations.UnknownArrayOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.valuetypes.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.valuetypes.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.valuetypes.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.valuetypes.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.valuetypes.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.valuetypes.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.valuetypes.operations.UnionFloatLiteralOperations - :ivar union_enum_value: UnionEnumValueOperations operations - :vartype union_enum_value: typetest.property.valuetypes.operations.UnionEnumValueOperations + :ivar value_types_client_boolean: ValueTypesClientBooleanOperations operations + :vartype value_types_client_boolean: + typetest.property.valuetypes.operations.ValueTypesClientBooleanOperations + :ivar value_types_client_string: ValueTypesClientStringOperations operations + :vartype value_types_client_string: + typetest.property.valuetypes.operations.ValueTypesClientStringOperations + :ivar value_types_client_bytes: ValueTypesClientBytesOperations operations + :vartype value_types_client_bytes: + typetest.property.valuetypes.operations.ValueTypesClientBytesOperations + :ivar value_types_client_int: ValueTypesClientIntOperations operations + :vartype value_types_client_int: + typetest.property.valuetypes.operations.ValueTypesClientIntOperations + :ivar value_types_client_float: ValueTypesClientFloatOperations operations + :vartype value_types_client_float: + typetest.property.valuetypes.operations.ValueTypesClientFloatOperations + :ivar value_types_client_decimal: ValueTypesClientDecimalOperations operations + :vartype value_types_client_decimal: + typetest.property.valuetypes.operations.ValueTypesClientDecimalOperations + :ivar value_types_client_decimal128: ValueTypesClientDecimal128Operations operations + :vartype value_types_client_decimal128: + typetest.property.valuetypes.operations.ValueTypesClientDecimal128Operations + :ivar value_types_client_datetime: ValueTypesClientDatetimeOperations operations + :vartype value_types_client_datetime: + typetest.property.valuetypes.operations.ValueTypesClientDatetimeOperations + :ivar value_types_client_duration: ValueTypesClientDurationOperations operations + :vartype value_types_client_duration: + typetest.property.valuetypes.operations.ValueTypesClientDurationOperations + :ivar value_types_client_enum: ValueTypesClientEnumOperations operations + :vartype value_types_client_enum: + typetest.property.valuetypes.operations.ValueTypesClientEnumOperations + :ivar value_types_client_extensible_enum: ValueTypesClientExtensibleEnumOperations operations + :vartype value_types_client_extensible_enum: + typetest.property.valuetypes.operations.ValueTypesClientExtensibleEnumOperations + :ivar value_types_client_model: ValueTypesClientModelOperations operations + :vartype value_types_client_model: + typetest.property.valuetypes.operations.ValueTypesClientModelOperations + :ivar value_types_client_collections_string: ValueTypesClientCollectionsStringOperations + operations + :vartype value_types_client_collections_string: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsStringOperations + :ivar value_types_client_collections_int: ValueTypesClientCollectionsIntOperations operations + :vartype value_types_client_collections_int: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsIntOperations + :ivar value_types_client_collections_model: ValueTypesClientCollectionsModelOperations + operations + :vartype value_types_client_collections_model: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsModelOperations + :ivar value_types_client_dictionary_string: ValueTypesClientDictionaryStringOperations + operations + :vartype value_types_client_dictionary_string: + typetest.property.valuetypes.operations.ValueTypesClientDictionaryStringOperations + :ivar value_types_client_never: ValueTypesClientNeverOperations operations + :vartype value_types_client_never: + typetest.property.valuetypes.operations.ValueTypesClientNeverOperations + :ivar value_types_client_unknown_string: ValueTypesClientUnknownStringOperations operations + :vartype value_types_client_unknown_string: + typetest.property.valuetypes.operations.ValueTypesClientUnknownStringOperations + :ivar value_types_client_unknown_int: ValueTypesClientUnknownIntOperations operations + :vartype value_types_client_unknown_int: + typetest.property.valuetypes.operations.ValueTypesClientUnknownIntOperations + :ivar value_types_client_unknown_dict: ValueTypesClientUnknownDictOperations operations + :vartype value_types_client_unknown_dict: + typetest.property.valuetypes.operations.ValueTypesClientUnknownDictOperations + :ivar value_types_client_unknown_array: ValueTypesClientUnknownArrayOperations operations + :vartype value_types_client_unknown_array: + typetest.property.valuetypes.operations.ValueTypesClientUnknownArrayOperations + :ivar value_types_client_string_literal: ValueTypesClientStringLiteralOperations operations + :vartype value_types_client_string_literal: + typetest.property.valuetypes.operations.ValueTypesClientStringLiteralOperations + :ivar value_types_client_int_literal: ValueTypesClientIntLiteralOperations operations + :vartype value_types_client_int_literal: + typetest.property.valuetypes.operations.ValueTypesClientIntLiteralOperations + :ivar value_types_client_float_literal: ValueTypesClientFloatLiteralOperations operations + :vartype value_types_client_float_literal: + typetest.property.valuetypes.operations.ValueTypesClientFloatLiteralOperations + :ivar value_types_client_boolean_literal: ValueTypesClientBooleanLiteralOperations operations + :vartype value_types_client_boolean_literal: + typetest.property.valuetypes.operations.ValueTypesClientBooleanLiteralOperations + :ivar value_types_client_union_string_literal: ValueTypesClientUnionStringLiteralOperations + operations + :vartype value_types_client_union_string_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionStringLiteralOperations + :ivar value_types_client_union_int_literal: ValueTypesClientUnionIntLiteralOperations + operations + :vartype value_types_client_union_int_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionIntLiteralOperations + :ivar value_types_client_union_float_literal: ValueTypesClientUnionFloatLiteralOperations + operations + :vartype value_types_client_union_float_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionFloatLiteralOperations + :ivar value_types_client_union_enum_value: ValueTypesClientUnionEnumValueOperations operations + :vartype value_types_client_union_enum_value: + typetest.property.valuetypes.operations.ValueTypesClientUnionEnumValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -145,47 +177,93 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_operations = IntOperations(self._client, self._config, self._serialize, self._deserialize) - self.float = FloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal = DecimalOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128 = Decimal128Operations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.enum = EnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensible_enum = ExtensibleEnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_string = CollectionsStringOperations( + self.value_types_client_boolean = ValueTypesClientBooleanOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_int = CollectionsIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_model = CollectionsModelOperations( + self.value_types_client_string = ValueTypesClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.dictionary_string = DictionaryStringOperations( + self.value_types_client_bytes = ValueTypesClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.never = NeverOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_string = UnknownStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_int = UnknownIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_dict = UnknownDictOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_array = UnknownArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.value_types_client_int = ValueTypesClientIntOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.value_types_client_float = ValueTypesClientFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.value_types_client_decimal = ValueTypesClientDecimalOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_decimal128 = ValueTypesClientDecimal128Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_datetime = ValueTypesClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_duration = ValueTypesClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_enum = ValueTypesClientEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_extensible_enum = ValueTypesClientExtensibleEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_model = ValueTypesClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_string = ValueTypesClientCollectionsStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_int = ValueTypesClientCollectionsIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_model = ValueTypesClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_dictionary_string = ValueTypesClientDictionaryStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_never = ValueTypesClientNeverOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_string = ValueTypesClientUnknownStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_int = ValueTypesClientUnknownIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_dict = ValueTypesClientUnknownDictOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_array = ValueTypesClientUnknownArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_string_literal = ValueTypesClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_int_literal = ValueTypesClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_float_literal = ValueTypesClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_boolean_literal = ValueTypesClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_string_literal = ValueTypesClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_int_literal = ValueTypesClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_float_literal = ValueTypesClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_enum_value = ValueTypesClientUnionEnumValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_enum_value = UnionEnumValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py index 1b455c9c8a..040fd15505 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py @@ -17,105 +17,134 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ValueTypesClientConfiguration from .operations import ( - BooleanLiteralOperations, - BooleanOperations, - BytesOperations, - CollectionsIntOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - Decimal128Operations, - DecimalOperations, - DictionaryStringOperations, - DurationOperations, - EnumOperations, - ExtensibleEnumOperations, - FloatLiteralOperations, - FloatOperations, - IntLiteralOperations, - IntOperations, - ModelOperations, - NeverOperations, - StringLiteralOperations, - StringOperations, - UnionEnumValueOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, - UnknownArrayOperations, - UnknownDictOperations, - UnknownIntOperations, - UnknownStringOperations, + ValueTypesClientBooleanLiteralOperations, + ValueTypesClientBooleanOperations, + ValueTypesClientBytesOperations, + ValueTypesClientCollectionsIntOperations, + ValueTypesClientCollectionsModelOperations, + ValueTypesClientCollectionsStringOperations, + ValueTypesClientDatetimeOperations, + ValueTypesClientDecimal128Operations, + ValueTypesClientDecimalOperations, + ValueTypesClientDictionaryStringOperations, + ValueTypesClientDurationOperations, + ValueTypesClientEnumOperations, + ValueTypesClientExtensibleEnumOperations, + ValueTypesClientFloatLiteralOperations, + ValueTypesClientFloatOperations, + ValueTypesClientIntLiteralOperations, + ValueTypesClientIntOperations, + ValueTypesClientModelOperations, + ValueTypesClientNeverOperations, + ValueTypesClientStringLiteralOperations, + ValueTypesClientStringOperations, + ValueTypesClientUnionEnumValueOperations, + ValueTypesClientUnionFloatLiteralOperations, + ValueTypesClientUnionIntLiteralOperations, + ValueTypesClientUnionStringLiteralOperations, + ValueTypesClientUnknownArrayOperations, + ValueTypesClientUnknownDictOperations, + ValueTypesClientUnknownIntOperations, + ValueTypesClientUnknownStringOperations, ) class ValueTypesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various property types for models. - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.property.valuetypes.aio.operations.BooleanOperations - :ivar string: StringOperations operations - :vartype string: typetest.property.valuetypes.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.valuetypes.aio.operations.BytesOperations - :ivar int_operations: IntOperations operations - :vartype int_operations: typetest.property.valuetypes.aio.operations.IntOperations - :ivar float: FloatOperations operations - :vartype float: typetest.property.valuetypes.aio.operations.FloatOperations - :ivar decimal: DecimalOperations operations - :vartype decimal: typetest.property.valuetypes.aio.operations.DecimalOperations - :ivar decimal128: Decimal128Operations operations - :vartype decimal128: typetest.property.valuetypes.aio.operations.Decimal128Operations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.valuetypes.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.valuetypes.aio.operations.DurationOperations - :ivar enum: EnumOperations operations - :vartype enum: typetest.property.valuetypes.aio.operations.EnumOperations - :ivar extensible_enum: ExtensibleEnumOperations operations - :vartype extensible_enum: typetest.property.valuetypes.aio.operations.ExtensibleEnumOperations - :ivar model: ModelOperations operations - :vartype model: typetest.property.valuetypes.aio.operations.ModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.valuetypes.aio.operations.CollectionsStringOperations - :ivar collections_int: CollectionsIntOperations operations - :vartype collections_int: typetest.property.valuetypes.aio.operations.CollectionsIntOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.valuetypes.aio.operations.CollectionsModelOperations - :ivar dictionary_string: DictionaryStringOperations operations - :vartype dictionary_string: - typetest.property.valuetypes.aio.operations.DictionaryStringOperations - :ivar never: NeverOperations operations - :vartype never: typetest.property.valuetypes.aio.operations.NeverOperations - :ivar unknown_string: UnknownStringOperations operations - :vartype unknown_string: typetest.property.valuetypes.aio.operations.UnknownStringOperations - :ivar unknown_int: UnknownIntOperations operations - :vartype unknown_int: typetest.property.valuetypes.aio.operations.UnknownIntOperations - :ivar unknown_dict: UnknownDictOperations operations - :vartype unknown_dict: typetest.property.valuetypes.aio.operations.UnknownDictOperations - :ivar unknown_array: UnknownArrayOperations operations - :vartype unknown_array: typetest.property.valuetypes.aio.operations.UnknownArrayOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.valuetypes.aio.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.valuetypes.aio.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.valuetypes.aio.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.valuetypes.aio.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.valuetypes.aio.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: - typetest.property.valuetypes.aio.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.valuetypes.aio.operations.UnionFloatLiteralOperations - :ivar union_enum_value: UnionEnumValueOperations operations - :vartype union_enum_value: typetest.property.valuetypes.aio.operations.UnionEnumValueOperations + :ivar value_types_client_boolean: ValueTypesClientBooleanOperations operations + :vartype value_types_client_boolean: + typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanOperations + :ivar value_types_client_string: ValueTypesClientStringOperations operations + :vartype value_types_client_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientStringOperations + :ivar value_types_client_bytes: ValueTypesClientBytesOperations operations + :vartype value_types_client_bytes: + typetest.property.valuetypes.aio.operations.ValueTypesClientBytesOperations + :ivar value_types_client_int: ValueTypesClientIntOperations operations + :vartype value_types_client_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientIntOperations + :ivar value_types_client_float: ValueTypesClientFloatOperations operations + :vartype value_types_client_float: + typetest.property.valuetypes.aio.operations.ValueTypesClientFloatOperations + :ivar value_types_client_decimal: ValueTypesClientDecimalOperations operations + :vartype value_types_client_decimal: + typetest.property.valuetypes.aio.operations.ValueTypesClientDecimalOperations + :ivar value_types_client_decimal128: ValueTypesClientDecimal128Operations operations + :vartype value_types_client_decimal128: + typetest.property.valuetypes.aio.operations.ValueTypesClientDecimal128Operations + :ivar value_types_client_datetime: ValueTypesClientDatetimeOperations operations + :vartype value_types_client_datetime: + typetest.property.valuetypes.aio.operations.ValueTypesClientDatetimeOperations + :ivar value_types_client_duration: ValueTypesClientDurationOperations operations + :vartype value_types_client_duration: + typetest.property.valuetypes.aio.operations.ValueTypesClientDurationOperations + :ivar value_types_client_enum: ValueTypesClientEnumOperations operations + :vartype value_types_client_enum: + typetest.property.valuetypes.aio.operations.ValueTypesClientEnumOperations + :ivar value_types_client_extensible_enum: ValueTypesClientExtensibleEnumOperations operations + :vartype value_types_client_extensible_enum: + typetest.property.valuetypes.aio.operations.ValueTypesClientExtensibleEnumOperations + :ivar value_types_client_model: ValueTypesClientModelOperations operations + :vartype value_types_client_model: + typetest.property.valuetypes.aio.operations.ValueTypesClientModelOperations + :ivar value_types_client_collections_string: ValueTypesClientCollectionsStringOperations + operations + :vartype value_types_client_collections_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsStringOperations + :ivar value_types_client_collections_int: ValueTypesClientCollectionsIntOperations operations + :vartype value_types_client_collections_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsIntOperations + :ivar value_types_client_collections_model: ValueTypesClientCollectionsModelOperations + operations + :vartype value_types_client_collections_model: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsModelOperations + :ivar value_types_client_dictionary_string: ValueTypesClientDictionaryStringOperations + operations + :vartype value_types_client_dictionary_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientDictionaryStringOperations + :ivar value_types_client_never: ValueTypesClientNeverOperations operations + :vartype value_types_client_never: + typetest.property.valuetypes.aio.operations.ValueTypesClientNeverOperations + :ivar value_types_client_unknown_string: ValueTypesClientUnknownStringOperations operations + :vartype value_types_client_unknown_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownStringOperations + :ivar value_types_client_unknown_int: ValueTypesClientUnknownIntOperations operations + :vartype value_types_client_unknown_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownIntOperations + :ivar value_types_client_unknown_dict: ValueTypesClientUnknownDictOperations operations + :vartype value_types_client_unknown_dict: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownDictOperations + :ivar value_types_client_unknown_array: ValueTypesClientUnknownArrayOperations operations + :vartype value_types_client_unknown_array: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownArrayOperations + :ivar value_types_client_string_literal: ValueTypesClientStringLiteralOperations operations + :vartype value_types_client_string_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientStringLiteralOperations + :ivar value_types_client_int_literal: ValueTypesClientIntLiteralOperations operations + :vartype value_types_client_int_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientIntLiteralOperations + :ivar value_types_client_float_literal: ValueTypesClientFloatLiteralOperations operations + :vartype value_types_client_float_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientFloatLiteralOperations + :ivar value_types_client_boolean_literal: ValueTypesClientBooleanLiteralOperations operations + :vartype value_types_client_boolean_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanLiteralOperations + :ivar value_types_client_union_string_literal: ValueTypesClientUnionStringLiteralOperations + operations + :vartype value_types_client_union_string_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionStringLiteralOperations + :ivar value_types_client_union_int_literal: ValueTypesClientUnionIntLiteralOperations + operations + :vartype value_types_client_union_int_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionIntLiteralOperations + :ivar value_types_client_union_float_literal: ValueTypesClientUnionFloatLiteralOperations + operations + :vartype value_types_client_union_float_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionFloatLiteralOperations + :ivar value_types_client_union_enum_value: ValueTypesClientUnionEnumValueOperations operations + :vartype value_types_client_union_enum_value: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionEnumValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -148,47 +177,93 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_operations = IntOperations(self._client, self._config, self._serialize, self._deserialize) - self.float = FloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal = DecimalOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128 = Decimal128Operations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.enum = EnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensible_enum = ExtensibleEnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_string = CollectionsStringOperations( + self.value_types_client_boolean = ValueTypesClientBooleanOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_int = CollectionsIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_model = CollectionsModelOperations( + self.value_types_client_string = ValueTypesClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.dictionary_string = DictionaryStringOperations( + self.value_types_client_bytes = ValueTypesClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.never = NeverOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_string = UnknownStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_int = UnknownIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_dict = UnknownDictOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_array = UnknownArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.value_types_client_int = ValueTypesClientIntOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.value_types_client_float = ValueTypesClientFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.value_types_client_decimal = ValueTypesClientDecimalOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_decimal128 = ValueTypesClientDecimal128Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_datetime = ValueTypesClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_duration = ValueTypesClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_enum = ValueTypesClientEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_extensible_enum = ValueTypesClientExtensibleEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_model = ValueTypesClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_string = ValueTypesClientCollectionsStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_int = ValueTypesClientCollectionsIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_model = ValueTypesClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_dictionary_string = ValueTypesClientDictionaryStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_never = ValueTypesClientNeverOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_string = ValueTypesClientUnknownStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_int = ValueTypesClientUnknownIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_dict = ValueTypesClientUnknownDictOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_array = ValueTypesClientUnknownArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_string_literal = ValueTypesClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_int_literal = ValueTypesClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_float_literal = ValueTypesClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_boolean_literal = ValueTypesClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_string_literal = ValueTypesClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_int_literal = ValueTypesClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_float_literal = ValueTypesClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_enum_value = ValueTypesClientUnionEnumValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_enum_value = UnionEnumValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py index 314aeada20..de46ea2d72 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py @@ -12,70 +12,70 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BooleanOperations # type: ignore -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import IntOperations # type: ignore -from ._operations import FloatOperations # type: ignore -from ._operations import DecimalOperations # type: ignore -from ._operations import Decimal128Operations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import EnumOperations # type: ignore -from ._operations import ExtensibleEnumOperations # type: ignore -from ._operations import ModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore -from ._operations import CollectionsIntOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import DictionaryStringOperations # type: ignore -from ._operations import NeverOperations # type: ignore -from ._operations import UnknownStringOperations # type: ignore -from ._operations import UnknownIntOperations # type: ignore -from ._operations import UnknownDictOperations # type: ignore -from ._operations import UnknownArrayOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import UnionEnumValueOperations # type: ignore +from ._operations import ValueTypesClientBooleanOperations # type: ignore +from ._operations import ValueTypesClientStringOperations # type: ignore +from ._operations import ValueTypesClientBytesOperations # type: ignore +from ._operations import ValueTypesClientIntOperations # type: ignore +from ._operations import ValueTypesClientFloatOperations # type: ignore +from ._operations import ValueTypesClientDecimalOperations # type: ignore +from ._operations import ValueTypesClientDecimal128Operations # type: ignore +from ._operations import ValueTypesClientDatetimeOperations # type: ignore +from ._operations import ValueTypesClientDurationOperations # type: ignore +from ._operations import ValueTypesClientEnumOperations # type: ignore +from ._operations import ValueTypesClientExtensibleEnumOperations # type: ignore +from ._operations import ValueTypesClientModelOperations # type: ignore +from ._operations import ValueTypesClientCollectionsStringOperations # type: ignore +from ._operations import ValueTypesClientCollectionsIntOperations # type: ignore +from ._operations import ValueTypesClientCollectionsModelOperations # type: ignore +from ._operations import ValueTypesClientDictionaryStringOperations # type: ignore +from ._operations import ValueTypesClientNeverOperations # type: ignore +from ._operations import ValueTypesClientUnknownStringOperations # type: ignore +from ._operations import ValueTypesClientUnknownIntOperations # type: ignore +from ._operations import ValueTypesClientUnknownDictOperations # type: ignore +from ._operations import ValueTypesClientUnknownArrayOperations # type: ignore +from ._operations import ValueTypesClientStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientBooleanLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionEnumValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BooleanOperations", - "StringOperations", - "BytesOperations", - "IntOperations", - "FloatOperations", - "DecimalOperations", - "Decimal128Operations", - "DatetimeOperations", - "DurationOperations", - "EnumOperations", - "ExtensibleEnumOperations", - "ModelOperations", - "CollectionsStringOperations", - "CollectionsIntOperations", - "CollectionsModelOperations", - "DictionaryStringOperations", - "NeverOperations", - "UnknownStringOperations", - "UnknownIntOperations", - "UnknownDictOperations", - "UnknownArrayOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "UnionEnumValueOperations", + "ValueTypesClientBooleanOperations", + "ValueTypesClientStringOperations", + "ValueTypesClientBytesOperations", + "ValueTypesClientIntOperations", + "ValueTypesClientFloatOperations", + "ValueTypesClientDecimalOperations", + "ValueTypesClientDecimal128Operations", + "ValueTypesClientDatetimeOperations", + "ValueTypesClientDurationOperations", + "ValueTypesClientEnumOperations", + "ValueTypesClientExtensibleEnumOperations", + "ValueTypesClientModelOperations", + "ValueTypesClientCollectionsStringOperations", + "ValueTypesClientCollectionsIntOperations", + "ValueTypesClientCollectionsModelOperations", + "ValueTypesClientDictionaryStringOperations", + "ValueTypesClientNeverOperations", + "ValueTypesClientUnknownStringOperations", + "ValueTypesClientUnknownIntOperations", + "ValueTypesClientUnknownDictOperations", + "ValueTypesClientUnknownArrayOperations", + "ValueTypesClientStringLiteralOperations", + "ValueTypesClientIntLiteralOperations", + "ValueTypesClientFloatLiteralOperations", + "ValueTypesClientBooleanLiteralOperations", + "ValueTypesClientUnionStringLiteralOperations", + "ValueTypesClientUnionIntLiteralOperations", + "ValueTypesClientUnionFloatLiteralOperations", + "ValueTypesClientUnionEnumValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py index 72fb918080..a6d663e66c 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py @@ -31,64 +31,64 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_get_request, - build_boolean_literal_get_request, - build_boolean_literal_put_request, - build_boolean_put_request, - build_bytes_get_request, - build_bytes_put_request, - build_collections_int_get_request, - build_collections_int_put_request, - build_collections_model_get_request, - build_collections_model_put_request, - build_collections_string_get_request, - build_collections_string_put_request, - build_datetime_get_request, - build_datetime_put_request, - build_decimal128_get_request, - build_decimal128_put_request, - build_decimal_get_request, - build_decimal_put_request, - build_dictionary_string_get_request, - build_dictionary_string_put_request, - build_duration_get_request, - build_duration_put_request, - build_enum_get_request, - build_enum_put_request, - build_extensible_enum_get_request, - build_extensible_enum_put_request, - build_float_get_request, - build_float_literal_get_request, - build_float_literal_put_request, - build_float_put_request, - build_int_literal_get_request, - build_int_literal_put_request, - build_int_operations_get_request, - build_int_operations_put_request, - build_model_get_request, - build_model_put_request, - build_never_get_request, - build_never_put_request, - build_string_get_request, - build_string_literal_get_request, - build_string_literal_put_request, - build_string_put_request, - build_union_enum_value_get_request, - build_union_enum_value_put_request, - build_union_float_literal_get_request, - build_union_float_literal_put_request, - build_union_int_literal_get_request, - build_union_int_literal_put_request, - build_union_string_literal_get_request, - build_union_string_literal_put_request, - build_unknown_array_get_request, - build_unknown_array_put_request, - build_unknown_dict_get_request, - build_unknown_dict_put_request, - build_unknown_int_get_request, - build_unknown_int_put_request, - build_unknown_string_get_request, - build_unknown_string_put_request, + build_value_types_client_boolean_get_request, + build_value_types_client_boolean_literal_get_request, + build_value_types_client_boolean_literal_put_request, + build_value_types_client_boolean_put_request, + build_value_types_client_bytes_get_request, + build_value_types_client_bytes_put_request, + build_value_types_client_collections_int_get_request, + build_value_types_client_collections_int_put_request, + build_value_types_client_collections_model_get_request, + build_value_types_client_collections_model_put_request, + build_value_types_client_collections_string_get_request, + build_value_types_client_collections_string_put_request, + build_value_types_client_datetime_get_request, + build_value_types_client_datetime_put_request, + build_value_types_client_decimal128_get_request, + build_value_types_client_decimal128_put_request, + build_value_types_client_decimal_get_request, + build_value_types_client_decimal_put_request, + build_value_types_client_dictionary_string_get_request, + build_value_types_client_dictionary_string_put_request, + build_value_types_client_duration_get_request, + build_value_types_client_duration_put_request, + build_value_types_client_enum_get_request, + build_value_types_client_enum_put_request, + build_value_types_client_extensible_enum_get_request, + build_value_types_client_extensible_enum_put_request, + build_value_types_client_float_get_request, + build_value_types_client_float_literal_get_request, + build_value_types_client_float_literal_put_request, + build_value_types_client_float_put_request, + build_value_types_client_int_get_request, + build_value_types_client_int_literal_get_request, + build_value_types_client_int_literal_put_request, + build_value_types_client_int_put_request, + build_value_types_client_model_get_request, + build_value_types_client_model_put_request, + build_value_types_client_never_get_request, + build_value_types_client_never_put_request, + build_value_types_client_string_get_request, + build_value_types_client_string_literal_get_request, + build_value_types_client_string_literal_put_request, + build_value_types_client_string_put_request, + build_value_types_client_union_enum_value_get_request, + build_value_types_client_union_enum_value_put_request, + build_value_types_client_union_float_literal_get_request, + build_value_types_client_union_float_literal_put_request, + build_value_types_client_union_int_literal_get_request, + build_value_types_client_union_int_literal_put_request, + build_value_types_client_union_string_literal_get_request, + build_value_types_client_union_string_literal_put_request, + build_value_types_client_unknown_array_get_request, + build_value_types_client_unknown_array_put_request, + build_value_types_client_unknown_dict_get_request, + build_value_types_client_unknown_dict_put_request, + build_value_types_client_unknown_int_get_request, + build_value_types_client_unknown_int_put_request, + build_value_types_client_unknown_string_get_request, + build_value_types_client_unknown_string_put_request, ) from .._configuration import ValueTypesClientConfiguration @@ -97,14 +97,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BooleanOperations: +class ValueTypesClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`boolean` attribute. + :attr:`value_types_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -135,7 +135,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: cls: ClsType[_models.BooleanProperty] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_value_types_client_boolean_get_request( headers=_headers, params=_params, ) @@ -245,7 +245,7 @@ async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_value_types_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -271,14 +271,14 @@ async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class StringOperations: +class ValueTypesClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`string` attribute. + :attr:`value_types_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -309,7 +309,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_value_types_client_string_get_request( headers=_headers, params=_params, ) @@ -417,7 +417,7 @@ async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_value_types_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -443,14 +443,14 @@ async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwar return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class ValueTypesClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`bytes` attribute. + :attr:`value_types_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -481,7 +481,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_request( + _request = build_value_types_client_bytes_get_request( headers=_headers, params=_params, ) @@ -589,7 +589,7 @@ async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_request( + _request = build_value_types_client_bytes_put_request( content_type=content_type, content=_content, headers=_headers, @@ -615,14 +615,14 @@ async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class IntOperations: +class ValueTypesClientIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`int_operations` attribute. + :attr:`value_types_client_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -653,7 +653,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: cls: ClsType[_models.IntProperty] = kwargs.pop("cls", None) - _request = build_int_operations_get_request( + _request = build_value_types_client_int_get_request( headers=_headers, params=_params, ) @@ -761,7 +761,7 @@ async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_operations_put_request( + _request = build_value_types_client_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -787,14 +787,14 @@ async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: return cls(pipeline_response, None, {}) # type: ignore -class FloatOperations: +class ValueTypesClientFloatOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`float` attribute. + :attr:`value_types_client_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -825,7 +825,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: cls: ClsType[_models.FloatProperty] = kwargs.pop("cls", None) - _request = build_float_get_request( + _request = build_value_types_client_float_get_request( headers=_headers, params=_params, ) @@ -933,7 +933,7 @@ async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_put_request( + _request = build_value_types_client_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -959,14 +959,14 @@ async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class DecimalOperations: +class ValueTypesClientDecimalOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`decimal` attribute. + :attr:`value_types_client_decimal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -997,7 +997,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: cls: ClsType[_models.DecimalProperty] = kwargs.pop("cls", None) - _request = build_decimal_get_request( + _request = build_value_types_client_decimal_get_request( headers=_headers, params=_params, ) @@ -1107,7 +1107,7 @@ async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_put_request( + _request = build_value_types_client_decimal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1133,14 +1133,14 @@ async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class Decimal128Operations: +class ValueTypesClientDecimal128Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`decimal128` attribute. + :attr:`value_types_client_decimal128` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1171,7 +1171,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: cls: ClsType[_models.Decimal128Property] = kwargs.pop("cls", None) - _request = build_decimal128_get_request( + _request = build_value_types_client_decimal128_get_request( headers=_headers, params=_params, ) @@ -1281,7 +1281,7 @@ async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_put_request( + _request = build_value_types_client_decimal128_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1307,14 +1307,14 @@ async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class ValueTypesClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`datetime` attribute. + :attr:`value_types_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1345,7 +1345,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_request( + _request = build_value_types_client_datetime_get_request( headers=_headers, params=_params, ) @@ -1455,7 +1455,7 @@ async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_request( + _request = build_value_types_client_datetime_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1481,14 +1481,14 @@ async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kw return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class ValueTypesClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`duration` attribute. + :attr:`value_types_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1519,7 +1519,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_request( + _request = build_value_types_client_duration_get_request( headers=_headers, params=_params, ) @@ -1629,7 +1629,7 @@ async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_request( + _request = build_value_types_client_duration_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1655,14 +1655,14 @@ async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kw return cls(pipeline_response, None, {}) # type: ignore -class EnumOperations: +class ValueTypesClientEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`enum` attribute. + :attr:`value_types_client_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1693,7 +1693,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: cls: ClsType[_models.EnumProperty] = kwargs.pop("cls", None) - _request = build_enum_get_request( + _request = build_value_types_client_enum_get_request( headers=_headers, params=_params, ) @@ -1801,7 +1801,7 @@ async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enum_put_request( + _request = build_value_types_client_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1827,14 +1827,14 @@ async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs return cls(pipeline_response, None, {}) # type: ignore -class ExtensibleEnumOperations: +class ValueTypesClientExtensibleEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`extensible_enum` attribute. + :attr:`value_types_client_extensible_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1865,7 +1865,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: cls: ClsType[_models.ExtensibleEnumProperty] = kwargs.pop("cls", None) - _request = build_extensible_enum_get_request( + _request = build_value_types_client_extensible_enum_get_request( headers=_headers, params=_params, ) @@ -1976,7 +1976,7 @@ async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensible_enum_put_request( + _request = build_value_types_client_extensible_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2002,14 +2002,14 @@ async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class ModelOperations: +class ValueTypesClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`model` attribute. + :attr:`value_types_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2040,7 +2040,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: cls: ClsType[_models.ModelProperty] = kwargs.pop("cls", None) - _request = build_model_get_request( + _request = build_value_types_client_model_get_request( headers=_headers, params=_params, ) @@ -2148,7 +2148,7 @@ async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_put_request( + _request = build_value_types_client_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2174,14 +2174,14 @@ async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class ValueTypesClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_string` attribute. + :attr:`value_types_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2213,7 +2213,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_request( + _request = build_value_types_client_collections_string_get_request( headers=_headers, params=_params, ) @@ -2324,7 +2324,7 @@ async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_put_request( + _request = build_value_types_client_collections_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2350,14 +2350,14 @@ async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class CollectionsIntOperations: +class ValueTypesClientCollectionsIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_int` attribute. + :attr:`value_types_client_collections_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2388,7 +2388,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: cls: ClsType[_models.CollectionsIntProperty] = kwargs.pop("cls", None) - _request = build_collections_int_get_request( + _request = build_value_types_client_collections_int_get_request( headers=_headers, params=_params, ) @@ -2499,7 +2499,7 @@ async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_int_put_request( + _request = build_value_types_client_collections_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2525,14 +2525,14 @@ async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class ValueTypesClientCollectionsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_model` attribute. + :attr:`value_types_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2564,7 +2564,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_request( + _request = build_value_types_client_collections_model_get_request( headers=_headers, params=_params, ) @@ -2675,7 +2675,7 @@ async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_request( + _request = build_value_types_client_collections_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2701,14 +2701,14 @@ async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class DictionaryStringOperations: +class ValueTypesClientDictionaryStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`dictionary_string` attribute. + :attr:`value_types_client_dictionary_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2740,7 +2740,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: cls: ClsType[_models.DictionaryStringProperty] = kwargs.pop("cls", None) - _request = build_dictionary_string_get_request( + _request = build_value_types_client_dictionary_string_get_request( headers=_headers, params=_params, ) @@ -2851,7 +2851,7 @@ async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dictionary_string_put_request( + _request = build_value_types_client_dictionary_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2877,14 +2877,14 @@ async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class NeverOperations: +class ValueTypesClientNeverOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`never` attribute. + :attr:`value_types_client_never` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2915,7 +2915,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: cls: ClsType[_models.NeverProperty] = kwargs.pop("cls", None) - _request = build_never_get_request( + _request = build_value_types_client_never_get_request( headers=_headers, params=_params, ) @@ -3023,7 +3023,7 @@ async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_never_put_request( + _request = build_value_types_client_never_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3049,14 +3049,14 @@ async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class UnknownStringOperations: +class ValueTypesClientUnknownStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_string` attribute. + :attr:`value_types_client_unknown_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3087,7 +3087,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: cls: ClsType[_models.UnknownStringProperty] = kwargs.pop("cls", None) - _request = build_unknown_string_get_request( + _request = build_value_types_client_unknown_string_get_request( headers=_headers, params=_params, ) @@ -3198,7 +3198,7 @@ async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_string_put_request( + _request = build_value_types_client_unknown_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3224,14 +3224,14 @@ async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class UnknownIntOperations: +class ValueTypesClientUnknownIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_int` attribute. + :attr:`value_types_client_unknown_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3262,7 +3262,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: cls: ClsType[_models.UnknownIntProperty] = kwargs.pop("cls", None) - _request = build_unknown_int_get_request( + _request = build_value_types_client_unknown_int_get_request( headers=_headers, params=_params, ) @@ -3372,7 +3372,7 @@ async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_int_put_request( + _request = build_value_types_client_unknown_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3398,14 +3398,14 @@ async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class UnknownDictOperations: +class ValueTypesClientUnknownDictOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_dict` attribute. + :attr:`value_types_client_unknown_dict` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3436,7 +3436,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: cls: ClsType[_models.UnknownDictProperty] = kwargs.pop("cls", None) - _request = build_unknown_dict_get_request( + _request = build_value_types_client_unknown_dict_get_request( headers=_headers, params=_params, ) @@ -3547,7 +3547,7 @@ async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_dict_put_request( + _request = build_value_types_client_unknown_dict_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3573,14 +3573,14 @@ async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], * return cls(pipeline_response, None, {}) # type: ignore -class UnknownArrayOperations: +class ValueTypesClientUnknownArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_array` attribute. + :attr:`value_types_client_unknown_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3611,7 +3611,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: cls: ClsType[_models.UnknownArrayProperty] = kwargs.pop("cls", None) - _request = build_unknown_array_get_request( + _request = build_value_types_client_unknown_array_get_request( headers=_headers, params=_params, ) @@ -3722,7 +3722,7 @@ async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_array_put_request( + _request = build_value_types_client_unknown_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3748,14 +3748,14 @@ async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class ValueTypesClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`string_literal` attribute. + :attr:`value_types_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3786,7 +3786,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_request( + _request = build_value_types_client_string_literal_get_request( headers=_headers, params=_params, ) @@ -3897,7 +3897,7 @@ async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_request( + _request = build_value_types_client_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3923,14 +3923,14 @@ async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class ValueTypesClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`int_literal` attribute. + :attr:`value_types_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3961,7 +3961,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_request( + _request = build_value_types_client_int_literal_get_request( headers=_headers, params=_params, ) @@ -4071,7 +4071,7 @@ async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_request( + _request = build_value_types_client_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4097,14 +4097,14 @@ async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class ValueTypesClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`float_literal` attribute. + :attr:`value_types_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4135,7 +4135,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_request( + _request = build_value_types_client_float_literal_get_request( headers=_headers, params=_params, ) @@ -4246,7 +4246,7 @@ async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_request( + _request = build_value_types_client_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4272,14 +4272,14 @@ async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class ValueTypesClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`boolean_literal` attribute. + :attr:`value_types_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4310,7 +4310,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_request( + _request = build_value_types_client_boolean_literal_get_request( headers=_headers, params=_params, ) @@ -4421,7 +4421,7 @@ async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_request( + _request = build_value_types_client_boolean_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4447,14 +4447,14 @@ async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class ValueTypesClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_string_literal` attribute. + :attr:`value_types_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4486,7 +4486,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_request( + _request = build_value_types_client_union_string_literal_get_request( headers=_headers, params=_params, ) @@ -4598,7 +4598,7 @@ async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_request( + _request = build_value_types_client_union_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4624,14 +4624,14 @@ async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class ValueTypesClientUnionIntLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_int_literal` attribute. + :attr:`value_types_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4662,7 +4662,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_request( + _request = build_value_types_client_union_int_literal_get_request( headers=_headers, params=_params, ) @@ -4773,7 +4773,7 @@ async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_request( + _request = build_value_types_client_union_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4799,14 +4799,14 @@ async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class ValueTypesClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_float_literal` attribute. + :attr:`value_types_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4838,7 +4838,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_request( + _request = build_value_types_client_union_float_literal_get_request( headers=_headers, params=_params, ) @@ -4949,7 +4949,7 @@ async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_request( + _request = build_value_types_client_union_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4975,14 +4975,14 @@ async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumValueOperations: +class ValueTypesClientUnionEnumValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_enum_value` attribute. + :attr:`value_types_client_union_enum_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5013,7 +5013,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: cls: ClsType[_models.UnionEnumValueProperty] = kwargs.pop("cls", None) - _request = build_union_enum_value_get_request( + _request = build_value_types_client_union_enum_value_get_request( headers=_headers, params=_params, ) @@ -5124,7 +5124,7 @@ async def put(self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_value_put_request( + _request = build_value_types_client_union_enum_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py index 314aeada20..de46ea2d72 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py @@ -12,70 +12,70 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BooleanOperations # type: ignore -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import IntOperations # type: ignore -from ._operations import FloatOperations # type: ignore -from ._operations import DecimalOperations # type: ignore -from ._operations import Decimal128Operations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import EnumOperations # type: ignore -from ._operations import ExtensibleEnumOperations # type: ignore -from ._operations import ModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore -from ._operations import CollectionsIntOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import DictionaryStringOperations # type: ignore -from ._operations import NeverOperations # type: ignore -from ._operations import UnknownStringOperations # type: ignore -from ._operations import UnknownIntOperations # type: ignore -from ._operations import UnknownDictOperations # type: ignore -from ._operations import UnknownArrayOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import UnionEnumValueOperations # type: ignore +from ._operations import ValueTypesClientBooleanOperations # type: ignore +from ._operations import ValueTypesClientStringOperations # type: ignore +from ._operations import ValueTypesClientBytesOperations # type: ignore +from ._operations import ValueTypesClientIntOperations # type: ignore +from ._operations import ValueTypesClientFloatOperations # type: ignore +from ._operations import ValueTypesClientDecimalOperations # type: ignore +from ._operations import ValueTypesClientDecimal128Operations # type: ignore +from ._operations import ValueTypesClientDatetimeOperations # type: ignore +from ._operations import ValueTypesClientDurationOperations # type: ignore +from ._operations import ValueTypesClientEnumOperations # type: ignore +from ._operations import ValueTypesClientExtensibleEnumOperations # type: ignore +from ._operations import ValueTypesClientModelOperations # type: ignore +from ._operations import ValueTypesClientCollectionsStringOperations # type: ignore +from ._operations import ValueTypesClientCollectionsIntOperations # type: ignore +from ._operations import ValueTypesClientCollectionsModelOperations # type: ignore +from ._operations import ValueTypesClientDictionaryStringOperations # type: ignore +from ._operations import ValueTypesClientNeverOperations # type: ignore +from ._operations import ValueTypesClientUnknownStringOperations # type: ignore +from ._operations import ValueTypesClientUnknownIntOperations # type: ignore +from ._operations import ValueTypesClientUnknownDictOperations # type: ignore +from ._operations import ValueTypesClientUnknownArrayOperations # type: ignore +from ._operations import ValueTypesClientStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientBooleanLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionEnumValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BooleanOperations", - "StringOperations", - "BytesOperations", - "IntOperations", - "FloatOperations", - "DecimalOperations", - "Decimal128Operations", - "DatetimeOperations", - "DurationOperations", - "EnumOperations", - "ExtensibleEnumOperations", - "ModelOperations", - "CollectionsStringOperations", - "CollectionsIntOperations", - "CollectionsModelOperations", - "DictionaryStringOperations", - "NeverOperations", - "UnknownStringOperations", - "UnknownIntOperations", - "UnknownDictOperations", - "UnknownArrayOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "UnionEnumValueOperations", + "ValueTypesClientBooleanOperations", + "ValueTypesClientStringOperations", + "ValueTypesClientBytesOperations", + "ValueTypesClientIntOperations", + "ValueTypesClientFloatOperations", + "ValueTypesClientDecimalOperations", + "ValueTypesClientDecimal128Operations", + "ValueTypesClientDatetimeOperations", + "ValueTypesClientDurationOperations", + "ValueTypesClientEnumOperations", + "ValueTypesClientExtensibleEnumOperations", + "ValueTypesClientModelOperations", + "ValueTypesClientCollectionsStringOperations", + "ValueTypesClientCollectionsIntOperations", + "ValueTypesClientCollectionsModelOperations", + "ValueTypesClientDictionaryStringOperations", + "ValueTypesClientNeverOperations", + "ValueTypesClientUnknownStringOperations", + "ValueTypesClientUnknownIntOperations", + "ValueTypesClientUnknownDictOperations", + "ValueTypesClientUnknownArrayOperations", + "ValueTypesClientStringLiteralOperations", + "ValueTypesClientIntLiteralOperations", + "ValueTypesClientFloatLiteralOperations", + "ValueTypesClientBooleanLiteralOperations", + "ValueTypesClientUnionStringLiteralOperations", + "ValueTypesClientUnionIntLiteralOperations", + "ValueTypesClientUnionFloatLiteralOperations", + "ValueTypesClientUnionEnumValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py index 0dc56ad81d..e3b054bdce 100644 --- a/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py @@ -40,7 +40,7 @@ _SERIALIZER.client_side_validation = False -def build_boolean_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -54,7 +54,7 @@ def build_boolean_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -68,7 +68,7 @@ def build_boolean_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -82,7 +82,7 @@ def build_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -96,7 +96,7 @@ def build_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_bytes_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -110,7 +110,7 @@ def build_bytes_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_bytes_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -124,7 +124,7 @@ def build_bytes_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_operations_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -138,7 +138,7 @@ def build_int_operations_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_operations_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +152,7 @@ def build_int_operations_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -166,7 +166,7 @@ def build_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -180,7 +180,7 @@ def build_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -194,7 +194,7 @@ def build_decimal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -208,7 +208,7 @@ def build_decimal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal128_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal128_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -222,7 +222,7 @@ def build_decimal128_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal128_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -236,7 +236,7 @@ def build_decimal128_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_datetime_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -250,7 +250,7 @@ def build_datetime_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_datetime_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -264,7 +264,7 @@ def build_datetime_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_duration_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -278,7 +278,7 @@ def build_duration_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_duration_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -292,7 +292,7 @@ def build_duration_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_enum_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_enum_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -306,7 +306,7 @@ def build_enum_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_enum_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_enum_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -320,7 +320,7 @@ def build_enum_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -334,7 +334,7 @@ def build_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -348,7 +348,7 @@ def build_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_model_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -362,7 +362,7 @@ def build_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_model_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -376,7 +376,9 @@ def build_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -390,7 +392,9 @@ def build_collections_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -404,7 +408,7 @@ def build_collections_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_int_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_int_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -418,7 +422,7 @@ def build_collections_int_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_int_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_int_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -432,7 +436,9 @@ def build_collections_int_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -446,7 +452,9 @@ def build_collections_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -460,7 +468,9 @@ def build_collections_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_dictionary_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_dictionary_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -474,7 +484,9 @@ def build_dictionary_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_dictionary_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_dictionary_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -488,7 +500,7 @@ def build_dictionary_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_never_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_never_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -502,7 +514,7 @@ def build_never_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_never_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_never_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -516,7 +528,7 @@ def build_never_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -530,7 +542,7 @@ def build_unknown_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -544,7 +556,7 @@ def build_unknown_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_int_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_int_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -558,7 +570,7 @@ def build_unknown_int_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_int_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_int_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -572,7 +584,7 @@ def build_unknown_int_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -586,7 +598,7 @@ def build_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -600,7 +612,7 @@ def build_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_array_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -614,7 +626,7 @@ def build_unknown_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_array_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_array_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -628,7 +640,7 @@ def build_unknown_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -642,7 +654,7 @@ def build_string_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -656,7 +668,7 @@ def build_string_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -670,7 +682,7 @@ def build_int_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -684,7 +696,7 @@ def build_int_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -698,7 +710,7 @@ def build_float_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -712,7 +724,7 @@ def build_float_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -726,7 +738,7 @@ def build_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -740,7 +752,9 @@ def build_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_string_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -754,7 +768,9 @@ def build_union_string_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_string_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -768,7 +784,9 @@ def build_union_string_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_int_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -782,7 +800,9 @@ def build_union_int_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_int_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -796,7 +816,9 @@ def build_union_int_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_float_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -810,7 +832,9 @@ def build_union_float_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_float_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -824,7 +848,9 @@ def build_union_float_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_enum_value_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_enum_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -838,7 +864,9 @@ def build_union_enum_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_enum_value_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_enum_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -852,14 +880,14 @@ def build_union_enum_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class BooleanOperations: +class ValueTypesClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`boolean` attribute. + :attr:`value_types_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -890,7 +918,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: cls: ClsType[_models.BooleanProperty] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_value_types_client_boolean_get_request( headers=_headers, params=_params, ) @@ -1000,7 +1028,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_value_types_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1026,14 +1054,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringOperations: +class ValueTypesClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`string` attribute. + :attr:`value_types_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1064,7 +1092,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_value_types_client_string_get_request( headers=_headers, params=_params, ) @@ -1174,7 +1202,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_value_types_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1200,14 +1228,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class ValueTypesClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`bytes` attribute. + :attr:`value_types_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1238,7 +1266,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_request( + _request = build_value_types_client_bytes_get_request( headers=_headers, params=_params, ) @@ -1348,7 +1376,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_request( + _request = build_value_types_client_bytes_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1374,14 +1402,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntOperations: +class ValueTypesClientIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`int_operations` attribute. + :attr:`value_types_client_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1412,7 +1440,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: cls: ClsType[_models.IntProperty] = kwargs.pop("cls", None) - _request = build_int_operations_get_request( + _request = build_value_types_client_int_get_request( headers=_headers, params=_params, ) @@ -1522,7 +1550,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_operations_put_request( + _request = build_value_types_client_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1548,14 +1576,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatOperations: +class ValueTypesClientFloatOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`float` attribute. + :attr:`value_types_client_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1586,7 +1614,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: cls: ClsType[_models.FloatProperty] = kwargs.pop("cls", None) - _request = build_float_get_request( + _request = build_value_types_client_float_get_request( headers=_headers, params=_params, ) @@ -1696,7 +1724,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_put_request( + _request = build_value_types_client_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1722,14 +1750,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DecimalOperations: +class ValueTypesClientDecimalOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`decimal` attribute. + :attr:`value_types_client_decimal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1760,7 +1788,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: cls: ClsType[_models.DecimalProperty] = kwargs.pop("cls", None) - _request = build_decimal_get_request( + _request = build_value_types_client_decimal_get_request( headers=_headers, params=_params, ) @@ -1870,7 +1898,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_put_request( + _request = build_value_types_client_decimal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1896,14 +1924,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Decimal128Operations: +class ValueTypesClientDecimal128Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`decimal128` attribute. + :attr:`value_types_client_decimal128` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1934,7 +1962,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: cls: ClsType[_models.Decimal128Property] = kwargs.pop("cls", None) - _request = build_decimal128_get_request( + _request = build_value_types_client_decimal128_get_request( headers=_headers, params=_params, ) @@ -2044,7 +2072,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_put_request( + _request = build_value_types_client_decimal128_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2070,14 +2098,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class ValueTypesClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`datetime` attribute. + :attr:`value_types_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2108,7 +2136,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_request( + _request = build_value_types_client_datetime_get_request( headers=_headers, params=_params, ) @@ -2218,7 +2246,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_request( + _request = build_value_types_client_datetime_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2244,14 +2272,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class ValueTypesClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`duration` attribute. + :attr:`value_types_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2282,7 +2310,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_request( + _request = build_value_types_client_duration_get_request( headers=_headers, params=_params, ) @@ -2392,7 +2420,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_request( + _request = build_value_types_client_duration_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2418,14 +2446,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class EnumOperations: +class ValueTypesClientEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`enum` attribute. + :attr:`value_types_client_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2456,7 +2484,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: cls: ClsType[_models.EnumProperty] = kwargs.pop("cls", None) - _request = build_enum_get_request( + _request = build_value_types_client_enum_get_request( headers=_headers, params=_params, ) @@ -2566,7 +2594,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enum_put_request( + _request = build_value_types_client_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2592,14 +2620,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtensibleEnumOperations: +class ValueTypesClientExtensibleEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`extensible_enum` attribute. + :attr:`value_types_client_extensible_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2630,7 +2658,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: cls: ClsType[_models.ExtensibleEnumProperty] = kwargs.pop("cls", None) - _request = build_extensible_enum_get_request( + _request = build_value_types_client_extensible_enum_get_request( headers=_headers, params=_params, ) @@ -2743,7 +2771,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensible_enum_put_request( + _request = build_value_types_client_extensible_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2769,14 +2797,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelOperations: +class ValueTypesClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`model` attribute. + :attr:`value_types_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2807,7 +2835,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: cls: ClsType[_models.ModelProperty] = kwargs.pop("cls", None) - _request = build_model_get_request( + _request = build_value_types_client_model_get_request( headers=_headers, params=_params, ) @@ -2917,7 +2945,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_put_request( + _request = build_value_types_client_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2943,14 +2971,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class ValueTypesClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_string` attribute. + :attr:`value_types_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2982,7 +3010,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_request( + _request = build_value_types_client_collections_string_get_request( headers=_headers, params=_params, ) @@ -3095,7 +3123,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_put_request( + _request = build_value_types_client_collections_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3121,14 +3149,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsIntOperations: +class ValueTypesClientCollectionsIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_int` attribute. + :attr:`value_types_client_collections_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3159,7 +3187,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: cls: ClsType[_models.CollectionsIntProperty] = kwargs.pop("cls", None) - _request = build_collections_int_get_request( + _request = build_value_types_client_collections_int_get_request( headers=_headers, params=_params, ) @@ -3272,7 +3300,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_int_put_request( + _request = build_value_types_client_collections_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3298,14 +3326,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class ValueTypesClientCollectionsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_model` attribute. + :attr:`value_types_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3337,7 +3365,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_request( + _request = build_value_types_client_collections_model_get_request( headers=_headers, params=_params, ) @@ -3450,7 +3478,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_request( + _request = build_value_types_client_collections_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3476,14 +3504,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DictionaryStringOperations: +class ValueTypesClientDictionaryStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`dictionary_string` attribute. + :attr:`value_types_client_dictionary_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3515,7 +3543,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: cls: ClsType[_models.DictionaryStringProperty] = kwargs.pop("cls", None) - _request = build_dictionary_string_get_request( + _request = build_value_types_client_dictionary_string_get_request( headers=_headers, params=_params, ) @@ -3628,7 +3656,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dictionary_string_put_request( + _request = build_value_types_client_dictionary_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3654,14 +3682,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NeverOperations: +class ValueTypesClientNeverOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`never` attribute. + :attr:`value_types_client_never` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3692,7 +3720,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: cls: ClsType[_models.NeverProperty] = kwargs.pop("cls", None) - _request = build_never_get_request( + _request = build_value_types_client_never_get_request( headers=_headers, params=_params, ) @@ -3802,7 +3830,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_never_put_request( + _request = build_value_types_client_never_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3828,14 +3856,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownStringOperations: +class ValueTypesClientUnknownStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_string` attribute. + :attr:`value_types_client_unknown_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3866,7 +3894,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: cls: ClsType[_models.UnknownStringProperty] = kwargs.pop("cls", None) - _request = build_unknown_string_get_request( + _request = build_value_types_client_unknown_string_get_request( headers=_headers, params=_params, ) @@ -3979,7 +4007,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_string_put_request( + _request = build_value_types_client_unknown_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4005,14 +4033,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownIntOperations: +class ValueTypesClientUnknownIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_int` attribute. + :attr:`value_types_client_unknown_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4043,7 +4071,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: cls: ClsType[_models.UnknownIntProperty] = kwargs.pop("cls", None) - _request = build_unknown_int_get_request( + _request = build_value_types_client_unknown_int_get_request( headers=_headers, params=_params, ) @@ -4153,7 +4181,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_int_put_request( + _request = build_value_types_client_unknown_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4179,14 +4207,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownDictOperations: +class ValueTypesClientUnknownDictOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_dict` attribute. + :attr:`value_types_client_unknown_dict` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4217,7 +4245,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: cls: ClsType[_models.UnknownDictProperty] = kwargs.pop("cls", None) - _request = build_unknown_dict_get_request( + _request = build_value_types_client_unknown_dict_get_request( headers=_headers, params=_params, ) @@ -4328,7 +4356,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_dict_put_request( + _request = build_value_types_client_unknown_dict_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4354,14 +4382,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownArrayOperations: +class ValueTypesClientUnknownArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_array` attribute. + :attr:`value_types_client_unknown_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4392,7 +4420,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: cls: ClsType[_models.UnknownArrayProperty] = kwargs.pop("cls", None) - _request = build_unknown_array_get_request( + _request = build_value_types_client_unknown_array_get_request( headers=_headers, params=_params, ) @@ -4503,7 +4531,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_array_put_request( + _request = build_value_types_client_unknown_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4529,14 +4557,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class ValueTypesClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`string_literal` attribute. + :attr:`value_types_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4567,7 +4595,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_request( + _request = build_value_types_client_string_literal_get_request( headers=_headers, params=_params, ) @@ -4680,7 +4708,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_request( + _request = build_value_types_client_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4706,14 +4734,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class ValueTypesClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`int_literal` attribute. + :attr:`value_types_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4744,7 +4772,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_request( + _request = build_value_types_client_int_literal_get_request( headers=_headers, params=_params, ) @@ -4854,7 +4882,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_request( + _request = build_value_types_client_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4880,14 +4908,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class ValueTypesClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`float_literal` attribute. + :attr:`value_types_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4918,7 +4946,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_request( + _request = build_value_types_client_float_literal_get_request( headers=_headers, params=_params, ) @@ -5029,7 +5057,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_request( + _request = build_value_types_client_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5055,14 +5083,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class ValueTypesClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`boolean_literal` attribute. + :attr:`value_types_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5093,7 +5121,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_request( + _request = build_value_types_client_boolean_literal_get_request( headers=_headers, params=_params, ) @@ -5206,7 +5234,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_request( + _request = build_value_types_client_boolean_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5232,14 +5260,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class ValueTypesClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_string_literal` attribute. + :attr:`value_types_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5271,7 +5299,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_request( + _request = build_value_types_client_union_string_literal_get_request( headers=_headers, params=_params, ) @@ -5385,7 +5413,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_request( + _request = build_value_types_client_union_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5411,14 +5439,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class ValueTypesClientUnionIntLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_int_literal` attribute. + :attr:`value_types_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5449,7 +5477,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_request( + _request = build_value_types_client_union_int_literal_get_request( headers=_headers, params=_params, ) @@ -5562,7 +5590,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_request( + _request = build_value_types_client_union_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5588,14 +5616,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class ValueTypesClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_float_literal` attribute. + :attr:`value_types_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5627,7 +5655,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_request( + _request = build_value_types_client_union_float_literal_get_request( headers=_headers, params=_params, ) @@ -5740,7 +5768,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_request( + _request = build_value_types_client_union_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5766,14 +5794,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumValueOperations: +class ValueTypesClientUnionEnumValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_enum_value` attribute. + :attr:`value_types_client_union_enum_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5804,7 +5832,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: cls: ClsType[_models.UnionEnumValueProperty] = kwargs.pop("cls", None) - _request = build_union_enum_value_get_request( + _request = build_value_types_client_union_enum_value_get_request( headers=_headers, params=_params, ) @@ -5917,7 +5945,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_value_put_request( + _request = build_value_types_client_union_enum_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-scalar/apiview-properties.json index aab6c2e96b..970373d18e 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/apiview-properties.json @@ -1,37 +1,37 @@ { "CrossLanguagePackageId": "Type.Scalar", "CrossLanguageDefinitionId": { - "typetest.scalar.operations.StringOperations.get": "Type.Scalar.String.get", - "typetest.scalar.aio.operations.StringOperations.get": "Type.Scalar.String.get", - "typetest.scalar.operations.StringOperations.put": "Type.Scalar.String.put", - "typetest.scalar.aio.operations.StringOperations.put": "Type.Scalar.String.put", - "typetest.scalar.operations.BooleanOperations.get": "Type.Scalar.Boolean.get", - "typetest.scalar.aio.operations.BooleanOperations.get": "Type.Scalar.Boolean.get", - "typetest.scalar.operations.BooleanOperations.put": "Type.Scalar.Boolean.put", - "typetest.scalar.aio.operations.BooleanOperations.put": "Type.Scalar.Boolean.put", - "typetest.scalar.operations.UnknownOperations.get": "Type.Scalar.Unknown.get", - "typetest.scalar.aio.operations.UnknownOperations.get": "Type.Scalar.Unknown.get", - "typetest.scalar.operations.UnknownOperations.put": "Type.Scalar.Unknown.put", - "typetest.scalar.aio.operations.UnknownOperations.put": "Type.Scalar.Unknown.put", - "typetest.scalar.operations.DecimalTypeOperations.response_body": "Type.Scalar.DecimalType.responseBody", - "typetest.scalar.aio.operations.DecimalTypeOperations.response_body": "Type.Scalar.DecimalType.responseBody", - "typetest.scalar.operations.DecimalTypeOperations.request_body": "Type.Scalar.DecimalType.requestBody", - "typetest.scalar.aio.operations.DecimalTypeOperations.request_body": "Type.Scalar.DecimalType.requestBody", - "typetest.scalar.operations.DecimalTypeOperations.request_parameter": "Type.Scalar.DecimalType.requestParameter", - "typetest.scalar.aio.operations.DecimalTypeOperations.request_parameter": "Type.Scalar.DecimalType.requestParameter", - "typetest.scalar.operations.Decimal128TypeOperations.response_body": "Type.Scalar.Decimal128Type.responseBody", - "typetest.scalar.aio.operations.Decimal128TypeOperations.response_body": "Type.Scalar.Decimal128Type.responseBody", - "typetest.scalar.operations.Decimal128TypeOperations.request_body": "Type.Scalar.Decimal128Type.requestBody", - "typetest.scalar.aio.operations.Decimal128TypeOperations.request_body": "Type.Scalar.Decimal128Type.requestBody", - "typetest.scalar.operations.Decimal128TypeOperations.request_parameter": "Type.Scalar.Decimal128Type.requestParameter", - "typetest.scalar.aio.operations.Decimal128TypeOperations.request_parameter": "Type.Scalar.Decimal128Type.requestParameter", - "typetest.scalar.operations.DecimalVerifyOperations.prepare_verify": "Type.Scalar.DecimalVerify.prepareVerify", - "typetest.scalar.aio.operations.DecimalVerifyOperations.prepare_verify": "Type.Scalar.DecimalVerify.prepareVerify", - "typetest.scalar.operations.DecimalVerifyOperations.verify": "Type.Scalar.DecimalVerify.verify", - "typetest.scalar.aio.operations.DecimalVerifyOperations.verify": "Type.Scalar.DecimalVerify.verify", - "typetest.scalar.operations.Decimal128VerifyOperations.prepare_verify": "Type.Scalar.Decimal128Verify.prepareVerify", - "typetest.scalar.aio.operations.Decimal128VerifyOperations.prepare_verify": "Type.Scalar.Decimal128Verify.prepareVerify", - "typetest.scalar.operations.Decimal128VerifyOperations.verify": "Type.Scalar.Decimal128Verify.verify", - "typetest.scalar.aio.operations.Decimal128VerifyOperations.verify": "Type.Scalar.Decimal128Verify.verify" + "typetest.scalar.operations.ScalarClientStringOperations.get": "Type.Scalar.String.get", + "typetest.scalar.aio.operations.ScalarClientStringOperations.get": "Type.Scalar.String.get", + "typetest.scalar.operations.ScalarClientStringOperations.put": "Type.Scalar.String.put", + "typetest.scalar.aio.operations.ScalarClientStringOperations.put": "Type.Scalar.String.put", + "typetest.scalar.operations.ScalarClientBooleanOperations.get": "Type.Scalar.Boolean.get", + "typetest.scalar.aio.operations.ScalarClientBooleanOperations.get": "Type.Scalar.Boolean.get", + "typetest.scalar.operations.ScalarClientBooleanOperations.put": "Type.Scalar.Boolean.put", + "typetest.scalar.aio.operations.ScalarClientBooleanOperations.put": "Type.Scalar.Boolean.put", + "typetest.scalar.operations.ScalarClientUnknownOperations.get": "Type.Scalar.Unknown.get", + "typetest.scalar.aio.operations.ScalarClientUnknownOperations.get": "Type.Scalar.Unknown.get", + "typetest.scalar.operations.ScalarClientUnknownOperations.put": "Type.Scalar.Unknown.put", + "typetest.scalar.aio.operations.ScalarClientUnknownOperations.put": "Type.Scalar.Unknown.put", + "typetest.scalar.operations.ScalarClientDecimalTypeOperations.response_body": "Type.Scalar.DecimalType.responseBody", + "typetest.scalar.aio.operations.ScalarClientDecimalTypeOperations.response_body": "Type.Scalar.DecimalType.responseBody", + "typetest.scalar.operations.ScalarClientDecimalTypeOperations.request_body": "Type.Scalar.DecimalType.requestBody", + "typetest.scalar.aio.operations.ScalarClientDecimalTypeOperations.request_body": "Type.Scalar.DecimalType.requestBody", + "typetest.scalar.operations.ScalarClientDecimalTypeOperations.request_parameter": "Type.Scalar.DecimalType.requestParameter", + "typetest.scalar.aio.operations.ScalarClientDecimalTypeOperations.request_parameter": "Type.Scalar.DecimalType.requestParameter", + "typetest.scalar.operations.ScalarClientDecimal128TypeOperations.response_body": "Type.Scalar.Decimal128Type.responseBody", + "typetest.scalar.aio.operations.ScalarClientDecimal128TypeOperations.response_body": "Type.Scalar.Decimal128Type.responseBody", + "typetest.scalar.operations.ScalarClientDecimal128TypeOperations.request_body": "Type.Scalar.Decimal128Type.requestBody", + "typetest.scalar.aio.operations.ScalarClientDecimal128TypeOperations.request_body": "Type.Scalar.Decimal128Type.requestBody", + "typetest.scalar.operations.ScalarClientDecimal128TypeOperations.request_parameter": "Type.Scalar.Decimal128Type.requestParameter", + "typetest.scalar.aio.operations.ScalarClientDecimal128TypeOperations.request_parameter": "Type.Scalar.Decimal128Type.requestParameter", + "typetest.scalar.operations.ScalarClientDecimalVerifyOperations.prepare_verify": "Type.Scalar.DecimalVerify.prepareVerify", + "typetest.scalar.aio.operations.ScalarClientDecimalVerifyOperations.prepare_verify": "Type.Scalar.DecimalVerify.prepareVerify", + "typetest.scalar.operations.ScalarClientDecimalVerifyOperations.verify": "Type.Scalar.DecimalVerify.verify", + "typetest.scalar.aio.operations.ScalarClientDecimalVerifyOperations.verify": "Type.Scalar.DecimalVerify.verify", + "typetest.scalar.operations.ScalarClientDecimal128VerifyOperations.prepare_verify": "Type.Scalar.Decimal128Verify.prepareVerify", + "typetest.scalar.aio.operations.ScalarClientDecimal128VerifyOperations.prepare_verify": "Type.Scalar.Decimal128Verify.prepareVerify", + "typetest.scalar.operations.ScalarClientDecimal128VerifyOperations.verify": "Type.Scalar.Decimal128Verify.verify", + "typetest.scalar.aio.operations.ScalarClientDecimal128VerifyOperations.verify": "Type.Scalar.Decimal128Verify.verify" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations.py new file mode 100644 index 0000000000..159e4a18b8 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientBooleanOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_boolean_get(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_boolean.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_boolean_put(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_boolean.put( + body=bool, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations_async.py new file mode 100644 index 0000000000..67c10b2fc4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_boolean_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientBooleanOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_boolean_get(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_boolean.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_boolean_put(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_boolean.put( + body=bool, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations.py new file mode 100644 index 0000000000..7bc22b69ca --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimal128TypeOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal128_type_response_body(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal128_type.response_body() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal128_type_request_body(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal128_type.request_body( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal128_type_request_parameter(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal128_type.request_parameter( + value=0.0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations_async.py new file mode 100644 index 0000000000..b142c2b4b6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_type_operations_async.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimal128TypeOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal128_type_response_body(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal128_type.response_body() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal128_type_request_body(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal128_type.request_body( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal128_type_request_parameter(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal128_type.request_parameter( + value=0.0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations.py new file mode 100644 index 0000000000..f73c2e049d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimal128VerifyOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal128_verify_prepare_verify(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal128_verify.prepare_verify() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal128_verify_verify(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal128_verify.verify( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations_async.py new file mode 100644 index 0000000000..4f57736a33 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal128_verify_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimal128VerifyOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal128_verify_prepare_verify(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal128_verify.prepare_verify() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal128_verify_verify(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal128_verify.verify( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations.py new file mode 100644 index 0000000000..0c9d97a7b1 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimalTypeOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal_type_response_body(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal_type.response_body() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal_type_request_body(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal_type.request_body( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal_type_request_parameter(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal_type.request_parameter( + value=0.0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations_async.py new file mode 100644 index 0000000000..9433c36fcf --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_type_operations_async.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimalTypeOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal_type_response_body(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal_type.response_body() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal_type_request_body(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal_type.request_body( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal_type_request_parameter(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal_type.request_parameter( + value=0.0, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations.py new file mode 100644 index 0000000000..b136939fd4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimalVerifyOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal_verify_prepare_verify(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal_verify.prepare_verify() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_decimal_verify_verify(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_decimal_verify.verify( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations_async.py new file mode 100644 index 0000000000..756a06e745 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_decimal_verify_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientDecimalVerifyOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal_verify_prepare_verify(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal_verify.prepare_verify() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_decimal_verify_verify(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_decimal_verify.verify( + body=0.0, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations.py new file mode 100644 index 0000000000..f9d3c30a81 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientStringOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_string_get(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_string.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_string_put(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_string.put( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations_async.py new file mode 100644 index 0000000000..a0062daeb6 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_string_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientStringOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_string_get(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_string.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_string_put(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_string.put( + body="str", + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations.py new file mode 100644 index 0000000000..6e78ce2e24 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import ScalarClientTestBase, ScalarPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientUnknownOperations(ScalarClientTestBase): + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_unknown_get(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_unknown.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy + def test_scalar_client_unknown_put(self, scalar_endpoint): + client = self.create_client(endpoint=scalar_endpoint) + response = client.scalar_client_unknown.put( + body={}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations_async.py new file mode 100644 index 0000000000..00ae313308 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/generated_tests/test_scalar_scalar_client_unknown_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import ScalarPreparer +from testpreparer_async import ScalarClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestScalarScalarClientUnknownOperationsAsync(ScalarClientTestBaseAsync): + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_unknown_get(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_unknown.get() + + # please add some check logic here by yourself + # ... + + @ScalarPreparer() + @recorded_by_proxy_async + async def test_scalar_client_unknown_put(self, scalar_endpoint): + client = self.create_async_client(endpoint=scalar_endpoint) + response = await client.scalar_client_unknown.put( + body={}, + content_type="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_client.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_client.py index 1d3f74d18d..c943501679 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/_client.py @@ -17,33 +17,37 @@ from ._configuration import ScalarClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanOperations, - Decimal128TypeOperations, - Decimal128VerifyOperations, - DecimalTypeOperations, - DecimalVerifyOperations, - StringOperations, - UnknownOperations, + ScalarClientBooleanOperations, + ScalarClientDecimal128TypeOperations, + ScalarClientDecimal128VerifyOperations, + ScalarClientDecimalTypeOperations, + ScalarClientDecimalVerifyOperations, + ScalarClientStringOperations, + ScalarClientUnknownOperations, ) class ScalarClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """ScalarClient. - :ivar string: StringOperations operations - :vartype string: typetest.scalar.operations.StringOperations - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.scalar.operations.BooleanOperations - :ivar unknown: UnknownOperations operations - :vartype unknown: typetest.scalar.operations.UnknownOperations - :ivar decimal_type: DecimalTypeOperations operations - :vartype decimal_type: typetest.scalar.operations.DecimalTypeOperations - :ivar decimal128_type: Decimal128TypeOperations operations - :vartype decimal128_type: typetest.scalar.operations.Decimal128TypeOperations - :ivar decimal_verify: DecimalVerifyOperations operations - :vartype decimal_verify: typetest.scalar.operations.DecimalVerifyOperations - :ivar decimal128_verify: Decimal128VerifyOperations operations - :vartype decimal128_verify: typetest.scalar.operations.Decimal128VerifyOperations + :ivar scalar_client_string: ScalarClientStringOperations operations + :vartype scalar_client_string: typetest.scalar.operations.ScalarClientStringOperations + :ivar scalar_client_boolean: ScalarClientBooleanOperations operations + :vartype scalar_client_boolean: typetest.scalar.operations.ScalarClientBooleanOperations + :ivar scalar_client_unknown: ScalarClientUnknownOperations operations + :vartype scalar_client_unknown: typetest.scalar.operations.ScalarClientUnknownOperations + :ivar scalar_client_decimal_type: ScalarClientDecimalTypeOperations operations + :vartype scalar_client_decimal_type: + typetest.scalar.operations.ScalarClientDecimalTypeOperations + :ivar scalar_client_decimal128_type: ScalarClientDecimal128TypeOperations operations + :vartype scalar_client_decimal128_type: + typetest.scalar.operations.ScalarClientDecimal128TypeOperations + :ivar scalar_client_decimal_verify: ScalarClientDecimalVerifyOperations operations + :vartype scalar_client_decimal_verify: + typetest.scalar.operations.ScalarClientDecimalVerifyOperations + :ivar scalar_client_decimal128_verify: ScalarClientDecimal128VerifyOperations operations + :vartype scalar_client_decimal128_verify: + typetest.scalar.operations.ScalarClientDecimal128VerifyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -76,13 +80,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown = UnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_type = DecimalTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_type = Decimal128TypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_verify = DecimalVerifyOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_verify = Decimal128VerifyOperations( + self.scalar_client_string = ScalarClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_boolean = ScalarClientBooleanOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_unknown = ScalarClientUnknownOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_type = ScalarClientDecimalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_type = ScalarClientDecimal128TypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_verify = ScalarClientDecimalVerifyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_verify = ScalarClientDecimal128VerifyOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/_client.py index 488eac03d3..5bd2848796 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/_client.py @@ -17,33 +17,37 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ScalarClientConfiguration from .operations import ( - BooleanOperations, - Decimal128TypeOperations, - Decimal128VerifyOperations, - DecimalTypeOperations, - DecimalVerifyOperations, - StringOperations, - UnknownOperations, + ScalarClientBooleanOperations, + ScalarClientDecimal128TypeOperations, + ScalarClientDecimal128VerifyOperations, + ScalarClientDecimalTypeOperations, + ScalarClientDecimalVerifyOperations, + ScalarClientStringOperations, + ScalarClientUnknownOperations, ) class ScalarClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """ScalarClient. - :ivar string: StringOperations operations - :vartype string: typetest.scalar.aio.operations.StringOperations - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.scalar.aio.operations.BooleanOperations - :ivar unknown: UnknownOperations operations - :vartype unknown: typetest.scalar.aio.operations.UnknownOperations - :ivar decimal_type: DecimalTypeOperations operations - :vartype decimal_type: typetest.scalar.aio.operations.DecimalTypeOperations - :ivar decimal128_type: Decimal128TypeOperations operations - :vartype decimal128_type: typetest.scalar.aio.operations.Decimal128TypeOperations - :ivar decimal_verify: DecimalVerifyOperations operations - :vartype decimal_verify: typetest.scalar.aio.operations.DecimalVerifyOperations - :ivar decimal128_verify: Decimal128VerifyOperations operations - :vartype decimal128_verify: typetest.scalar.aio.operations.Decimal128VerifyOperations + :ivar scalar_client_string: ScalarClientStringOperations operations + :vartype scalar_client_string: typetest.scalar.aio.operations.ScalarClientStringOperations + :ivar scalar_client_boolean: ScalarClientBooleanOperations operations + :vartype scalar_client_boolean: typetest.scalar.aio.operations.ScalarClientBooleanOperations + :ivar scalar_client_unknown: ScalarClientUnknownOperations operations + :vartype scalar_client_unknown: typetest.scalar.aio.operations.ScalarClientUnknownOperations + :ivar scalar_client_decimal_type: ScalarClientDecimalTypeOperations operations + :vartype scalar_client_decimal_type: + typetest.scalar.aio.operations.ScalarClientDecimalTypeOperations + :ivar scalar_client_decimal128_type: ScalarClientDecimal128TypeOperations operations + :vartype scalar_client_decimal128_type: + typetest.scalar.aio.operations.ScalarClientDecimal128TypeOperations + :ivar scalar_client_decimal_verify: ScalarClientDecimalVerifyOperations operations + :vartype scalar_client_decimal_verify: + typetest.scalar.aio.operations.ScalarClientDecimalVerifyOperations + :ivar scalar_client_decimal128_verify: ScalarClientDecimal128VerifyOperations operations + :vartype scalar_client_decimal128_verify: + typetest.scalar.aio.operations.ScalarClientDecimal128VerifyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -76,13 +80,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown = UnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_type = DecimalTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_type = Decimal128TypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_verify = DecimalVerifyOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_verify = Decimal128VerifyOperations( + self.scalar_client_string = ScalarClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_boolean = ScalarClientBooleanOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_unknown = ScalarClientUnknownOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_type = ScalarClientDecimalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_type = ScalarClientDecimal128TypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_verify = ScalarClientDecimalVerifyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_verify = ScalarClientDecimal128VerifyOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py index 88fcd329c4..b26e0099d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py @@ -12,26 +12,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BooleanOperations # type: ignore -from ._operations import UnknownOperations # type: ignore -from ._operations import DecimalTypeOperations # type: ignore -from ._operations import Decimal128TypeOperations # type: ignore -from ._operations import DecimalVerifyOperations # type: ignore -from ._operations import Decimal128VerifyOperations # type: ignore +from ._operations import ScalarClientStringOperations # type: ignore +from ._operations import ScalarClientBooleanOperations # type: ignore +from ._operations import ScalarClientUnknownOperations # type: ignore +from ._operations import ScalarClientDecimalTypeOperations # type: ignore +from ._operations import ScalarClientDecimal128TypeOperations # type: ignore +from ._operations import ScalarClientDecimalVerifyOperations # type: ignore +from ._operations import ScalarClientDecimal128VerifyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BooleanOperations", - "UnknownOperations", - "DecimalTypeOperations", - "Decimal128TypeOperations", - "DecimalVerifyOperations", - "Decimal128VerifyOperations", + "ScalarClientStringOperations", + "ScalarClientBooleanOperations", + "ScalarClientUnknownOperations", + "ScalarClientDecimalTypeOperations", + "ScalarClientDecimal128TypeOperations", + "ScalarClientDecimalVerifyOperations", + "ScalarClientDecimal128VerifyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py index ea7e7db8a3..7625ce0d4b 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py @@ -30,22 +30,22 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_get_request, - build_boolean_put_request, - build_decimal128_type_request_body_request, - build_decimal128_type_request_parameter_request, - build_decimal128_type_response_body_request, - build_decimal128_verify_prepare_verify_request, - build_decimal128_verify_verify_request, - build_decimal_type_request_body_request, - build_decimal_type_request_parameter_request, - build_decimal_type_response_body_request, - build_decimal_verify_prepare_verify_request, - build_decimal_verify_verify_request, - build_string_get_request, - build_string_put_request, - build_unknown_get_request, - build_unknown_put_request, + build_scalar_client_boolean_get_request, + build_scalar_client_boolean_put_request, + build_scalar_client_decimal128_type_request_body_request, + build_scalar_client_decimal128_type_request_parameter_request, + build_scalar_client_decimal128_type_response_body_request, + build_scalar_client_decimal128_verify_prepare_verify_request, + build_scalar_client_decimal128_verify_verify_request, + build_scalar_client_decimal_type_request_body_request, + build_scalar_client_decimal_type_request_parameter_request, + build_scalar_client_decimal_type_response_body_request, + build_scalar_client_decimal_verify_prepare_verify_request, + build_scalar_client_decimal_verify_verify_request, + build_scalar_client_string_get_request, + build_scalar_client_string_put_request, + build_scalar_client_unknown_get_request, + build_scalar_client_unknown_put_request, ) from .._configuration import ScalarClientConfiguration @@ -53,14 +53,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class ScalarClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`string` attribute. + :attr:`scalar_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -91,7 +91,7 @@ async def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_scalar_client_string_get_request( headers=_headers, params=_params, ) @@ -155,7 +155,7 @@ async def put(self, body: str, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_scalar_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -181,14 +181,14 @@ async def put(self, body: str, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BooleanOperations: +class ScalarClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`boolean` attribute. + :attr:`scalar_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -219,7 +219,7 @@ async def get(self, **kwargs: Any) -> bool: cls: ClsType[bool] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_scalar_client_boolean_get_request( headers=_headers, params=_params, ) @@ -283,7 +283,7 @@ async def put(self, body: bool, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_scalar_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -309,14 +309,14 @@ async def put(self, body: bool, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class UnknownOperations: +class ScalarClientUnknownOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`unknown` attribute. + :attr:`scalar_client_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -347,7 +347,7 @@ async def get(self, **kwargs: Any) -> Any: cls: ClsType[Any] = kwargs.pop("cls", None) - _request = build_unknown_get_request( + _request = build_scalar_client_unknown_get_request( headers=_headers, params=_params, ) @@ -411,7 +411,7 @@ async def put(self, body: Any, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_put_request( + _request = build_scalar_client_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -437,14 +437,14 @@ async def put(self, body: Any, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class DecimalTypeOperations: +class ScalarClientDecimalTypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal_type` attribute. + :attr:`scalar_client_decimal_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -475,7 +475,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal_type_response_body_request( + _request = build_scalar_client_decimal_type_response_body_request( headers=_headers, params=_params, ) @@ -539,7 +539,7 @@ async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_type_request_body_request( + _request = build_scalar_client_decimal_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -587,7 +587,7 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal_type_request_parameter_request( + _request = build_scalar_client_decimal_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -612,14 +612,14 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class Decimal128TypeOperations: +class ScalarClientDecimal128TypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal128_type` attribute. + :attr:`scalar_client_decimal128_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -650,7 +650,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal128_type_response_body_request( + _request = build_scalar_client_decimal128_type_response_body_request( headers=_headers, params=_params, ) @@ -714,7 +714,7 @@ async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_type_request_body_request( + _request = build_scalar_client_decimal128_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -762,7 +762,7 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal128_type_request_parameter_request( + _request = build_scalar_client_decimal128_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -787,14 +787,14 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class DecimalVerifyOperations: +class ScalarClientDecimalVerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal_verify` attribute. + :attr:`scalar_client_decimal_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -825,7 +825,7 @@ async def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal_verify_prepare_verify_request( + _request = build_scalar_client_decimal_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -886,7 +886,7 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_verify_verify_request( + _request = build_scalar_client_decimal_verify_verify_request( content_type=content_type, content=_content, headers=_headers, @@ -912,14 +912,14 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Decimal128VerifyOperations: +class ScalarClientDecimal128VerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal128_verify` attribute. + :attr:`scalar_client_decimal128_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -950,7 +950,7 @@ async def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal128_verify_prepare_verify_request( + _request = build_scalar_client_decimal128_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -1011,7 +1011,7 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_verify_verify_request( + _request = build_scalar_client_decimal128_verify_verify_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/__init__.py index 88fcd329c4..b26e0099d7 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/__init__.py @@ -12,26 +12,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BooleanOperations # type: ignore -from ._operations import UnknownOperations # type: ignore -from ._operations import DecimalTypeOperations # type: ignore -from ._operations import Decimal128TypeOperations # type: ignore -from ._operations import DecimalVerifyOperations # type: ignore -from ._operations import Decimal128VerifyOperations # type: ignore +from ._operations import ScalarClientStringOperations # type: ignore +from ._operations import ScalarClientBooleanOperations # type: ignore +from ._operations import ScalarClientUnknownOperations # type: ignore +from ._operations import ScalarClientDecimalTypeOperations # type: ignore +from ._operations import ScalarClientDecimal128TypeOperations # type: ignore +from ._operations import ScalarClientDecimalVerifyOperations # type: ignore +from ._operations import ScalarClientDecimal128VerifyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BooleanOperations", - "UnknownOperations", - "DecimalTypeOperations", - "Decimal128TypeOperations", - "DecimalVerifyOperations", - "Decimal128VerifyOperations", + "ScalarClientStringOperations", + "ScalarClientBooleanOperations", + "ScalarClientUnknownOperations", + "ScalarClientDecimalTypeOperations", + "ScalarClientDecimal128TypeOperations", + "ScalarClientDecimalVerifyOperations", + "ScalarClientDecimal128VerifyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py index d91f3ccfd0..e356246120 100644 --- a/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-scalar/typetest/scalar/operations/_operations.py @@ -38,7 +38,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_string_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -52,7 +52,7 @@ def build_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_string_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -65,7 +65,7 @@ def build_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_boolean_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -79,7 +79,7 @@ def build_boolean_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_boolean_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -92,7 +92,7 @@ def build_boolean_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_unknown_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -106,7 +106,7 @@ def build_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_unknown_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -119,7 +119,9 @@ def build_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_type_response_body_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_type_response_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -133,7 +135,9 @@ def build_decimal_type_response_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_type_request_body_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_type_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -146,7 +150,7 @@ def build_decimal_type_request_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_type_request_parameter_request( # pylint: disable=name-too-long +def build_scalar_client_decimal_type_request_parameter_request( # pylint: disable=name-too-long *, value: decimal.Decimal, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -160,7 +164,9 @@ def build_decimal_type_request_parameter_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_decimal128_type_response_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_response_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -174,7 +180,9 @@ def build_decimal128_type_response_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_type_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -187,7 +195,7 @@ def build_decimal128_type_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal128_type_request_parameter_request( # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_request_parameter_request( # pylint: disable=name-too-long *, value: decimal.Decimal, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -201,7 +209,9 @@ def build_decimal128_type_request_parameter_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_decimal_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal_verify_prepare_verify_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -215,7 +225,7 @@ def build_decimal_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -228,7 +238,9 @@ def build_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_decimal128_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_verify_prepare_verify_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -242,7 +254,7 @@ def build_decimal128_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -255,14 +267,14 @@ def build_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class StringOperations: +class ScalarClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`string` attribute. + :attr:`scalar_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -293,7 +305,7 @@ def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_scalar_client_string_get_request( headers=_headers, params=_params, ) @@ -357,7 +369,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_scalar_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -383,14 +395,14 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore -class BooleanOperations: +class ScalarClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`boolean` attribute. + :attr:`scalar_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -421,7 +433,7 @@ def get(self, **kwargs: Any) -> bool: cls: ClsType[bool] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_scalar_client_boolean_get_request( headers=_headers, params=_params, ) @@ -485,7 +497,7 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_scalar_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -511,14 +523,14 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore -class UnknownOperations: +class ScalarClientUnknownOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`unknown` attribute. + :attr:`scalar_client_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -549,7 +561,7 @@ def get(self, **kwargs: Any) -> Any: cls: ClsType[Any] = kwargs.pop("cls", None) - _request = build_unknown_get_request( + _request = build_scalar_client_unknown_get_request( headers=_headers, params=_params, ) @@ -613,7 +625,7 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_put_request( + _request = build_scalar_client_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -639,14 +651,14 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore -class DecimalTypeOperations: +class ScalarClientDecimalTypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal_type` attribute. + :attr:`scalar_client_decimal_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -677,7 +689,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal_type_response_body_request( + _request = build_scalar_client_decimal_type_response_body_request( headers=_headers, params=_params, ) @@ -743,7 +755,7 @@ def request_body( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_type_request_body_request( + _request = build_scalar_client_decimal_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -793,7 +805,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal_type_request_parameter_request( + _request = build_scalar_client_decimal_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -818,14 +830,14 @@ def request_parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Decimal128TypeOperations: +class ScalarClientDecimal128TypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal128_type` attribute. + :attr:`scalar_client_decimal128_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -856,7 +868,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal128_type_response_body_request( + _request = build_scalar_client_decimal128_type_response_body_request( headers=_headers, params=_params, ) @@ -922,7 +934,7 @@ def request_body( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_type_request_body_request( + _request = build_scalar_client_decimal128_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -972,7 +984,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal128_type_request_parameter_request( + _request = build_scalar_client_decimal128_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -997,14 +1009,14 @@ def request_parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DecimalVerifyOperations: +class ScalarClientDecimalVerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal_verify` attribute. + :attr:`scalar_client_decimal_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1035,7 +1047,7 @@ def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal_verify_prepare_verify_request( + _request = build_scalar_client_decimal_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -1096,7 +1108,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_verify_verify_request( + _request = build_scalar_client_decimal_verify_verify_request( content_type=content_type, content=_content, headers=_headers, @@ -1122,14 +1134,14 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore -class Decimal128VerifyOperations: +class ScalarClientDecimal128VerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal128_verify` attribute. + :attr:`scalar_client_decimal128_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1160,7 +1172,7 @@ def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal128_verify_prepare_verify_request( + _request = build_scalar_client_decimal128_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -1221,7 +1233,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_verify_verify_request( + _request = build_scalar_client_decimal128_verify_verify_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-union/apiview-properties.json b/packages/typespec-python/test/azure/generated/typetest-union/apiview-properties.json index b5847de2fd..2de29f9dd5 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/typetest-union/apiview-properties.json @@ -18,45 +18,45 @@ "typetest.union.models.MixedTypesCases": "Type.Union.MixedTypesCases", "typetest.union.models.StringAndArrayCases": "Type.Union.StringAndArrayCases", "typetest.union.models.StringExtensibleNamedUnion": "Type.Union.StringExtensibleNamedUnion", - "typetest.union.operations.StringsOnlyOperations.get": "Type.Union.StringsOnly.get", - "typetest.union.aio.operations.StringsOnlyOperations.get": "Type.Union.StringsOnly.get", - "typetest.union.operations.StringsOnlyOperations.send": "Type.Union.StringsOnly.send", - "typetest.union.aio.operations.StringsOnlyOperations.send": "Type.Union.StringsOnly.send", - "typetest.union.operations.StringExtensibleOperations.get": "Type.Union.StringExtensible.get", - "typetest.union.aio.operations.StringExtensibleOperations.get": "Type.Union.StringExtensible.get", - "typetest.union.operations.StringExtensibleOperations.send": "Type.Union.StringExtensible.send", - "typetest.union.aio.operations.StringExtensibleOperations.send": "Type.Union.StringExtensible.send", - "typetest.union.operations.StringExtensibleNamedOperations.get": "Type.Union.StringExtensibleNamed.get", - "typetest.union.aio.operations.StringExtensibleNamedOperations.get": "Type.Union.StringExtensibleNamed.get", - "typetest.union.operations.StringExtensibleNamedOperations.send": "Type.Union.StringExtensibleNamed.send", - "typetest.union.aio.operations.StringExtensibleNamedOperations.send": "Type.Union.StringExtensibleNamed.send", - "typetest.union.operations.IntsOnlyOperations.get": "Type.Union.IntsOnly.get", - "typetest.union.aio.operations.IntsOnlyOperations.get": "Type.Union.IntsOnly.get", - "typetest.union.operations.IntsOnlyOperations.send": "Type.Union.IntsOnly.send", - "typetest.union.aio.operations.IntsOnlyOperations.send": "Type.Union.IntsOnly.send", - "typetest.union.operations.FloatsOnlyOperations.get": "Type.Union.FloatsOnly.get", - "typetest.union.aio.operations.FloatsOnlyOperations.get": "Type.Union.FloatsOnly.get", - "typetest.union.operations.FloatsOnlyOperations.send": "Type.Union.FloatsOnly.send", - "typetest.union.aio.operations.FloatsOnlyOperations.send": "Type.Union.FloatsOnly.send", - "typetest.union.operations.ModelsOnlyOperations.get": "Type.Union.ModelsOnly.get", - "typetest.union.aio.operations.ModelsOnlyOperations.get": "Type.Union.ModelsOnly.get", - "typetest.union.operations.ModelsOnlyOperations.send": "Type.Union.ModelsOnly.send", - "typetest.union.aio.operations.ModelsOnlyOperations.send": "Type.Union.ModelsOnly.send", - "typetest.union.operations.EnumsOnlyOperations.get": "Type.Union.EnumsOnly.get", - "typetest.union.aio.operations.EnumsOnlyOperations.get": "Type.Union.EnumsOnly.get", - "typetest.union.operations.EnumsOnlyOperations.send": "Type.Union.EnumsOnly.send", - "typetest.union.aio.operations.EnumsOnlyOperations.send": "Type.Union.EnumsOnly.send", - "typetest.union.operations.StringAndArrayOperations.get": "Type.Union.StringAndArray.get", - "typetest.union.aio.operations.StringAndArrayOperations.get": "Type.Union.StringAndArray.get", - "typetest.union.operations.StringAndArrayOperations.send": "Type.Union.StringAndArray.send", - "typetest.union.aio.operations.StringAndArrayOperations.send": "Type.Union.StringAndArray.send", - "typetest.union.operations.MixedLiteralsOperations.get": "Type.Union.MixedLiterals.get", - "typetest.union.aio.operations.MixedLiteralsOperations.get": "Type.Union.MixedLiterals.get", - "typetest.union.operations.MixedLiteralsOperations.send": "Type.Union.MixedLiterals.send", - "typetest.union.aio.operations.MixedLiteralsOperations.send": "Type.Union.MixedLiterals.send", - "typetest.union.operations.MixedTypesOperations.get": "Type.Union.MixedTypes.get", - "typetest.union.aio.operations.MixedTypesOperations.get": "Type.Union.MixedTypes.get", - "typetest.union.operations.MixedTypesOperations.send": "Type.Union.MixedTypes.send", - "typetest.union.aio.operations.MixedTypesOperations.send": "Type.Union.MixedTypes.send" + "typetest.union.operations.UnionClientStringsOnlyOperations.get": "Type.Union.StringsOnly.get", + "typetest.union.aio.operations.UnionClientStringsOnlyOperations.get": "Type.Union.StringsOnly.get", + "typetest.union.operations.UnionClientStringsOnlyOperations.send": "Type.Union.StringsOnly.send", + "typetest.union.aio.operations.UnionClientStringsOnlyOperations.send": "Type.Union.StringsOnly.send", + "typetest.union.operations.UnionClientStringExtensibleOperations.get": "Type.Union.StringExtensible.get", + "typetest.union.aio.operations.UnionClientStringExtensibleOperations.get": "Type.Union.StringExtensible.get", + "typetest.union.operations.UnionClientStringExtensibleOperations.send": "Type.Union.StringExtensible.send", + "typetest.union.aio.operations.UnionClientStringExtensibleOperations.send": "Type.Union.StringExtensible.send", + "typetest.union.operations.UnionClientStringExtensibleNamedOperations.get": "Type.Union.StringExtensibleNamed.get", + "typetest.union.aio.operations.UnionClientStringExtensibleNamedOperations.get": "Type.Union.StringExtensibleNamed.get", + "typetest.union.operations.UnionClientStringExtensibleNamedOperations.send": "Type.Union.StringExtensibleNamed.send", + "typetest.union.aio.operations.UnionClientStringExtensibleNamedOperations.send": "Type.Union.StringExtensibleNamed.send", + "typetest.union.operations.UnionClientIntsOnlyOperations.get": "Type.Union.IntsOnly.get", + "typetest.union.aio.operations.UnionClientIntsOnlyOperations.get": "Type.Union.IntsOnly.get", + "typetest.union.operations.UnionClientIntsOnlyOperations.send": "Type.Union.IntsOnly.send", + "typetest.union.aio.operations.UnionClientIntsOnlyOperations.send": "Type.Union.IntsOnly.send", + "typetest.union.operations.UnionClientFloatsOnlyOperations.get": "Type.Union.FloatsOnly.get", + "typetest.union.aio.operations.UnionClientFloatsOnlyOperations.get": "Type.Union.FloatsOnly.get", + "typetest.union.operations.UnionClientFloatsOnlyOperations.send": "Type.Union.FloatsOnly.send", + "typetest.union.aio.operations.UnionClientFloatsOnlyOperations.send": "Type.Union.FloatsOnly.send", + "typetest.union.operations.UnionClientModelsOnlyOperations.get": "Type.Union.ModelsOnly.get", + "typetest.union.aio.operations.UnionClientModelsOnlyOperations.get": "Type.Union.ModelsOnly.get", + "typetest.union.operations.UnionClientModelsOnlyOperations.send": "Type.Union.ModelsOnly.send", + "typetest.union.aio.operations.UnionClientModelsOnlyOperations.send": "Type.Union.ModelsOnly.send", + "typetest.union.operations.UnionClientEnumsOnlyOperations.get": "Type.Union.EnumsOnly.get", + "typetest.union.aio.operations.UnionClientEnumsOnlyOperations.get": "Type.Union.EnumsOnly.get", + "typetest.union.operations.UnionClientEnumsOnlyOperations.send": "Type.Union.EnumsOnly.send", + "typetest.union.aio.operations.UnionClientEnumsOnlyOperations.send": "Type.Union.EnumsOnly.send", + "typetest.union.operations.UnionClientStringAndArrayOperations.get": "Type.Union.StringAndArray.get", + "typetest.union.aio.operations.UnionClientStringAndArrayOperations.get": "Type.Union.StringAndArray.get", + "typetest.union.operations.UnionClientStringAndArrayOperations.send": "Type.Union.StringAndArray.send", + "typetest.union.aio.operations.UnionClientStringAndArrayOperations.send": "Type.Union.StringAndArray.send", + "typetest.union.operations.UnionClientMixedLiteralsOperations.get": "Type.Union.MixedLiterals.get", + "typetest.union.aio.operations.UnionClientMixedLiteralsOperations.get": "Type.Union.MixedLiterals.get", + "typetest.union.operations.UnionClientMixedLiteralsOperations.send": "Type.Union.MixedLiterals.send", + "typetest.union.aio.operations.UnionClientMixedLiteralsOperations.send": "Type.Union.MixedLiterals.send", + "typetest.union.operations.UnionClientMixedTypesOperations.get": "Type.Union.MixedTypes.get", + "typetest.union.aio.operations.UnionClientMixedTypesOperations.get": "Type.Union.MixedTypes.get", + "typetest.union.operations.UnionClientMixedTypesOperations.send": "Type.Union.MixedTypes.send", + "typetest.union.aio.operations.UnionClientMixedTypesOperations.send": "Type.Union.MixedTypes.send" } } \ No newline at end of file diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations.py new file mode 100644 index 0000000000..80f6f24c66 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientEnumsOnlyOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_enums_only_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_enums_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_enums_only_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_enums_only.send( + body={"prop": {"lr": "left", "ud": "up"}}, + prop={"lr": "left", "ud": "up"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations_async.py new file mode 100644 index 0000000000..81e347edbe --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_enums_only_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientEnumsOnlyOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_enums_only_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_enums_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_enums_only_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_enums_only.send( + body={"prop": {"lr": "left", "ud": "up"}}, + prop={"lr": "left", "ud": "up"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations.py new file mode 100644 index 0000000000..09e8377b4e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientFloatsOnlyOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_floats_only_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_floats_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_floats_only_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_floats_only.send( + body={"prop": 1.1}, + prop=1.1, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations_async.py new file mode 100644 index 0000000000..a05a3a0ce4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_floats_only_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientFloatsOnlyOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_floats_only_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_floats_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_floats_only_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_floats_only.send( + body={"prop": 1.1}, + prop=1.1, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations.py new file mode 100644 index 0000000000..48add4981b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientIntsOnlyOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_ints_only_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_ints_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_ints_only_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_ints_only.send( + body={"prop": 1}, + prop=1, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations_async.py new file mode 100644 index 0000000000..75bb1c452d --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_ints_only_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientIntsOnlyOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_ints_only_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_ints_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_ints_only_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_ints_only.send( + body={"prop": 1}, + prop=1, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations.py new file mode 100644 index 0000000000..65b9568916 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientMixedLiteralsOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_mixed_literals_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_mixed_literals.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_mixed_literals_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_mixed_literals.send( + body={"prop": {"booleanLiteral": "a", "floatLiteral": "a", "intLiteral": "a", "stringLiteral": "a"}}, + prop={"booleanLiteral": "a", "floatLiteral": "a", "intLiteral": "a", "stringLiteral": "a"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations_async.py new file mode 100644 index 0000000000..40a9837544 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_literals_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientMixedLiteralsOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_mixed_literals_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_mixed_literals.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_mixed_literals_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_mixed_literals.send( + body={"prop": {"booleanLiteral": "a", "floatLiteral": "a", "intLiteral": "a", "stringLiteral": "a"}}, + prop={"booleanLiteral": "a", "floatLiteral": "a", "intLiteral": "a", "stringLiteral": "a"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations.py new file mode 100644 index 0000000000..7675982d59 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientMixedTypesOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_mixed_types_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_mixed_types.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_mixed_types_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_mixed_types.send( + body={ + "prop": { + "array": [{"name": "str"}], + "boolean": {"name": "str"}, + "int": {"name": "str"}, + "literal": {"name": "str"}, + "model": {"name": "str"}, + } + }, + prop={ + "array": [{"name": "str"}], + "boolean": {"name": "str"}, + "int": {"name": "str"}, + "literal": {"name": "str"}, + "model": {"name": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations_async.py new file mode 100644 index 0000000000..f0f13b902e --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_mixed_types_operations_async.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientMixedTypesOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_mixed_types_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_mixed_types.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_mixed_types_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_mixed_types.send( + body={ + "prop": { + "array": [{"name": "str"}], + "boolean": {"name": "str"}, + "int": {"name": "str"}, + "literal": {"name": "str"}, + "model": {"name": "str"}, + } + }, + prop={ + "array": [{"name": "str"}], + "boolean": {"name": "str"}, + "int": {"name": "str"}, + "literal": {"name": "str"}, + "model": {"name": "str"}, + }, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations.py new file mode 100644 index 0000000000..f1fff79a8c --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientModelsOnlyOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_models_only_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_models_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_models_only_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_models_only.send( + body={"prop": {"name": "str"}}, + prop={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations_async.py new file mode 100644 index 0000000000..41408a19e4 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_models_only_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientModelsOnlyOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_models_only_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_models_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_models_only_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_models_only.send( + body={"prop": {"name": "str"}}, + prop={"name": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations.py new file mode 100644 index 0000000000..14bf5b6d59 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringAndArrayOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_and_array_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_and_array.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_and_array_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_and_array.send( + body={"prop": {"array": "str", "string": "str"}}, + prop={"array": "str", "string": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations_async.py new file mode 100644 index 0000000000..037232af94 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_and_array_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringAndArrayOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_and_array_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_and_array.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_and_array_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_and_array.send( + body={"prop": {"array": "str", "string": "str"}}, + prop={"array": "str", "string": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations.py new file mode 100644 index 0000000000..ad5303e52f --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringExtensibleNamedOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_extensible_named_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_extensible_named.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_extensible_named_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_extensible_named.send( + body={"prop": "str"}, + prop="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations_async.py new file mode 100644 index 0000000000..c9cf3537f9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_named_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringExtensibleNamedOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_extensible_named_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_extensible_named.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_extensible_named_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_extensible_named.send( + body={"prop": "str"}, + prop="str", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations.py new file mode 100644 index 0000000000..f9a8222e0b --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringExtensibleOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_extensible_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_extensible.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_string_extensible_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_string_extensible.send( + body={"prop": "b"}, + prop="b", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations_async.py new file mode 100644 index 0000000000..5fd3c269e9 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_string_extensible_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringExtensibleOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_extensible_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_extensible.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_string_extensible_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_string_extensible.send( + body={"prop": "b"}, + prop="b", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations.py new file mode 100644 index 0000000000..319f12cc82 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import UnionClientTestBase, UnionPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringsOnlyOperations(UnionClientTestBase): + @UnionPreparer() + @recorded_by_proxy + def test_union_client_strings_only_get(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_strings_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy + def test_union_client_strings_only_send(self, union_endpoint): + client = self.create_client(endpoint=union_endpoint) + response = client.union_client_strings_only.send( + body={"prop": "a"}, + prop="a", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations_async.py b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations_async.py new file mode 100644 index 0000000000..8fe212d959 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/typetest-union/generated_tests/test_union_union_client_strings_only_operations_async.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import UnionPreparer +from testpreparer_async import UnionClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestUnionUnionClientStringsOnlyOperationsAsync(UnionClientTestBaseAsync): + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_strings_only_get(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_strings_only.get() + + # please add some check logic here by yourself + # ... + + @UnionPreparer() + @recorded_by_proxy_async + async def test_union_client_strings_only_send(self, union_endpoint): + client = self.create_async_client(endpoint=union_endpoint) + response = await client.union_client_strings_only.send( + body={"prop": "a"}, + prop="a", + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_client.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_client.py index 8863b50c81..a38fcd6945 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/_client.py @@ -17,42 +17,47 @@ from ._configuration import UnionClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - EnumsOnlyOperations, - FloatsOnlyOperations, - IntsOnlyOperations, - MixedLiteralsOperations, - MixedTypesOperations, - ModelsOnlyOperations, - StringAndArrayOperations, - StringExtensibleNamedOperations, - StringExtensibleOperations, - StringsOnlyOperations, + UnionClientEnumsOnlyOperations, + UnionClientFloatsOnlyOperations, + UnionClientIntsOnlyOperations, + UnionClientMixedLiteralsOperations, + UnionClientMixedTypesOperations, + UnionClientModelsOnlyOperations, + UnionClientStringAndArrayOperations, + UnionClientStringExtensibleNamedOperations, + UnionClientStringExtensibleOperations, + UnionClientStringsOnlyOperations, ) class UnionClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Describe scenarios for various combinations of unions. - :ivar strings_only: StringsOnlyOperations operations - :vartype strings_only: typetest.union.operations.StringsOnlyOperations - :ivar string_extensible: StringExtensibleOperations operations - :vartype string_extensible: typetest.union.operations.StringExtensibleOperations - :ivar string_extensible_named: StringExtensibleNamedOperations operations - :vartype string_extensible_named: typetest.union.operations.StringExtensibleNamedOperations - :ivar ints_only: IntsOnlyOperations operations - :vartype ints_only: typetest.union.operations.IntsOnlyOperations - :ivar floats_only: FloatsOnlyOperations operations - :vartype floats_only: typetest.union.operations.FloatsOnlyOperations - :ivar models_only: ModelsOnlyOperations operations - :vartype models_only: typetest.union.operations.ModelsOnlyOperations - :ivar enums_only: EnumsOnlyOperations operations - :vartype enums_only: typetest.union.operations.EnumsOnlyOperations - :ivar string_and_array: StringAndArrayOperations operations - :vartype string_and_array: typetest.union.operations.StringAndArrayOperations - :ivar mixed_literals: MixedLiteralsOperations operations - :vartype mixed_literals: typetest.union.operations.MixedLiteralsOperations - :ivar mixed_types: MixedTypesOperations operations - :vartype mixed_types: typetest.union.operations.MixedTypesOperations + :ivar union_client_strings_only: UnionClientStringsOnlyOperations operations + :vartype union_client_strings_only: typetest.union.operations.UnionClientStringsOnlyOperations + :ivar union_client_string_extensible: UnionClientStringExtensibleOperations operations + :vartype union_client_string_extensible: + typetest.union.operations.UnionClientStringExtensibleOperations + :ivar union_client_string_extensible_named: UnionClientStringExtensibleNamedOperations + operations + :vartype union_client_string_extensible_named: + typetest.union.operations.UnionClientStringExtensibleNamedOperations + :ivar union_client_ints_only: UnionClientIntsOnlyOperations operations + :vartype union_client_ints_only: typetest.union.operations.UnionClientIntsOnlyOperations + :ivar union_client_floats_only: UnionClientFloatsOnlyOperations operations + :vartype union_client_floats_only: typetest.union.operations.UnionClientFloatsOnlyOperations + :ivar union_client_models_only: UnionClientModelsOnlyOperations operations + :vartype union_client_models_only: typetest.union.operations.UnionClientModelsOnlyOperations + :ivar union_client_enums_only: UnionClientEnumsOnlyOperations operations + :vartype union_client_enums_only: typetest.union.operations.UnionClientEnumsOnlyOperations + :ivar union_client_string_and_array: UnionClientStringAndArrayOperations operations + :vartype union_client_string_and_array: + typetest.union.operations.UnionClientStringAndArrayOperations + :ivar union_client_mixed_literals: UnionClientMixedLiteralsOperations operations + :vartype union_client_mixed_literals: + typetest.union.operations.UnionClientMixedLiteralsOperations + :ivar union_client_mixed_types: UnionClientMixedTypesOperations operations + :vartype union_client_mixed_types: typetest.union.operations.UnionClientMixedTypesOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -85,20 +90,36 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.strings_only = StringsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_extensible = StringExtensibleOperations( + self.union_client_strings_only = UnionClientStringsOnlyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_extensible_named = StringExtensibleNamedOperations( + self.union_client_string_extensible = UnionClientStringExtensibleOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_extensible_named = UnionClientStringExtensibleNamedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_ints_only = UnionClientIntsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_floats_only = UnionClientFloatsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_models_only = UnionClientModelsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_enums_only = UnionClientEnumsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_and_array = UnionClientStringAndArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_literals = UnionClientMixedLiteralsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_types = UnionClientMixedTypesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.ints_only = IntsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.floats_only = FloatsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.models_only = ModelsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.enums_only = EnumsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_and_array = StringAndArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_literals = MixedLiteralsOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_types = MixedTypesOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/_client.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/_client.py index 1b43016396..e750784daa 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/_client.py @@ -17,42 +17,51 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UnionClientConfiguration from .operations import ( - EnumsOnlyOperations, - FloatsOnlyOperations, - IntsOnlyOperations, - MixedLiteralsOperations, - MixedTypesOperations, - ModelsOnlyOperations, - StringAndArrayOperations, - StringExtensibleNamedOperations, - StringExtensibleOperations, - StringsOnlyOperations, + UnionClientEnumsOnlyOperations, + UnionClientFloatsOnlyOperations, + UnionClientIntsOnlyOperations, + UnionClientMixedLiteralsOperations, + UnionClientMixedTypesOperations, + UnionClientModelsOnlyOperations, + UnionClientStringAndArrayOperations, + UnionClientStringExtensibleNamedOperations, + UnionClientStringExtensibleOperations, + UnionClientStringsOnlyOperations, ) class UnionClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Describe scenarios for various combinations of unions. - :ivar strings_only: StringsOnlyOperations operations - :vartype strings_only: typetest.union.aio.operations.StringsOnlyOperations - :ivar string_extensible: StringExtensibleOperations operations - :vartype string_extensible: typetest.union.aio.operations.StringExtensibleOperations - :ivar string_extensible_named: StringExtensibleNamedOperations operations - :vartype string_extensible_named: typetest.union.aio.operations.StringExtensibleNamedOperations - :ivar ints_only: IntsOnlyOperations operations - :vartype ints_only: typetest.union.aio.operations.IntsOnlyOperations - :ivar floats_only: FloatsOnlyOperations operations - :vartype floats_only: typetest.union.aio.operations.FloatsOnlyOperations - :ivar models_only: ModelsOnlyOperations operations - :vartype models_only: typetest.union.aio.operations.ModelsOnlyOperations - :ivar enums_only: EnumsOnlyOperations operations - :vartype enums_only: typetest.union.aio.operations.EnumsOnlyOperations - :ivar string_and_array: StringAndArrayOperations operations - :vartype string_and_array: typetest.union.aio.operations.StringAndArrayOperations - :ivar mixed_literals: MixedLiteralsOperations operations - :vartype mixed_literals: typetest.union.aio.operations.MixedLiteralsOperations - :ivar mixed_types: MixedTypesOperations operations - :vartype mixed_types: typetest.union.aio.operations.MixedTypesOperations + :ivar union_client_strings_only: UnionClientStringsOnlyOperations operations + :vartype union_client_strings_only: + typetest.union.aio.operations.UnionClientStringsOnlyOperations + :ivar union_client_string_extensible: UnionClientStringExtensibleOperations operations + :vartype union_client_string_extensible: + typetest.union.aio.operations.UnionClientStringExtensibleOperations + :ivar union_client_string_extensible_named: UnionClientStringExtensibleNamedOperations + operations + :vartype union_client_string_extensible_named: + typetest.union.aio.operations.UnionClientStringExtensibleNamedOperations + :ivar union_client_ints_only: UnionClientIntsOnlyOperations operations + :vartype union_client_ints_only: typetest.union.aio.operations.UnionClientIntsOnlyOperations + :ivar union_client_floats_only: UnionClientFloatsOnlyOperations operations + :vartype union_client_floats_only: + typetest.union.aio.operations.UnionClientFloatsOnlyOperations + :ivar union_client_models_only: UnionClientModelsOnlyOperations operations + :vartype union_client_models_only: + typetest.union.aio.operations.UnionClientModelsOnlyOperations + :ivar union_client_enums_only: UnionClientEnumsOnlyOperations operations + :vartype union_client_enums_only: typetest.union.aio.operations.UnionClientEnumsOnlyOperations + :ivar union_client_string_and_array: UnionClientStringAndArrayOperations operations + :vartype union_client_string_and_array: + typetest.union.aio.operations.UnionClientStringAndArrayOperations + :ivar union_client_mixed_literals: UnionClientMixedLiteralsOperations operations + :vartype union_client_mixed_literals: + typetest.union.aio.operations.UnionClientMixedLiteralsOperations + :ivar union_client_mixed_types: UnionClientMixedTypesOperations operations + :vartype union_client_mixed_types: + typetest.union.aio.operations.UnionClientMixedTypesOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -85,20 +94,36 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.strings_only = StringsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_extensible = StringExtensibleOperations( + self.union_client_strings_only = UnionClientStringsOnlyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_extensible_named = StringExtensibleNamedOperations( + self.union_client_string_extensible = UnionClientStringExtensibleOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_extensible_named = UnionClientStringExtensibleNamedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_ints_only = UnionClientIntsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_floats_only = UnionClientFloatsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_models_only = UnionClientModelsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_enums_only = UnionClientEnumsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_and_array = UnionClientStringAndArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_literals = UnionClientMixedLiteralsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_types = UnionClientMixedTypesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.ints_only = IntsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.floats_only = FloatsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.models_only = ModelsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.enums_only = EnumsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_and_array = StringAndArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_literals = MixedLiteralsOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_types = MixedTypesOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/__init__.py index 79b9ff621f..314d04c924 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/__init__.py @@ -12,32 +12,32 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringsOnlyOperations # type: ignore -from ._operations import StringExtensibleOperations # type: ignore -from ._operations import StringExtensibleNamedOperations # type: ignore -from ._operations import IntsOnlyOperations # type: ignore -from ._operations import FloatsOnlyOperations # type: ignore -from ._operations import ModelsOnlyOperations # type: ignore -from ._operations import EnumsOnlyOperations # type: ignore -from ._operations import StringAndArrayOperations # type: ignore -from ._operations import MixedLiteralsOperations # type: ignore -from ._operations import MixedTypesOperations # type: ignore +from ._operations import UnionClientStringsOnlyOperations # type: ignore +from ._operations import UnionClientStringExtensibleOperations # type: ignore +from ._operations import UnionClientStringExtensibleNamedOperations # type: ignore +from ._operations import UnionClientIntsOnlyOperations # type: ignore +from ._operations import UnionClientFloatsOnlyOperations # type: ignore +from ._operations import UnionClientModelsOnlyOperations # type: ignore +from ._operations import UnionClientEnumsOnlyOperations # type: ignore +from ._operations import UnionClientStringAndArrayOperations # type: ignore +from ._operations import UnionClientMixedLiteralsOperations # type: ignore +from ._operations import UnionClientMixedTypesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringsOnlyOperations", - "StringExtensibleOperations", - "StringExtensibleNamedOperations", - "IntsOnlyOperations", - "FloatsOnlyOperations", - "ModelsOnlyOperations", - "EnumsOnlyOperations", - "StringAndArrayOperations", - "MixedLiteralsOperations", - "MixedTypesOperations", + "UnionClientStringsOnlyOperations", + "UnionClientStringExtensibleOperations", + "UnionClientStringExtensibleNamedOperations", + "UnionClientIntsOnlyOperations", + "UnionClientFloatsOnlyOperations", + "UnionClientModelsOnlyOperations", + "UnionClientEnumsOnlyOperations", + "UnionClientStringAndArrayOperations", + "UnionClientMixedLiteralsOperations", + "UnionClientMixedTypesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py index 3c9e285954..4a802dd2ec 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/aio/operations/_operations.py @@ -31,26 +31,26 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_enums_only_get_request, - build_enums_only_send_request, - build_floats_only_get_request, - build_floats_only_send_request, - build_ints_only_get_request, - build_ints_only_send_request, - build_mixed_literals_get_request, - build_mixed_literals_send_request, - build_mixed_types_get_request, - build_mixed_types_send_request, - build_models_only_get_request, - build_models_only_send_request, - build_string_and_array_get_request, - build_string_and_array_send_request, - build_string_extensible_get_request, - build_string_extensible_named_get_request, - build_string_extensible_named_send_request, - build_string_extensible_send_request, - build_strings_only_get_request, - build_strings_only_send_request, + build_union_client_enums_only_get_request, + build_union_client_enums_only_send_request, + build_union_client_floats_only_get_request, + build_union_client_floats_only_send_request, + build_union_client_ints_only_get_request, + build_union_client_ints_only_send_request, + build_union_client_mixed_literals_get_request, + build_union_client_mixed_literals_send_request, + build_union_client_mixed_types_get_request, + build_union_client_mixed_types_send_request, + build_union_client_models_only_get_request, + build_union_client_models_only_send_request, + build_union_client_string_and_array_get_request, + build_union_client_string_and_array_send_request, + build_union_client_string_extensible_get_request, + build_union_client_string_extensible_named_get_request, + build_union_client_string_extensible_named_send_request, + build_union_client_string_extensible_send_request, + build_union_client_strings_only_get_request, + build_union_client_strings_only_send_request, ) from .._configuration import UnionClientConfiguration @@ -60,14 +60,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringsOnlyOperations: +class UnionClientStringsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`strings_only` attribute. + :attr:`union_client_strings_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -98,7 +98,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None) - _request = build_strings_only_get_request( + _request = build_union_client_strings_only_get_request( headers=_headers, params=_params, ) @@ -219,7 +219,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_strings_only_send_request( + _request = build_union_client_strings_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -245,14 +245,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleOperations: +class UnionClientStringExtensibleOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_extensible` attribute. + :attr:`union_client_string_extensible` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -283,7 +283,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None) - _request = build_string_extensible_get_request( + _request = build_union_client_string_extensible_get_request( headers=_headers, params=_params, ) @@ -406,7 +406,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_send_request( + _request = build_union_client_string_extensible_send_request( content_type=content_type, content=_content, headers=_headers, @@ -432,14 +432,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleNamedOperations: +class UnionClientStringExtensibleNamedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_extensible_named` attribute. + :attr:`union_client_string_extensible_named` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -470,7 +470,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None) - _request = build_string_extensible_named_get_request( + _request = build_union_client_string_extensible_named_get_request( headers=_headers, params=_params, ) @@ -597,7 +597,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_named_send_request( + _request = build_union_client_string_extensible_named_send_request( content_type=content_type, content=_content, headers=_headers, @@ -623,14 +623,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class IntsOnlyOperations: +class UnionClientIntsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`ints_only` attribute. + :attr:`union_client_ints_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -661,7 +661,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None) - _request = build_ints_only_get_request( + _request = build_union_client_ints_only_get_request( headers=_headers, params=_params, ) @@ -778,7 +778,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_ints_only_send_request( + _request = build_union_client_ints_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -804,14 +804,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class FloatsOnlyOperations: +class UnionClientFloatsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`floats_only` attribute. + :attr:`union_client_floats_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -842,7 +842,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None) - _request = build_floats_only_get_request( + _request = build_union_client_floats_only_get_request( headers=_headers, params=_params, ) @@ -957,7 +957,7 @@ async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Un else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_floats_only_send_request( + _request = build_union_client_floats_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -983,14 +983,14 @@ async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Un return cls(pipeline_response, None, {}) # type: ignore -class ModelsOnlyOperations: +class UnionClientModelsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`models_only` attribute. + :attr:`union_client_models_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1021,7 +1021,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None) - _request = build_models_only_get_request( + _request = build_union_client_models_only_get_request( headers=_headers, params=_params, ) @@ -1140,7 +1140,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_only_send_request( + _request = build_union_client_models_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1166,14 +1166,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class EnumsOnlyOperations: +class UnionClientEnumsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`enums_only` attribute. + :attr:`union_client_enums_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1204,7 +1204,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None) - _request = build_enums_only_get_request( + _request = build_union_client_enums_only_get_request( headers=_headers, params=_params, ) @@ -1323,7 +1323,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enums_only_send_request( + _request = build_union_client_enums_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1349,14 +1349,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringAndArrayOperations: +class UnionClientStringAndArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_and_array` attribute. + :attr:`union_client_string_and_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1387,7 +1387,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None) - _request = build_string_and_array_get_request( + _request = build_union_client_string_and_array_get_request( headers=_headers, params=_params, ) @@ -1506,7 +1506,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_and_array_send_request( + _request = build_union_client_string_and_array_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1532,14 +1532,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class MixedLiteralsOperations: +class UnionClientMixedLiteralsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`mixed_literals` attribute. + :attr:`union_client_mixed_literals` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1570,7 +1570,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None) - _request = build_mixed_literals_get_request( + _request = build_union_client_mixed_literals_get_request( headers=_headers, params=_params, ) @@ -1689,7 +1689,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_literals_send_request( + _request = build_union_client_mixed_literals_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1715,14 +1715,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class MixedTypesOperations: +class UnionClientMixedTypesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`mixed_types` attribute. + :attr:`union_client_mixed_types` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1753,7 +1753,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None) - _request = build_mixed_types_get_request( + _request = build_union_client_mixed_types_get_request( headers=_headers, params=_params, ) @@ -1872,7 +1872,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_types_send_request( + _request = build_union_client_mixed_types_send_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/__init__.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/__init__.py index 79b9ff621f..314d04c924 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/__init__.py @@ -12,32 +12,32 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringsOnlyOperations # type: ignore -from ._operations import StringExtensibleOperations # type: ignore -from ._operations import StringExtensibleNamedOperations # type: ignore -from ._operations import IntsOnlyOperations # type: ignore -from ._operations import FloatsOnlyOperations # type: ignore -from ._operations import ModelsOnlyOperations # type: ignore -from ._operations import EnumsOnlyOperations # type: ignore -from ._operations import StringAndArrayOperations # type: ignore -from ._operations import MixedLiteralsOperations # type: ignore -from ._operations import MixedTypesOperations # type: ignore +from ._operations import UnionClientStringsOnlyOperations # type: ignore +from ._operations import UnionClientStringExtensibleOperations # type: ignore +from ._operations import UnionClientStringExtensibleNamedOperations # type: ignore +from ._operations import UnionClientIntsOnlyOperations # type: ignore +from ._operations import UnionClientFloatsOnlyOperations # type: ignore +from ._operations import UnionClientModelsOnlyOperations # type: ignore +from ._operations import UnionClientEnumsOnlyOperations # type: ignore +from ._operations import UnionClientStringAndArrayOperations # type: ignore +from ._operations import UnionClientMixedLiteralsOperations # type: ignore +from ._operations import UnionClientMixedTypesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringsOnlyOperations", - "StringExtensibleOperations", - "StringExtensibleNamedOperations", - "IntsOnlyOperations", - "FloatsOnlyOperations", - "ModelsOnlyOperations", - "EnumsOnlyOperations", - "StringAndArrayOperations", - "MixedLiteralsOperations", - "MixedTypesOperations", + "UnionClientStringsOnlyOperations", + "UnionClientStringExtensibleOperations", + "UnionClientStringExtensibleNamedOperations", + "UnionClientIntsOnlyOperations", + "UnionClientFloatsOnlyOperations", + "UnionClientModelsOnlyOperations", + "UnionClientEnumsOnlyOperations", + "UnionClientStringAndArrayOperations", + "UnionClientMixedLiteralsOperations", + "UnionClientMixedTypesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py index 906d00d2db..58740c8acd 100644 --- a/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/typetest-union/typetest/union/operations/_operations.py @@ -41,7 +41,7 @@ _SERIALIZER.client_side_validation = False -def build_strings_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_strings_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -55,7 +55,7 @@ def build_strings_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_strings_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_strings_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -69,7 +69,7 @@ def build_strings_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_extensible_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_extensible_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -83,7 +83,7 @@ def build_string_extensible_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_extensible_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_extensible_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -97,7 +97,9 @@ def build_string_extensible_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_extensible_named_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_union_client_string_extensible_named_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -111,7 +113,9 @@ def build_string_extensible_named_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_extensible_named_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_union_client_string_extensible_named_send_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -125,7 +129,7 @@ def build_string_extensible_named_send_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_ints_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_ints_only_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -139,7 +143,7 @@ def build_ints_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_ints_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_ints_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -153,7 +157,7 @@ def build_ints_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_floats_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_floats_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -167,7 +171,7 @@ def build_floats_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_floats_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_floats_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -181,7 +185,7 @@ def build_floats_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_models_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -195,7 +199,7 @@ def build_models_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_models_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_models_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -209,7 +213,7 @@ def build_models_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_enums_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_enums_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -223,7 +227,7 @@ def build_enums_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_enums_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_enums_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -237,7 +241,7 @@ def build_enums_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_and_array_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_and_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -251,7 +255,7 @@ def build_string_and_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_and_array_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_and_array_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -265,7 +269,7 @@ def build_string_and_array_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -279,7 +283,7 @@ def build_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -293,7 +297,7 @@ def build_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_mixed_types_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_types_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -307,7 +311,7 @@ def build_mixed_types_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_mixed_types_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_types_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -321,14 +325,14 @@ def build_mixed_types_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class StringsOnlyOperations: +class UnionClientStringsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`strings_only` attribute. + :attr:`union_client_strings_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -359,7 +363,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None) - _request = build_strings_only_get_request( + _request = build_union_client_strings_only_get_request( headers=_headers, params=_params, ) @@ -478,7 +482,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_strings_only_send_request( + _request = build_union_client_strings_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -504,14 +508,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleOperations: +class UnionClientStringExtensibleOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_extensible` attribute. + :attr:`union_client_string_extensible` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -542,7 +546,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None) - _request = build_string_extensible_get_request( + _request = build_union_client_string_extensible_get_request( headers=_headers, params=_params, ) @@ -627,7 +631,7 @@ def send( # pylint: disable=inconsistent-return-statements body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[Literal["b"], Literal["c"], str] = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -665,7 +669,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_send_request( + _request = build_union_client_string_extensible_send_request( content_type=content_type, content=_content, headers=_headers, @@ -691,14 +695,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleNamedOperations: +class UnionClientStringExtensibleNamedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_extensible_named` attribute. + :attr:`union_client_string_extensible_named` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -729,7 +733,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None) - _request = build_string_extensible_named_get_request( + _request = build_union_client_string_extensible_named_get_request( headers=_headers, params=_params, ) @@ -770,7 +774,7 @@ def send( *, prop: Union[str, _models.StringExtensibleNamedUnion], content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -818,7 +822,7 @@ def send( # pylint: disable=inconsistent-return-statements body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[str, _models.StringExtensibleNamedUnion] = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -856,7 +860,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_named_send_request( + _request = build_union_client_string_extensible_named_send_request( content_type=content_type, content=_content, headers=_headers, @@ -882,14 +886,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntsOnlyOperations: +class UnionClientIntsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`ints_only` attribute. + :attr:`union_client_ints_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -920,7 +924,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None) - _request = build_ints_only_get_request( + _request = build_union_client_ints_only_get_request( headers=_headers, params=_params, ) @@ -1037,7 +1041,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_ints_only_send_request( + _request = build_union_client_ints_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1063,14 +1067,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatsOnlyOperations: +class UnionClientFloatsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`floats_only` attribute. + :attr:`union_client_floats_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1101,7 +1105,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None) - _request = build_floats_only_get_request( + _request = build_union_client_floats_only_get_request( headers=_headers, params=_params, ) @@ -1218,7 +1222,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_floats_only_send_request( + _request = build_union_client_floats_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1244,14 +1248,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelsOnlyOperations: +class UnionClientModelsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`models_only` attribute. + :attr:`union_client_models_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1282,7 +1286,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None) - _request = build_models_only_get_request( + _request = build_union_client_models_only_get_request( headers=_headers, params=_params, ) @@ -1401,7 +1405,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_only_send_request( + _request = build_union_client_models_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1427,14 +1431,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class EnumsOnlyOperations: +class UnionClientEnumsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`enums_only` attribute. + :attr:`union_client_enums_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1465,7 +1469,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None) - _request = build_enums_only_get_request( + _request = build_union_client_enums_only_get_request( headers=_headers, params=_params, ) @@ -1582,7 +1586,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enums_only_send_request( + _request = build_union_client_enums_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1608,14 +1612,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringAndArrayOperations: +class UnionClientStringAndArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_and_array` attribute. + :attr:`union_client_string_and_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1646,7 +1650,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None) - _request = build_string_and_array_get_request( + _request = build_union_client_string_and_array_get_request( headers=_headers, params=_params, ) @@ -1763,7 +1767,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_and_array_send_request( + _request = build_union_client_string_and_array_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1789,14 +1793,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedLiteralsOperations: +class UnionClientMixedLiteralsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`mixed_literals` attribute. + :attr:`union_client_mixed_literals` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1827,7 +1831,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None) - _request = build_mixed_literals_get_request( + _request = build_union_client_mixed_literals_get_request( headers=_headers, params=_params, ) @@ -1944,7 +1948,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_literals_send_request( + _request = build_union_client_mixed_literals_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1970,14 +1974,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedTypesOperations: +class UnionClientMixedTypesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`mixed_types` attribute. + :attr:`union_client_mixed_types` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2008,7 +2012,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None) - _request = build_mixed_types_get_request( + _request = build_union_client_mixed_types_get_request( headers=_headers, params=_params, ) @@ -2125,7 +2129,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_types_send_request( + _request = build_union_client_mixed_types_send_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/versioning-added/apiview-properties.json b/packages/typespec-python/test/azure/generated/versioning-added/apiview-properties.json index ebaed00d17..c0c1c23839 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/versioning-added/apiview-properties.json @@ -6,8 +6,8 @@ "versioning.added.models.Versions": "Versioning.Added.Versions", "versioning.added.models.EnumV2": "Versioning.Added.EnumV2", "versioning.added.models.EnumV1": "Versioning.Added.EnumV1", - "versioning.added.operations.InterfaceV2Operations.v2_in_interface": "Versioning.Added.InterfaceV2.v2InInterface", - "versioning.added.aio.operations.InterfaceV2Operations.v2_in_interface": "Versioning.Added.InterfaceV2.v2InInterface", + "versioning.added.operations.AddedClientInterfaceV2Operations.v2_in_interface": "Versioning.Added.InterfaceV2.v2InInterface", + "versioning.added.aio.operations.AddedClientInterfaceV2Operations.v2_in_interface": "Versioning.Added.InterfaceV2.v2InInterface", "versioning.added.AddedClient.v1": "Versioning.Added.v1", "versioning.added.aio.AddedClient.v1": "Versioning.Added.v1", "versioning.added.AddedClient.v2": "Versioning.Added.v2", diff --git a/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations.py b/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations.py new file mode 100644 index 0000000000..872cdf4903 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import AddedClientTestBase, AddedPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAddedAddedClientInterfaceV2Operations(AddedClientTestBase): + @AddedPreparer() + @recorded_by_proxy + def test_added_client_interface_v2_v2_in_interface(self, added_endpoint): + client = self.create_client(endpoint=added_endpoint) + response = client.added_client_interface_v2.v2_in_interface( + body={"enumProp": "str", "prop": "str", "unionProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations_async.py b/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations_async.py new file mode 100644 index 0000000000..563a141855 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-added/generated_tests/test_added_added_client_interface_v2_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import AddedPreparer +from testpreparer_async import AddedClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestAddedAddedClientInterfaceV2OperationsAsync(AddedClientTestBaseAsync): + @AddedPreparer() + @recorded_by_proxy_async + async def test_added_client_interface_v2_v2_in_interface(self, added_endpoint): + client = self.create_async_client(endpoint=added_endpoint) + response = await client.added_client_interface_v2.v2_in_interface( + body={"enumProp": "str", "prop": "str", "unionProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py index d362b8ec01..fbc8c83ac3 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/_client.py @@ -16,14 +16,15 @@ from ._configuration import AddedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InterfaceV2Operations, _AddedClientOperationsMixin +from .operations import AddedClientInterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@added`` decorator. - :ivar interface_v2: InterfaceV2Operations operations - :vartype interface_v2: versioning.added.operations.InterfaceV2Operations + :ivar added_client_interface_v2: AddedClientInterfaceV2Operations operations + :vartype added_client_interface_v2: + versioning.added.operations.AddedClientInterfaceV2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -61,7 +62,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.interface_v2 = InterfaceV2Operations(self._client, self._config, self._serialize, self._deserialize) + self.added_client_interface_v2 = AddedClientInterfaceV2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py index 105561e199..2ed7d1134a 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/_client.py @@ -16,14 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AddedClientConfiguration -from .operations import InterfaceV2Operations, _AddedClientOperationsMixin +from .operations import AddedClientInterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@added`` decorator. - :ivar interface_v2: InterfaceV2Operations operations - :vartype interface_v2: versioning.added.aio.operations.InterfaceV2Operations + :ivar added_client_interface_v2: AddedClientInterfaceV2Operations operations + :vartype added_client_interface_v2: + versioning.added.aio.operations.AddedClientInterfaceV2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -61,7 +62,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.interface_v2 = InterfaceV2Operations(self._client, self._config, self._serialize, self._deserialize) + self.added_client_interface_v2 = AddedClientInterfaceV2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py index 01960cbd44..cd3ac7d49c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InterfaceV2Operations # type: ignore +from ._operations import AddedClientInterfaceV2Operations # type: ignore from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InterfaceV2Operations", + "AddedClientInterfaceV2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py index f2bb319708..05b22f9089 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/aio/operations/_operations.py @@ -33,9 +33,9 @@ from ..._utils.utils import ClientMixinABC from ..._validation import api_version_validation from ...operations._operations import ( + build_added_client_interface_v2_v2_in_interface_request, build_added_v1_request, build_added_v2_request, - build_interface_v2_v2_in_interface_request, ) from .._configuration import AddedClientConfiguration @@ -44,14 +44,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class InterfaceV2Operations: +class AddedClientInterfaceV2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.added.aio.AddedClient`'s - :attr:`interface_v2` attribute. + :attr:`added_client_interface_v2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -145,7 +145,7 @@ async def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_interface_v2_v2_in_interface_request( + _request = build_added_client_interface_v2_v2_in_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py index 01960cbd44..cd3ac7d49c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InterfaceV2Operations # type: ignore +from ._operations import AddedClientInterfaceV2Operations # type: ignore from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InterfaceV2Operations", + "AddedClientInterfaceV2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py index f2eca4e601..62eab4d735 100644 --- a/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-added/versioning/added/operations/_operations.py @@ -41,7 +41,9 @@ _SERIALIZER.client_side_validation = False -def build_interface_v2_v2_in_interface_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_added_client_interface_v2_v2_in_interface_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -93,14 +95,14 @@ def build_added_v2_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class InterfaceV2Operations: +class AddedClientInterfaceV2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.added.AddedClient`'s - :attr:`interface_v2` attribute. + :attr:`added_client_interface_v2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -192,7 +194,7 @@ def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_interface_v2_v2_in_interface_request( + _request = build_added_client_interface_v2_v2_in_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/apiview-properties.json b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/apiview-properties.json index 1b134ddfa6..67f17dbcb1 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/apiview-properties.json +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/apiview-properties.json @@ -4,8 +4,8 @@ "versioning.renamedfrom.models.NewModel": "Versioning.RenamedFrom.NewModel", "versioning.renamedfrom.models.Versions": "Versioning.RenamedFrom.Versions", "versioning.renamedfrom.models.NewEnum": "Versioning.RenamedFrom.NewEnum", - "versioning.renamedfrom.operations.NewInterfaceOperations.new_op_in_new_interface": "Versioning.RenamedFrom.NewInterface.newOpInNewInterface", - "versioning.renamedfrom.aio.operations.NewInterfaceOperations.new_op_in_new_interface": "Versioning.RenamedFrom.NewInterface.newOpInNewInterface", + "versioning.renamedfrom.operations.RenamedFromClientNewInterfaceOperations.new_op_in_new_interface": "Versioning.RenamedFrom.NewInterface.newOpInNewInterface", + "versioning.renamedfrom.aio.operations.RenamedFromClientNewInterfaceOperations.new_op_in_new_interface": "Versioning.RenamedFrom.NewInterface.newOpInNewInterface", "versioning.renamedfrom.RenamedFromClient.new_op": "Versioning.RenamedFrom.newOp", "versioning.renamedfrom.aio.RenamedFromClient.new_op": "Versioning.RenamedFrom.newOp" } diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations.py new file mode 100644 index 0000000000..b5ae842767 --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations.py @@ -0,0 +1,24 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils import recorded_by_proxy +from testpreparer import RenamedFromClientTestBase, RenamedFromPreparer + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRenamedFromRenamedFromClientNewInterfaceOperations(RenamedFromClientTestBase): + @RenamedFromPreparer() + @recorded_by_proxy + def test_renamed_from_client_new_interface_new_op_in_new_interface(self, renamedfrom_endpoint): + client = self.create_client(endpoint=renamedfrom_endpoint) + response = client.renamed_from_client_new_interface.new_op_in_new_interface( + body={"enumProp": "str", "newProp": "str", "unionProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations_async.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations_async.py new file mode 100644 index 0000000000..2f841145ca --- /dev/null +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/generated_tests/test_renamed_from_renamed_from_client_new_interface_operations_async.py @@ -0,0 +1,25 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from devtools_testutils.aio import recorded_by_proxy_async +from testpreparer import RenamedFromPreparer +from testpreparer_async import RenamedFromClientTestBaseAsync + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestRenamedFromRenamedFromClientNewInterfaceOperationsAsync(RenamedFromClientTestBaseAsync): + @RenamedFromPreparer() + @recorded_by_proxy_async + async def test_renamed_from_client_new_interface_new_op_in_new_interface(self, renamedfrom_endpoint): + client = self.create_async_client(endpoint=renamedfrom_endpoint) + response = await client.renamed_from_client_new_interface.new_op_in_new_interface( + body={"enumProp": "str", "newProp": "str", "unionProp": "str"}, + ) + + # please add some check logic here by yourself + # ... diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py index 8d9547b37c..a663bae383 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py @@ -16,14 +16,15 @@ from ._configuration import RenamedFromClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin +from .operations import RenamedFromClientNewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@renamedFrom`` decorator. - :ivar new_interface: NewInterfaceOperations operations - :vartype new_interface: versioning.renamedfrom.operations.NewInterfaceOperations + :ivar renamed_from_client_new_interface: RenamedFromClientNewInterfaceOperations operations + :vartype renamed_from_client_new_interface: + versioning.renamedfrom.operations.RenamedFromClientNewInterfaceOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -61,7 +62,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.new_interface = NewInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_from_client_new_interface = RenamedFromClientNewInterfaceOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py index 30d3e70e91..fef3413989 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py @@ -16,14 +16,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedFromClientConfiguration -from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin +from .operations import RenamedFromClientNewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@renamedFrom`` decorator. - :ivar new_interface: NewInterfaceOperations operations - :vartype new_interface: versioning.renamedfrom.aio.operations.NewInterfaceOperations + :ivar renamed_from_client_new_interface: RenamedFromClientNewInterfaceOperations operations + :vartype renamed_from_client_new_interface: + versioning.renamedfrom.aio.operations.RenamedFromClientNewInterfaceOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -61,7 +62,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.new_interface = NewInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_from_client_new_interface = RenamedFromClientNewInterfaceOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py index f41021cd05..743c462604 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NewInterfaceOperations # type: ignore +from ._operations import RenamedFromClientNewInterfaceOperations # type: ignore from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NewInterfaceOperations", + "RenamedFromClientNewInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py index 7a022ae2ae..2dfeb9bb1c 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py @@ -32,7 +32,7 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( - build_new_interface_new_op_in_new_interface_request, + build_renamed_from_client_new_interface_new_op_in_new_interface_request, build_renamed_from_new_op_request, ) from .._configuration import RenamedFromClientConfiguration @@ -42,14 +42,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class NewInterfaceOperations: +class RenamedFromClientNewInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.renamedfrom.aio.RenamedFromClient`'s - :attr:`new_interface` attribute. + :attr:`renamed_from_client_new_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -140,7 +140,7 @@ async def new_op_in_new_interface( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_new_interface_new_op_in_new_interface_request( + _request = build_renamed_from_client_new_interface_new_op_in_new_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py index f41021cd05..743c462604 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NewInterfaceOperations # type: ignore +from ._operations import RenamedFromClientNewInterfaceOperations # type: ignore from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -20,7 +20,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NewInterfaceOperations", + "RenamedFromClientNewInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py index 34d7a5fdb7..74a6e6c732 100644 --- a/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py @@ -40,7 +40,9 @@ _SERIALIZER.client_side_validation = False -def build_new_interface_new_op_in_new_interface_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_renamed_from_client_new_interface_new_op_in_new_interface_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -78,14 +80,14 @@ def build_renamed_from_new_op_request(*, new_query: str, **kwargs: Any) -> HttpR return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class NewInterfaceOperations: +class RenamedFromClientNewInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.renamedfrom.RenamedFromClient`'s - :attr:`new_interface` attribute. + :attr:`renamed_from_client_new_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -176,7 +178,7 @@ def new_op_in_new_interface( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_new_interface_new_op_in_new_interface_request( + _request = build_renamed_from_client_new_interface_new_op_in_new_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/_client.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/_client.py index f86a047460..03e58d23d4 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/_client.py @@ -9,14 +9,14 @@ from ._configuration import ArrayClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .property.operations import PropertyOperations +from .property.operations import ArrayClientPropertyOperations class ArrayClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on array. - :ivar property: PropertyOperations operations - :vartype property: encode.array.operations.PropertyOperations + :ivar array_client_property: ArrayClientPropertyOperations operations + :vartype array_client_property: encode.array.operations.ArrayClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.array_client_property = ArrayClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/aio/_client.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/aio/_client.py index d878331c5d..9b85b9fd5c 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/aio/_client.py @@ -8,15 +8,15 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..property.aio.operations import PropertyOperations +from ..property.aio.operations import ArrayClientPropertyOperations from ._configuration import ArrayClientConfiguration class ArrayClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on array. - :ivar property: PropertyOperations operations - :vartype property: encode.array.aio.operations.PropertyOperations + :ivar array_client_property: ArrayClientPropertyOperations operations + :vartype array_client_property: encode.array.aio.operations.ArrayClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.array_client_property = ArrayClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/__init__.py index 02fe504541..c7516e0fd3 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import ArrayClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "ArrayClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/_operations.py index b6f6641874..600b8e91ed 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/aio/operations/_operations.py @@ -25,18 +25,18 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import ArrayClientConfiguration from ...operations._operations import ( - build_property_comma_delimited_request, - build_property_enum_comma_delimited_request, - build_property_enum_newline_delimited_request, - build_property_enum_pipe_delimited_request, - build_property_enum_space_delimited_request, - build_property_extensible_enum_comma_delimited_request, - build_property_extensible_enum_newline_delimited_request, - build_property_extensible_enum_pipe_delimited_request, - build_property_extensible_enum_space_delimited_request, - build_property_newline_delimited_request, - build_property_pipe_delimited_request, - build_property_space_delimited_request, + build_array_client_property_comma_delimited_request, + build_array_client_property_enum_comma_delimited_request, + build_array_client_property_enum_newline_delimited_request, + build_array_client_property_enum_pipe_delimited_request, + build_array_client_property_enum_space_delimited_request, + build_array_client_property_extensible_enum_comma_delimited_request, + build_array_client_property_extensible_enum_newline_delimited_request, + build_array_client_property_extensible_enum_pipe_delimited_request, + build_array_client_property_extensible_enum_space_delimited_request, + build_array_client_property_newline_delimited_request, + build_array_client_property_pipe_delimited_request, + build_array_client_property_space_delimited_request, ) JSON = MutableMapping[str, Any] @@ -44,14 +44,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class ArrayClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.array.aio.ArrayClient`'s - :attr:`property` attribute. + :attr:`array_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -146,7 +146,7 @@ async def comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_comma_delimited_request( + _request = build_array_client_property_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -266,7 +266,7 @@ async def space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_space_delimited_request( + _request = build_array_client_property_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -386,7 +386,7 @@ async def pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_pipe_delimited_request( + _request = build_array_client_property_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -506,7 +506,7 @@ async def newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_newline_delimited_request( + _request = build_array_client_property_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -626,7 +626,7 @@ async def enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_comma_delimited_request( + _request = build_array_client_property_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -746,7 +746,7 @@ async def enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_space_delimited_request( + _request = build_array_client_property_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -866,7 +866,7 @@ async def enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_pipe_delimited_request( + _request = build_array_client_property_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -986,7 +986,7 @@ async def enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_newline_delimited_request( + _request = build_array_client_property_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1110,7 +1110,7 @@ async def extensible_enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_comma_delimited_request( + _request = build_array_client_property_extensible_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1234,7 +1234,7 @@ async def extensible_enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_space_delimited_request( + _request = build_array_client_property_extensible_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1358,7 +1358,7 @@ async def extensible_enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_pipe_delimited_request( + _request = build_array_client_property_extensible_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1483,7 +1483,7 @@ async def extensible_enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_newline_delimited_request( + _request = build_array_client_property_extensible_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/__init__.py index 02fe504541..c7516e0fd3 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import ArrayClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "ArrayClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/_operations.py index 94dbb00d60..06861cbda7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-array/encode/array/property/operations/_operations.py @@ -33,7 +33,7 @@ _SERIALIZER.client_side_validation = False -def build_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -50,7 +50,7 @@ def build_property_comma_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_space_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_space_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -67,7 +67,7 @@ def build_property_space_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -84,7 +84,9 @@ def build_property_pipe_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_newline_delimited_request(**kwargs: Any) -> HttpRequest: +def build_array_client_property_newline_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -101,7 +103,9 @@ def build_property_newline_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_comma_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_comma_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -118,7 +122,9 @@ def build_property_enum_comma_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_space_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_space_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -135,7 +141,9 @@ def build_property_enum_space_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_pipe_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +160,9 @@ def build_property_enum_pipe_delimited_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_enum_newline_delimited_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_array_client_property_enum_newline_delimited_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -169,7 +179,7 @@ def build_property_enum_newline_delimited_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_comma_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_comma_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -188,7 +198,7 @@ def build_property_extensible_enum_comma_delimited_request( # pylint: disable=n return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_space_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_space_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -207,7 +217,7 @@ def build_property_extensible_enum_space_delimited_request( # pylint: disable=n return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_pipe_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_pipe_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -226,7 +236,7 @@ def build_property_extensible_enum_pipe_delimited_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_extensible_enum_newline_delimited_request( # pylint: disable=name-too-long +def build_array_client_property_extensible_enum_newline_delimited_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -245,14 +255,14 @@ def build_property_extensible_enum_newline_delimited_request( # pylint: disable return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class ArrayClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.array.ArrayClient`'s - :attr:`property` attribute. + :attr:`array_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -347,7 +357,7 @@ def comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_comma_delimited_request( + _request = build_array_client_property_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -467,7 +477,7 @@ def space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_space_delimited_request( + _request = build_array_client_property_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -587,7 +597,7 @@ def pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_pipe_delimited_request( + _request = build_array_client_property_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -707,7 +717,7 @@ def newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_newline_delimited_request( + _request = build_array_client_property_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -827,7 +837,7 @@ def enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_comma_delimited_request( + _request = build_array_client_property_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -947,7 +957,7 @@ def enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_space_delimited_request( + _request = build_array_client_property_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1067,7 +1077,7 @@ def enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_pipe_delimited_request( + _request = build_array_client_property_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1187,7 +1197,7 @@ def enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_enum_newline_delimited_request( + _request = build_array_client_property_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1311,7 +1321,7 @@ def extensible_enum_comma_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_comma_delimited_request( + _request = build_array_client_property_extensible_enum_comma_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1435,7 +1445,7 @@ def extensible_enum_space_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_space_delimited_request( + _request = build_array_client_property_extensible_enum_space_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1559,7 +1569,7 @@ def extensible_enum_pipe_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_pipe_delimited_request( + _request = build_array_client_property_extensible_enum_pipe_delimited_request( content_type=content_type, content=_content, headers=_headers, @@ -1684,7 +1694,7 @@ def extensible_enum_newline_delimited( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_extensible_enum_newline_delimited_request( + _request = build_array_client_property_extensible_enum_newline_delimited_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_client.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_client.py index b3ef717467..e1e0c1e2ec 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/_client.py @@ -9,26 +9,26 @@ from ._configuration import BytesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .property.operations import PropertyOperations -from .query.operations import QueryOperations -from .requestbody.operations import RequestBodyOperations -from .responsebody.operations import ResponseBodyOperations +from .header.operations import BytesClientHeaderOperations +from .property.operations import BytesClientPropertyOperations +from .query.operations import BytesClientQueryOperations +from .requestbody.operations import BytesClientRequestBodyOperations +from .responsebody.operations import BytesClientResponseBodyOperations class BytesClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on bytes. - :ivar query: QueryOperations operations - :vartype query: encode.bytes.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.bytes.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.bytes.operations.HeaderOperations - :ivar request_body: RequestBodyOperations operations - :vartype request_body: encode.bytes.operations.RequestBodyOperations - :ivar response_body: ResponseBodyOperations operations - :vartype response_body: encode.bytes.operations.ResponseBodyOperations + :ivar bytes_client_query: BytesClientQueryOperations operations + :vartype bytes_client_query: encode.bytes.operations.BytesClientQueryOperations + :ivar bytes_client_property: BytesClientPropertyOperations operations + :vartype bytes_client_property: encode.bytes.operations.BytesClientPropertyOperations + :ivar bytes_client_header: BytesClientHeaderOperations operations + :vartype bytes_client_header: encode.bytes.operations.BytesClientHeaderOperations + :ivar bytes_client_request_body: BytesClientRequestBodyOperations operations + :vartype bytes_client_request_body: encode.bytes.operations.BytesClientRequestBodyOperations + :ivar bytes_client_response_body: BytesClientResponseBodyOperations operations + :vartype bytes_client_response_body: encode.bytes.operations.BytesClientResponseBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -55,11 +55,21 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.request_body = RequestBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_body = ResponseBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.bytes_client_query = BytesClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_property = BytesClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_header = BytesClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_request_body = BytesClientRequestBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_response_body = BytesClientResponseBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/_client.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/_client.py index 0ddad29adb..57d8203af7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/aio/_client.py @@ -8,27 +8,29 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..property.aio.operations import PropertyOperations -from ..query.aio.operations import QueryOperations -from ..requestbody.aio.operations import RequestBodyOperations -from ..responsebody.aio.operations import ResponseBodyOperations +from ..header.aio.operations import BytesClientHeaderOperations +from ..property.aio.operations import BytesClientPropertyOperations +from ..query.aio.operations import BytesClientQueryOperations +from ..requestbody.aio.operations import BytesClientRequestBodyOperations +from ..responsebody.aio.operations import BytesClientResponseBodyOperations from ._configuration import BytesClientConfiguration class BytesClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on bytes. - :ivar query: QueryOperations operations - :vartype query: encode.bytes.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.bytes.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.bytes.aio.operations.HeaderOperations - :ivar request_body: RequestBodyOperations operations - :vartype request_body: encode.bytes.aio.operations.RequestBodyOperations - :ivar response_body: ResponseBodyOperations operations - :vartype response_body: encode.bytes.aio.operations.ResponseBodyOperations + :ivar bytes_client_query: BytesClientQueryOperations operations + :vartype bytes_client_query: encode.bytes.aio.operations.BytesClientQueryOperations + :ivar bytes_client_property: BytesClientPropertyOperations operations + :vartype bytes_client_property: encode.bytes.aio.operations.BytesClientPropertyOperations + :ivar bytes_client_header: BytesClientHeaderOperations operations + :vartype bytes_client_header: encode.bytes.aio.operations.BytesClientHeaderOperations + :ivar bytes_client_request_body: BytesClientRequestBodyOperations operations + :vartype bytes_client_request_body: + encode.bytes.aio.operations.BytesClientRequestBodyOperations + :ivar bytes_client_response_body: BytesClientResponseBodyOperations operations + :vartype bytes_client_response_body: + encode.bytes.aio.operations.BytesClientResponseBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -55,11 +57,21 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.request_body = RequestBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_body = ResponseBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.bytes_client_query = BytesClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_property = BytesClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_header = BytesClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_request_body = BytesClientRequestBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.bytes_client_response_body = BytesClientResponseBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py index 8e39e7642d..9140513e78 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import BytesClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "BytesClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py index aa813e6c7d..5a6e68b952 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/aio/operations/_operations.py @@ -17,24 +17,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_header_base64_request, - build_header_base64_url_array_request, - build_header_base64_url_request, - build_header_default_request, + build_bytes_client_header_base64_request, + build_bytes_client_header_base64_url_array_request, + build_bytes_client_header_base64_url_request, + build_bytes_client_header_default_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class BytesClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`header` attribute. + :attr:`bytes_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -66,7 +66,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_bytes_client_header_default_request( value=value, headers=_headers, params=_params, @@ -110,7 +110,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_request( + _request = build_bytes_client_header_base64_request( value=value, headers=_headers, params=_params, @@ -154,7 +154,7 @@ async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_request( + _request = build_bytes_client_header_base64_url_request( value=value, headers=_headers, params=_params, @@ -198,7 +198,7 @@ async def base64_url_array(self, *, value: list[bytes], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_array_request( + _request = build_bytes_client_header_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/__init__.py index 8e39e7642d..9140513e78 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import BytesClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "BytesClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/_operations.py index 5be5ffd475..a69245ef42 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/header/operations/_operations.py @@ -25,7 +25,9 @@ _SERIALIZER.client_side_validation = False -def build_header_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_default_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -37,7 +39,7 @@ def build_header_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -49,7 +51,9 @@ def build_header_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_url_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -61,7 +65,9 @@ def build_header_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_base64_url_array_request(*, value: list[bytes], **kwargs: Any) -> HttpRequest: +def build_bytes_client_header_base64_url_array_request( # pylint: disable=name-too-long + *, value: list[bytes], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -73,14 +79,14 @@ def build_header_base64_url_array_request(*, value: list[bytes], **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class BytesClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`header` attribute. + :attr:`bytes_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,7 +118,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_bytes_client_header_default_request( value=value, headers=_headers, params=_params, @@ -156,7 +162,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_request( + _request = build_bytes_client_header_base64_request( value=value, headers=_headers, params=_params, @@ -200,7 +206,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_request( + _request = build_bytes_client_header_base64_url_request( value=value, headers=_headers, params=_params, @@ -246,7 +252,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_base64_url_array_request( + _request = build_bytes_client_header_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py index 02fe504541..81915e3f90 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import BytesClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "BytesClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py index 9edfd226c3..88e5cfd253 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/aio/operations/_operations.py @@ -24,10 +24,10 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_property_base64_request, - build_property_base64_url_array_request, - build_property_base64_url_request, - build_property_default_request, + build_bytes_client_property_base64_request, + build_bytes_client_property_base64_url_array_request, + build_bytes_client_property_base64_url_request, + build_bytes_client_property_default_request, ) JSON = MutableMapping[str, Any] @@ -35,14 +35,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class BytesClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`property` attribute. + :attr:`bytes_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -132,7 +132,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_bytes_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -247,7 +247,7 @@ async def base64( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_request( + _request = build_bytes_client_property_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -362,7 +362,7 @@ async def base64_url( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_request( + _request = build_bytes_client_property_base64_url_request( content_type=content_type, content=_content, headers=_headers, @@ -482,7 +482,7 @@ async def base64_url_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_array_request( + _request = build_bytes_client_property_base64_url_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/__init__.py index 02fe504541..81915e3f90 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import BytesClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "BytesClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/_operations.py index a8a7214108..21e4e3a12b 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/property/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -49,7 +49,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -66,7 +66,7 @@ def build_property_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -83,7 +83,7 @@ def build_property_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -100,14 +100,14 @@ def build_property_base64_url_array_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class BytesClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`property` attribute. + :attr:`bytes_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -197,7 +197,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_bytes_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -312,7 +312,7 @@ def base64( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_request( + _request = build_bytes_client_property_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -427,7 +427,7 @@ def base64_url( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_request( + _request = build_bytes_client_property_base64_url_request( content_type=content_type, content=_content, headers=_headers, @@ -547,7 +547,7 @@ def base64_url_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_base64_url_array_request( + _request = build_bytes_client_property_base64_url_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py index 2f5d3ef93d..25af187355 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import BytesClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "BytesClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py index 045569b221..8636c32eba 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/aio/operations/_operations.py @@ -17,24 +17,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_query_base64_request, - build_query_base64_url_array_request, - build_query_base64_url_request, - build_query_default_request, + build_bytes_client_query_base64_request, + build_bytes_client_query_base64_url_array_request, + build_bytes_client_query_base64_url_request, + build_bytes_client_query_default_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class BytesClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`query` attribute. + :attr:`bytes_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -66,7 +66,7 @@ async def default(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_bytes_client_query_default_request( value=value, headers=_headers, params=_params, @@ -110,7 +110,7 @@ async def base64(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_request( + _request = build_bytes_client_query_base64_request( value=value, headers=_headers, params=_params, @@ -154,7 +154,7 @@ async def base64_url(self, *, value: bytes, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_request( + _request = build_bytes_client_query_base64_url_request( value=value, headers=_headers, params=_params, @@ -198,7 +198,7 @@ async def base64_url_array(self, *, value: list[bytes], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_array_request( + _request = build_bytes_client_query_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/__init__.py index 2f5d3ef93d..25af187355 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import BytesClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "BytesClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/_operations.py index ff22000d05..efcb54f85a 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/query/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -37,7 +37,7 @@ def build_query_default_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -49,7 +49,9 @@ def build_query_base64_request(*, value: bytes, **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_url_request( # pylint: disable=name-too-long + *, value: bytes, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -61,7 +63,9 @@ def build_query_base64_url_request(*, value: bytes, **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_base64_url_array_request(*, value: list[bytes], **kwargs: Any) -> HttpRequest: +def build_bytes_client_query_base64_url_array_request( # pylint: disable=name-too-long + *, value: list[bytes], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -73,14 +77,14 @@ def build_query_base64_url_array_request(*, value: list[bytes], **kwargs: Any) - return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class BytesClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`query` attribute. + :attr:`bytes_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,7 +116,7 @@ def default(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_bytes_client_query_default_request( value=value, headers=_headers, params=_params, @@ -156,7 +160,7 @@ def base64(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_request( + _request = build_bytes_client_query_base64_request( value=value, headers=_headers, params=_params, @@ -200,7 +204,7 @@ def base64_url(self, *, value: bytes, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_request( + _request = build_bytes_client_query_base64_url_request( value=value, headers=_headers, params=_params, @@ -246,7 +250,7 @@ def base64_url_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_base64_url_array_request( + _request = build_bytes_client_query_base64_url_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py index 8c01ce0db9..08ca88f851 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import RequestBodyOperations # type: ignore +from ._operations import BytesClientRequestBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "RequestBodyOperations", + "BytesClientRequestBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py index 0e560e5111..776426fab1 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/aio/operations/_operations.py @@ -20,25 +20,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_request_body_base64_request, - build_request_body_base64_url_request, - build_request_body_custom_content_type_request, - build_request_body_default_request, - build_request_body_octet_stream_request, + build_bytes_client_request_body_base64_request, + build_bytes_client_request_body_base64_url_request, + build_bytes_client_request_body_custom_content_type_request, + build_bytes_client_request_body_default_request, + build_bytes_client_request_body_octet_stream_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class RequestBodyOperations: +class BytesClientRequestBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`request_body` attribute. + :attr:`bytes_client_request_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -73,7 +73,7 @@ async def default(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_default_request( + _request = build_bytes_client_request_body_default_request( content_type=content_type, content=_content, headers=_headers, @@ -121,7 +121,7 @@ async def octet_stream(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_octet_stream_request( + _request = build_bytes_client_request_body_octet_stream_request( content_type=content_type, content=_content, headers=_headers, @@ -169,7 +169,7 @@ async def custom_content_type(self, value: bytes, **kwargs: Any) -> None: _content = value - _request = build_request_body_custom_content_type_request( + _request = build_bytes_client_request_body_custom_content_type_request( content_type=content_type, content=_content, headers=_headers, @@ -217,7 +217,7 @@ async def base64(self, value: bytes, **kwargs: Any) -> None: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64") # type: ignore - _request = build_request_body_base64_request( + _request = build_bytes_client_request_body_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -265,7 +265,7 @@ async def base64_url(self, value: bytes, **kwargs: Any) -> None: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64url") # type: ignore - _request = build_request_body_base64_url_request( + _request = build_bytes_client_request_body_base64_url_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py index 8c01ce0db9..08ca88f851 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import RequestBodyOperations # type: ignore +from ._operations import BytesClientRequestBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "RequestBodyOperations", + "BytesClientRequestBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py index 5368758c6b..5870232b76 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/requestbody/operations/_operations.py @@ -27,7 +27,7 @@ _SERIALIZER.client_side_validation = False -def build_request_body_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -40,7 +40,7 @@ def build_request_body_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -53,7 +53,9 @@ def build_request_body_octet_stream_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_custom_content_type_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_bytes_client_request_body_custom_content_type_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -66,7 +68,7 @@ def build_request_body_custom_content_type_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -79,7 +81,7 @@ def build_request_body_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -92,14 +94,14 @@ def build_request_body_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class RequestBodyOperations: +class BytesClientRequestBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`request_body` attribute. + :attr:`bytes_client_request_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -134,7 +136,7 @@ def default(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incon _content = value - _request = build_request_body_default_request( + _request = build_bytes_client_request_body_default_request( content_type=content_type, content=_content, headers=_headers, @@ -182,7 +184,7 @@ def octet_stream(self, value: bytes, **kwargs: Any) -> None: # pylint: disable= _content = value - _request = build_request_body_octet_stream_request( + _request = build_bytes_client_request_body_octet_stream_request( content_type=content_type, content=_content, headers=_headers, @@ -232,7 +234,7 @@ def custom_content_type( # pylint: disable=inconsistent-return-statements _content = value - _request = build_request_body_custom_content_type_request( + _request = build_bytes_client_request_body_custom_content_type_request( content_type=content_type, content=_content, headers=_headers, @@ -280,7 +282,7 @@ def base64(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=incons _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64") # type: ignore - _request = build_request_body_base64_request( + _request = build_bytes_client_request_body_base64_request( content_type=content_type, content=_content, headers=_headers, @@ -328,7 +330,7 @@ def base64_url(self, value: bytes, **kwargs: Any) -> None: # pylint: disable=in _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True, format="base64url") # type: ignore - _request = build_request_body_base64_url_request( + _request = build_bytes_client_request_body_base64_url_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py index fc9cf61db5..7f0bb233e7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseBodyOperations # type: ignore +from ._operations import BytesClientResponseBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseBodyOperations", + "BytesClientResponseBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py index 1ca67287ea..50bf8a1ed1 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/aio/operations/_operations.py @@ -20,25 +20,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BytesClientConfiguration from ...operations._operations import ( - build_response_body_base64_request, - build_response_body_base64_url_request, - build_response_body_custom_content_type_request, - build_response_body_default_request, - build_response_body_octet_stream_request, + build_bytes_client_response_body_base64_request, + build_bytes_client_response_body_base64_url_request, + build_bytes_client_response_body_custom_content_type_request, + build_bytes_client_response_body_default_request, + build_bytes_client_response_body_octet_stream_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ResponseBodyOperations: +class BytesClientResponseBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.aio.BytesClient`'s - :attr:`response_body` attribute. + :attr:`bytes_client_response_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ async def default(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_default_request( + _request = build_bytes_client_response_body_default_request( headers=_headers, params=_params, ) @@ -118,7 +118,7 @@ async def octet_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_octet_stream_request( + _request = build_bytes_client_response_body_octet_stream_request( headers=_headers, params=_params, ) @@ -171,7 +171,7 @@ async def custom_content_type(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_custom_content_type_request( + _request = build_bytes_client_response_body_custom_content_type_request( headers=_headers, params=_params, ) @@ -224,7 +224,7 @@ async def base64(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_request( + _request = build_bytes_client_response_body_base64_request( headers=_headers, params=_params, ) @@ -280,7 +280,7 @@ async def base64_url(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_url_request( + _request = build_bytes_client_response_body_base64_url_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py index fc9cf61db5..7f0bb233e7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseBodyOperations # type: ignore +from ._operations import BytesClientResponseBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseBodyOperations", + "BytesClientResponseBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py index 152dcc8aeb..cd89cb5693 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-bytes/encode/bytes/responsebody/operations/_operations.py @@ -28,7 +28,7 @@ _SERIALIZER.client_side_validation = False -def build_response_body_default_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/octet-stream") @@ -42,7 +42,9 @@ def build_response_body_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_octet_stream_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_octet_stream_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/octet-stream") @@ -56,7 +58,9 @@ def build_response_body_octet_stream_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_custom_content_type_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_bytes_client_response_body_custom_content_type_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "image/png") @@ -70,7 +74,7 @@ def build_response_body_custom_content_type_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_base64_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_base64_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -84,7 +88,7 @@ def build_response_body_base64_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: +def build_bytes_client_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -98,14 +102,14 @@ def build_response_body_base64_url_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class ResponseBodyOperations: +class BytesClientResponseBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.bytes.BytesClient`'s - :attr:`response_body` attribute. + :attr:`bytes_client_response_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -135,7 +139,7 @@ def default(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_default_request( + _request = build_bytes_client_response_body_default_request( headers=_headers, params=_params, ) @@ -185,7 +189,7 @@ def octet_stream(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_octet_stream_request( + _request = build_bytes_client_response_body_octet_stream_request( headers=_headers, params=_params, ) @@ -238,7 +242,7 @@ def custom_content_type(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_response_body_custom_content_type_request( + _request = build_bytes_client_response_body_custom_content_type_request( headers=_headers, params=_params, ) @@ -291,7 +295,7 @@ def base64(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_request( + _request = build_bytes_client_response_body_base64_request( headers=_headers, params=_params, ) @@ -347,7 +351,7 @@ def base64_url(self, **kwargs: Any) -> bytes: cls: ClsType[bytes] = kwargs.pop("cls", None) - _request = build_response_body_base64_url_request( + _request = build_bytes_client_response_body_base64_url_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_client.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_client.py index e30653f26a..70bbdbcb2e 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/_client.py @@ -9,23 +9,24 @@ from ._configuration import DatetimeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .property.operations import PropertyOperations -from .query.operations import QueryOperations -from .responseheader.operations import ResponseHeaderOperations +from .header.operations import DatetimeClientHeaderOperations +from .property.operations import DatetimeClientPropertyOperations +from .query.operations import DatetimeClientQueryOperations +from .responseheader.operations import DatetimeClientResponseHeaderOperations class DatetimeClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on datetime. - :ivar query: QueryOperations operations - :vartype query: encode.datetime.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.datetime.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.datetime.operations.HeaderOperations - :ivar response_header: ResponseHeaderOperations operations - :vartype response_header: encode.datetime.operations.ResponseHeaderOperations + :ivar datetime_client_query: DatetimeClientQueryOperations operations + :vartype datetime_client_query: encode.datetime.operations.DatetimeClientQueryOperations + :ivar datetime_client_property: DatetimeClientPropertyOperations operations + :vartype datetime_client_property: encode.datetime.operations.DatetimeClientPropertyOperations + :ivar datetime_client_header: DatetimeClientHeaderOperations operations + :vartype datetime_client_header: encode.datetime.operations.DatetimeClientHeaderOperations + :ivar datetime_client_response_header: DatetimeClientResponseHeaderOperations operations + :vartype datetime_client_response_header: + encode.datetime.operations.DatetimeClientResponseHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -52,10 +53,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_header = ResponseHeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_client_query = DatetimeClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_property = DatetimeClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_header = DatetimeClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_response_header = DatetimeClientResponseHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/_client.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/_client.py index 9cc99d98c7..32b50f6706 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/aio/_client.py @@ -8,24 +8,26 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..property.aio.operations import PropertyOperations -from ..query.aio.operations import QueryOperations -from ..responseheader.aio.operations import ResponseHeaderOperations +from ..header.aio.operations import DatetimeClientHeaderOperations +from ..property.aio.operations import DatetimeClientPropertyOperations +from ..query.aio.operations import DatetimeClientQueryOperations +from ..responseheader.aio.operations import DatetimeClientResponseHeaderOperations from ._configuration import DatetimeClientConfiguration class DatetimeClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on datetime. - :ivar query: QueryOperations operations - :vartype query: encode.datetime.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.datetime.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.datetime.aio.operations.HeaderOperations - :ivar response_header: ResponseHeaderOperations operations - :vartype response_header: encode.datetime.aio.operations.ResponseHeaderOperations + :ivar datetime_client_query: DatetimeClientQueryOperations operations + :vartype datetime_client_query: encode.datetime.aio.operations.DatetimeClientQueryOperations + :ivar datetime_client_property: DatetimeClientPropertyOperations operations + :vartype datetime_client_property: + encode.datetime.aio.operations.DatetimeClientPropertyOperations + :ivar datetime_client_header: DatetimeClientHeaderOperations operations + :vartype datetime_client_header: encode.datetime.aio.operations.DatetimeClientHeaderOperations + :ivar datetime_client_response_header: DatetimeClientResponseHeaderOperations operations + :vartype datetime_client_response_header: + encode.datetime.aio.operations.DatetimeClientResponseHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -52,10 +54,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) - self.response_header = ResponseHeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.datetime_client_query = DatetimeClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_property = DatetimeClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_header = DatetimeClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.datetime_client_response_header = DatetimeClientResponseHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py index 8e39e7642d..5116fd7db1 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DatetimeClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DatetimeClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py index c0adab36b3..1aa39066af 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/aio/operations/_operations.py @@ -18,25 +18,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_header_default_request, - build_header_rfc3339_request, - build_header_rfc7231_request, - build_header_unix_timestamp_array_request, - build_header_unix_timestamp_request, + build_datetime_client_header_default_request, + build_datetime_client_header_rfc3339_request, + build_datetime_client_header_rfc7231_request, + build_datetime_client_header_unix_timestamp_array_request, + build_datetime_client_header_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class DatetimeClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`header` attribute. + :attr:`datetime_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_datetime_client_header_default_request( value=value, headers=_headers, params=_params, @@ -112,7 +112,7 @@ async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc3339_request( + _request = build_datetime_client_header_rfc3339_request( value=value, headers=_headers, params=_params, @@ -156,7 +156,7 @@ async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc7231_request( + _request = build_datetime_client_header_rfc7231_request( value=value, headers=_headers, params=_params, @@ -200,7 +200,7 @@ async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_request( + _request = build_datetime_client_header_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -244,7 +244,7 @@ async def unix_timestamp_array(self, *, value: list[datetime.datetime], **kwargs cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_array_request( + _request = build_datetime_client_header_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/__init__.py index 8e39e7642d..5116fd7db1 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DatetimeClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DatetimeClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/_operations.py index 783d3acf57..c73a59e20a 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/header/operations/_operations.py @@ -26,7 +26,9 @@ _SERIALIZER.client_side_validation = False -def build_header_default_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_default_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -38,7 +40,9 @@ def build_header_default_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_rfc3339_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -50,7 +54,9 @@ def build_header_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_rfc7231_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -62,7 +68,9 @@ def build_header_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_unix_timestamp_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_header_unix_timestamp_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -74,7 +82,7 @@ def build_header_unix_timestamp_request(*, value: datetime.datetime, **kwargs: A return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_unix_timestamp_array_request( # pylint: disable=name-too-long +def build_datetime_client_header_unix_timestamp_array_request( # pylint: disable=name-too-long *, value: list[datetime.datetime], **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -88,14 +96,14 @@ def build_header_unix_timestamp_array_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class DatetimeClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`header` attribute. + :attr:`datetime_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -129,7 +137,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_datetime_client_header_default_request( value=value, headers=_headers, params=_params, @@ -175,7 +183,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc3339_request( + _request = build_datetime_client_header_rfc3339_request( value=value, headers=_headers, params=_params, @@ -221,7 +229,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_rfc7231_request( + _request = build_datetime_client_header_rfc7231_request( value=value, headers=_headers, params=_params, @@ -267,7 +275,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_request( + _request = build_datetime_client_header_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -313,7 +321,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_unix_timestamp_array_request( + _request = build_datetime_client_header_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py index 02fe504541..e162479cdd 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DatetimeClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DatetimeClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py index 28c1a194f9..457f5345c7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/aio/operations/_operations.py @@ -24,11 +24,11 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_property_default_request, - build_property_rfc3339_request, - build_property_rfc7231_request, - build_property_unix_timestamp_array_request, - build_property_unix_timestamp_request, + build_datetime_client_property_default_request, + build_datetime_client_property_rfc3339_request, + build_datetime_client_property_rfc7231_request, + build_datetime_client_property_unix_timestamp_array_request, + build_datetime_client_property_unix_timestamp_request, ) JSON = MutableMapping[str, Any] @@ -36,14 +36,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class DatetimeClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`property` attribute. + :attr:`datetime_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +133,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_datetime_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -248,7 +248,7 @@ async def rfc3339( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc3339_request( + _request = build_datetime_client_property_rfc3339_request( content_type=content_type, content=_content, headers=_headers, @@ -363,7 +363,7 @@ async def rfc7231( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc7231_request( + _request = build_datetime_client_property_rfc7231_request( content_type=content_type, content=_content, headers=_headers, @@ -483,7 +483,7 @@ async def unix_timestamp( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_request( + _request = build_datetime_client_property_unix_timestamp_request( content_type=content_type, content=_content, headers=_headers, @@ -607,7 +607,7 @@ async def unix_timestamp_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_array_request( + _request = build_datetime_client_property_unix_timestamp_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/__init__.py index 02fe504541..e162479cdd 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DatetimeClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DatetimeClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/_operations.py index 1890981488..051fc8adaa 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/property/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -49,7 +49,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_rfc3339_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_rfc3339_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -66,7 +66,7 @@ def build_property_rfc3339_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_rfc7231_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_rfc7231_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -83,7 +83,9 @@ def build_property_rfc7231_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_unix_timestamp_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_property_unix_timestamp_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -100,7 +102,9 @@ def build_property_unix_timestamp_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_unix_timestamp_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_datetime_client_property_unix_timestamp_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -117,14 +121,14 @@ def build_property_unix_timestamp_array_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class DatetimeClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`property` attribute. + :attr:`datetime_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -214,7 +218,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_datetime_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -329,7 +333,7 @@ def rfc3339( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc3339_request( + _request = build_datetime_client_property_rfc3339_request( content_type=content_type, content=_content, headers=_headers, @@ -444,7 +448,7 @@ def rfc7231( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_rfc7231_request( + _request = build_datetime_client_property_rfc7231_request( content_type=content_type, content=_content, headers=_headers, @@ -564,7 +568,7 @@ def unix_timestamp( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_request( + _request = build_datetime_client_property_unix_timestamp_request( content_type=content_type, content=_content, headers=_headers, @@ -605,7 +609,7 @@ def unix_timestamp_array( body: _models2.UnixTimestampArrayDatetimeProperty, *, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> _models2.UnixTimestampArrayDatetimeProperty: """unix_timestamp_array. @@ -688,7 +692,7 @@ def unix_timestamp_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_unix_timestamp_array_request( + _request = build_datetime_client_property_unix_timestamp_array_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py index 2f5d3ef93d..97a1d89126 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DatetimeClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DatetimeClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py index 90dfe49e13..35d8896278 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/aio/operations/_operations.py @@ -18,25 +18,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_query_default_request, - build_query_rfc3339_request, - build_query_rfc7231_request, - build_query_unix_timestamp_array_request, - build_query_unix_timestamp_request, + build_datetime_client_query_default_request, + build_datetime_client_query_rfc3339_request, + build_datetime_client_query_rfc7231_request, + build_datetime_client_query_unix_timestamp_array_request, + build_datetime_client_query_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class DatetimeClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`query` attribute. + :attr:`datetime_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ async def default(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_datetime_client_query_default_request( value=value, headers=_headers, params=_params, @@ -112,7 +112,7 @@ async def rfc3339(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc3339_request( + _request = build_datetime_client_query_rfc3339_request( value=value, headers=_headers, params=_params, @@ -156,7 +156,7 @@ async def rfc7231(self, *, value: datetime.datetime, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc7231_request( + _request = build_datetime_client_query_rfc7231_request( value=value, headers=_headers, params=_params, @@ -200,7 +200,7 @@ async def unix_timestamp(self, *, value: datetime.datetime, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_request( + _request = build_datetime_client_query_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -244,7 +244,7 @@ async def unix_timestamp_array(self, *, value: list[datetime.datetime], **kwargs cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_array_request( + _request = build_datetime_client_query_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/__init__.py index 2f5d3ef93d..97a1d89126 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DatetimeClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DatetimeClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/_operations.py index 462533b46e..6930ddf1b7 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/query/operations/_operations.py @@ -26,7 +26,9 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_default_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -38,7 +40,9 @@ def build_query_default_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_rfc3339_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -50,7 +54,9 @@ def build_query_rfc3339_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_rfc7231_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -62,7 +68,9 @@ def build_query_rfc7231_request(*, value: datetime.datetime, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_unix_timestamp_request(*, value: datetime.datetime, **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_unix_timestamp_request( # pylint: disable=name-too-long + *, value: datetime.datetime, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -74,7 +82,9 @@ def build_query_unix_timestamp_request(*, value: datetime.datetime, **kwargs: An return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_unix_timestamp_array_request(*, value: list[datetime.datetime], **kwargs: Any) -> HttpRequest: +def build_datetime_client_query_unix_timestamp_array_request( # pylint: disable=name-too-long + *, value: list[datetime.datetime], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -86,14 +96,14 @@ def build_query_unix_timestamp_array_request(*, value: list[datetime.datetime], return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class DatetimeClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`query` attribute. + :attr:`datetime_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -127,7 +137,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_datetime_client_query_default_request( value=value, headers=_headers, params=_params, @@ -173,7 +183,7 @@ def rfc3339( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc3339_request( + _request = build_datetime_client_query_rfc3339_request( value=value, headers=_headers, params=_params, @@ -219,7 +229,7 @@ def rfc7231( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_rfc7231_request( + _request = build_datetime_client_query_rfc7231_request( value=value, headers=_headers, params=_params, @@ -265,7 +275,7 @@ def unix_timestamp( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_request( + _request = build_datetime_client_query_unix_timestamp_request( value=value, headers=_headers, params=_params, @@ -311,7 +321,7 @@ def unix_timestamp_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_unix_timestamp_array_request( + _request = build_datetime_client_query_unix_timestamp_array_request( value=value, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py index 9b5f272c65..9a61171278 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseHeaderOperations # type: ignore +from ._operations import DatetimeClientResponseHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseHeaderOperations", + "DatetimeClientResponseHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py index 9eaa3b2f01..7348092736 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/aio/operations/_operations.py @@ -17,24 +17,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DatetimeClientConfiguration from ...operations._operations import ( - build_response_header_default_request, - build_response_header_rfc3339_request, - build_response_header_rfc7231_request, - build_response_header_unix_timestamp_request, + build_datetime_client_response_header_default_request, + build_datetime_client_response_header_rfc3339_request, + build_datetime_client_response_header_rfc7231_request, + build_datetime_client_response_header_unix_timestamp_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ResponseHeaderOperations: +class DatetimeClientResponseHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.aio.DatetimeClient`'s - :attr:`response_header` attribute. + :attr:`datetime_client_response_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -64,7 +64,7 @@ async def default(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_default_request( + _request = build_datetime_client_response_header_default_request( headers=_headers, params=_params, ) @@ -108,7 +108,7 @@ async def rfc3339(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc3339_request( + _request = build_datetime_client_response_header_rfc3339_request( headers=_headers, params=_params, ) @@ -152,7 +152,7 @@ async def rfc7231(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc7231_request( + _request = build_datetime_client_response_header_rfc7231_request( headers=_headers, params=_params, ) @@ -196,7 +196,7 @@ async def unix_timestamp(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_unix_timestamp_request( + _request = build_datetime_client_response_header_unix_timestamp_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py index 9b5f272c65..9a61171278 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ResponseHeaderOperations # type: ignore +from ._operations import DatetimeClientResponseHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ResponseHeaderOperations", + "DatetimeClientResponseHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py index f6b7419e8f..0b3f3e4088 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-datetime/encode/datetime/responseheader/operations/_operations.py @@ -24,42 +24,50 @@ _SERIALIZER.client_side_validation = False -def build_response_header_default_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/default" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_rfc3339_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_rfc3339_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/rfc3339" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_rfc7231_request(**kwargs: Any) -> HttpRequest: +def build_datetime_client_response_header_rfc7231_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/rfc7231" return HttpRequest(method="GET", url=_url, **kwargs) -def build_response_header_unix_timestamp_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_datetime_client_response_header_unix_timestamp_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/encode/datetime/responseheader/unix-timestamp" return HttpRequest(method="GET", url=_url, **kwargs) -class ResponseHeaderOperations: +class DatetimeClientResponseHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.datetime.DatetimeClient`'s - :attr:`response_header` attribute. + :attr:`datetime_client_response_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -89,7 +97,7 @@ def default(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_default_request( + _request = build_datetime_client_response_header_default_request( headers=_headers, params=_params, ) @@ -133,7 +141,7 @@ def rfc3339(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc3339_request( + _request = build_datetime_client_response_header_rfc3339_request( headers=_headers, params=_params, ) @@ -177,7 +185,7 @@ def rfc7231(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_rfc7231_request( + _request = build_datetime_client_response_header_rfc7231_request( headers=_headers, params=_params, ) @@ -221,7 +229,7 @@ def unix_timestamp(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_response_header_unix_timestamp_request( + _request = build_datetime_client_response_header_unix_timestamp_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_client.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_client.py index 10feef8b77..774924ecd4 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/_client.py @@ -9,20 +9,20 @@ from ._configuration import DurationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .property.operations import PropertyOperations -from .query.operations import QueryOperations +from .header.operations import DurationClientHeaderOperations +from .property.operations import DurationClientPropertyOperations +from .query.operations import DurationClientQueryOperations class DurationClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on duration. - :ivar query: QueryOperations operations - :vartype query: encode.duration.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.duration.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.duration.operations.HeaderOperations + :ivar duration_client_query: DurationClientQueryOperations operations + :vartype duration_client_query: encode.duration.operations.DurationClientQueryOperations + :ivar duration_client_property: DurationClientPropertyOperations operations + :vartype duration_client_property: encode.duration.operations.DurationClientPropertyOperations + :ivar duration_client_header: DurationClientHeaderOperations operations + :vartype duration_client_header: encode.duration.operations.DurationClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -49,9 +49,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_client_query = DurationClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_property = DurationClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_header = DurationClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/_client.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/_client.py index b24a09c6f3..46ea042ee5 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/aio/_client.py @@ -8,21 +8,22 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..property.aio.operations import PropertyOperations -from ..query.aio.operations import QueryOperations +from ..header.aio.operations import DurationClientHeaderOperations +from ..property.aio.operations import DurationClientPropertyOperations +from ..query.aio.operations import DurationClientQueryOperations from ._configuration import DurationClientConfiguration class DurationClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on duration. - :ivar query: QueryOperations operations - :vartype query: encode.duration.aio.operations.QueryOperations - :ivar property: PropertyOperations operations - :vartype property: encode.duration.aio.operations.PropertyOperations - :ivar header: HeaderOperations operations - :vartype header: encode.duration.aio.operations.HeaderOperations + :ivar duration_client_query: DurationClientQueryOperations operations + :vartype duration_client_query: encode.duration.aio.operations.DurationClientQueryOperations + :ivar duration_client_property: DurationClientPropertyOperations operations + :vartype duration_client_property: + encode.duration.aio.operations.DurationClientPropertyOperations + :ivar duration_client_header: DurationClientHeaderOperations operations + :vartype duration_client_header: encode.duration.aio.operations.DurationClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -49,9 +50,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.duration_client_query = DurationClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_property = DurationClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.duration_client_header = DurationClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/__init__.py index 8e39e7642d..5f3ce41892 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DurationClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DurationClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/_operations.py index 9330358873..28e491985d 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/aio/operations/_operations.py @@ -18,34 +18,34 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DurationClientConfiguration from ...operations._operations import ( - build_header_default_request, - build_header_float64_milliseconds_request, - build_header_float64_seconds_request, - build_header_float_milliseconds_larger_unit_request, - build_header_float_milliseconds_request, - build_header_float_seconds_larger_unit_request, - build_header_float_seconds_request, - build_header_int32_milliseconds_array_request, - build_header_int32_milliseconds_larger_unit_request, - build_header_int32_milliseconds_request, - build_header_int32_seconds_larger_unit_request, - build_header_int32_seconds_request, - build_header_iso8601_array_request, - build_header_iso8601_request, + build_duration_client_header_default_request, + build_duration_client_header_float64_milliseconds_request, + build_duration_client_header_float64_seconds_request, + build_duration_client_header_float_milliseconds_larger_unit_request, + build_duration_client_header_float_milliseconds_request, + build_duration_client_header_float_seconds_larger_unit_request, + build_duration_client_header_float_seconds_request, + build_duration_client_header_int32_milliseconds_array_request, + build_duration_client_header_int32_milliseconds_larger_unit_request, + build_duration_client_header_int32_milliseconds_request, + build_duration_client_header_int32_seconds_larger_unit_request, + build_duration_client_header_int32_seconds_request, + build_duration_client_header_iso8601_array_request, + build_duration_client_header_iso8601_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class DurationClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`header` attribute. + :attr:`duration_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -77,7 +77,7 @@ async def default(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_duration_client_header_default_request( duration=duration, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def iso8601(self, *, duration: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_request( + _request = build_duration_client_header_iso8601_request( duration=duration, headers=_headers, params=_params, @@ -165,7 +165,7 @@ async def iso8601_array(self, *, duration: list[datetime.timedelta], **kwargs: A cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_array_request( + _request = build_duration_client_header_iso8601_array_request( duration=duration, headers=_headers, params=_params, @@ -209,7 +209,7 @@ async def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_request( + _request = build_duration_client_header_int32_seconds_request( duration=duration, headers=_headers, params=_params, @@ -253,7 +253,7 @@ async def int32_seconds_larger_unit(self, *, duration: int, **kwargs: Any) -> No cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_larger_unit_request( + _request = build_duration_client_header_int32_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -297,7 +297,7 @@ async def float_seconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_request( + _request = build_duration_client_header_float_seconds_request( duration=duration, headers=_headers, params=_params, @@ -341,7 +341,7 @@ async def float_seconds_larger_unit(self, *, duration: float, **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_larger_unit_request( + _request = build_duration_client_header_float_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -385,7 +385,7 @@ async def float64_seconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_seconds_request( + _request = build_duration_client_header_float64_seconds_request( duration=duration, headers=_headers, params=_params, @@ -429,7 +429,7 @@ async def int32_milliseconds(self, *, duration: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_request( + _request = build_duration_client_header_int32_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -473,7 +473,7 @@ async def int32_milliseconds_larger_unit(self, *, duration: int, **kwargs: Any) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_larger_unit_request( + _request = build_duration_client_header_int32_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -517,7 +517,7 @@ async def float_milliseconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_request( + _request = build_duration_client_header_float_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -561,7 +561,7 @@ async def float_milliseconds_larger_unit(self, *, duration: float, **kwargs: Any cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_larger_unit_request( + _request = build_duration_client_header_float_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -605,7 +605,7 @@ async def float64_milliseconds(self, *, duration: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_milliseconds_request( + _request = build_duration_client_header_float64_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -649,7 +649,7 @@ async def int32_milliseconds_array(self, *, duration: list[int], **kwargs: Any) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_array_request( + _request = build_duration_client_header_int32_milliseconds_array_request( duration=duration, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/__init__.py index 8e39e7642d..5f3ce41892 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import DurationClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "DurationClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/_operations.py index 2b55253d6b..7b77dee24d 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/header/operations/_operations.py @@ -26,7 +26,9 @@ _SERIALIZER.client_side_validation = False -def build_header_default_request(*, duration: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_default_request( # pylint: disable=name-too-long + *, duration: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -38,7 +40,9 @@ def build_header_default_request(*, duration: datetime.timedelta, **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_iso8601_request(*, duration: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_iso8601_request( # pylint: disable=name-too-long + *, duration: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -50,7 +54,9 @@ def build_header_iso8601_request(*, duration: datetime.timedelta, **kwargs: Any) return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_iso8601_array_request(*, duration: list[datetime.timedelta], **kwargs: Any) -> HttpRequest: +def build_duration_client_header_iso8601_array_request( # pylint: disable=name-too-long + *, duration: list[datetime.timedelta], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -62,7 +68,9 @@ def build_header_iso8601_array_request(*, duration: list[datetime.timedelta], ** return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_seconds_request(*, duration: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_int32_seconds_request( # pylint: disable=name-too-long + *, duration: int, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -74,7 +82,7 @@ def build_header_int32_seconds_request(*, duration: int, **kwargs: Any) -> HttpR return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_seconds_larger_unit_request( # pylint: disable=name-too-long *, duration: int, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -88,7 +96,9 @@ def build_header_int32_seconds_larger_unit_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_seconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float_seconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -100,7 +110,7 @@ def build_header_float_seconds_request(*, duration: float, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_float_seconds_larger_unit_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -114,7 +124,9 @@ def build_header_float_seconds_larger_unit_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float64_seconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float64_seconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -126,7 +138,9 @@ def build_header_float64_seconds_request(*, duration: float, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_request(*, duration: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_int32_milliseconds_request( # pylint: disable=name-too-long + *, duration: int, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -138,7 +152,7 @@ def build_header_int32_milliseconds_request(*, duration: int, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, duration: int, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -152,7 +166,9 @@ def build_header_int32_milliseconds_larger_unit_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_milliseconds_request(*, duration: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_header_float_milliseconds_request( # pylint: disable=name-too-long + *, duration: float, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -164,7 +180,7 @@ def build_header_float_milliseconds_request(*, duration: float, **kwargs: Any) - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_header_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -178,7 +194,7 @@ def build_header_float_milliseconds_larger_unit_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_float64_milliseconds_request( # pylint: disable=name-too-long +def build_duration_client_header_float64_milliseconds_request( # pylint: disable=name-too-long *, duration: float, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -192,7 +208,7 @@ def build_header_float64_milliseconds_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_header_int32_milliseconds_array_request( # pylint: disable=name-too-long +def build_duration_client_header_int32_milliseconds_array_request( # pylint: disable=name-too-long *, duration: list[int], **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -206,14 +222,14 @@ def build_header_int32_milliseconds_array_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class DurationClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`header` attribute. + :attr:`duration_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -247,7 +263,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_default_request( + _request = build_duration_client_header_default_request( duration=duration, headers=_headers, params=_params, @@ -293,7 +309,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_request( + _request = build_duration_client_header_iso8601_request( duration=duration, headers=_headers, params=_params, @@ -339,7 +355,7 @@ def iso8601_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_iso8601_array_request( + _request = build_duration_client_header_iso8601_array_request( duration=duration, headers=_headers, params=_params, @@ -383,7 +399,7 @@ def int32_seconds(self, *, duration: int, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_request( + _request = build_duration_client_header_int32_seconds_request( duration=duration, headers=_headers, params=_params, @@ -429,7 +445,7 @@ def int32_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_seconds_larger_unit_request( + _request = build_duration_client_header_int32_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -475,7 +491,7 @@ def float_seconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_request( + _request = build_duration_client_header_float_seconds_request( duration=duration, headers=_headers, params=_params, @@ -521,7 +537,7 @@ def float_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_seconds_larger_unit_request( + _request = build_duration_client_header_float_seconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -567,7 +583,7 @@ def float64_seconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_seconds_request( + _request = build_duration_client_header_float64_seconds_request( duration=duration, headers=_headers, params=_params, @@ -613,7 +629,7 @@ def int32_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_request( + _request = build_duration_client_header_int32_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -659,7 +675,7 @@ def int32_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_larger_unit_request( + _request = build_duration_client_header_int32_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -705,7 +721,7 @@ def float_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_request( + _request = build_duration_client_header_float_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -751,7 +767,7 @@ def float_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float_milliseconds_larger_unit_request( + _request = build_duration_client_header_float_milliseconds_larger_unit_request( duration=duration, headers=_headers, params=_params, @@ -797,7 +813,7 @@ def float64_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_float64_milliseconds_request( + _request = build_duration_client_header_float64_milliseconds_request( duration=duration, headers=_headers, params=_params, @@ -843,7 +859,7 @@ def int32_milliseconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_int32_milliseconds_array_request( + _request = build_duration_client_header_int32_milliseconds_array_request( duration=duration, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/__init__.py index 02fe504541..2798d87cc9 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DurationClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DurationClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/_operations.py index a1e78239f8..9f35a8986f 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/_operations.py @@ -25,20 +25,20 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DurationClientConfiguration from ...operations._operations import ( - build_property_default_request, - build_property_float64_milliseconds_request, - build_property_float64_seconds_request, - build_property_float_milliseconds_array_request, - build_property_float_milliseconds_larger_unit_request, - build_property_float_milliseconds_request, - build_property_float_seconds_array_request, - build_property_float_seconds_larger_unit_request, - build_property_float_seconds_request, - build_property_int32_milliseconds_larger_unit_request, - build_property_int32_milliseconds_request, - build_property_int32_seconds_larger_unit_request, - build_property_int32_seconds_request, - build_property_iso8601_request, + build_duration_client_property_default_request, + build_duration_client_property_float64_milliseconds_request, + build_duration_client_property_float64_seconds_request, + build_duration_client_property_float_milliseconds_array_request, + build_duration_client_property_float_milliseconds_larger_unit_request, + build_duration_client_property_float_milliseconds_request, + build_duration_client_property_float_seconds_array_request, + build_duration_client_property_float_seconds_larger_unit_request, + build_duration_client_property_float_seconds_request, + build_duration_client_property_int32_milliseconds_larger_unit_request, + build_duration_client_property_int32_milliseconds_request, + build_duration_client_property_int32_seconds_larger_unit_request, + build_duration_client_property_int32_seconds_request, + build_duration_client_property_iso8601_request, ) JSON = MutableMapping[str, Any] @@ -46,14 +46,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class DurationClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`property` attribute. + :attr:`duration_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -143,7 +143,7 @@ async def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_duration_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -258,7 +258,7 @@ async def iso8601( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_iso8601_request( + _request = build_duration_client_property_iso8601_request( content_type=content_type, content=_content, headers=_headers, @@ -378,7 +378,7 @@ async def int32_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_request( + _request = build_duration_client_property_int32_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -498,7 +498,7 @@ async def float_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_request( + _request = build_duration_client_property_float_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -619,7 +619,7 @@ async def float64_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_seconds_request( + _request = build_duration_client_property_float64_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -740,7 +740,7 @@ async def int32_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_request( + _request = build_duration_client_property_int32_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -861,7 +861,7 @@ async def float_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_request( + _request = build_duration_client_property_float_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -986,7 +986,7 @@ async def float64_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_milliseconds_request( + _request = build_duration_client_property_float64_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1107,7 +1107,7 @@ async def float_seconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_array_request( + _request = build_duration_client_property_float_seconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -1232,7 +1232,7 @@ async def float_milliseconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_array_request( + _request = build_duration_client_property_float_milliseconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -1357,7 +1357,7 @@ async def int32_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_larger_unit_request( + _request = build_duration_client_property_int32_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1482,7 +1482,7 @@ async def float_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_larger_unit_request( + _request = build_duration_client_property_float_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1607,7 +1607,7 @@ async def int32_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_larger_unit_request( + _request = build_duration_client_property_int32_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1732,7 +1732,7 @@ async def float_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_larger_unit_request( + _request = build_duration_client_property_float_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/__init__.py index 02fe504541..2798d87cc9 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import DurationClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "DurationClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/_operations.py index af53444701..ed75494ac2 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/operations/_operations.py @@ -33,7 +33,7 @@ _SERIALIZER.client_side_validation = False -def build_property_default_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -50,7 +50,7 @@ def build_property_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_iso8601_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_iso8601_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -67,7 +67,7 @@ def build_property_iso8601_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -84,7 +84,7 @@ def build_property_int32_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_float_seconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -101,7 +101,9 @@ def build_property_float_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float64_seconds_request(**kwargs: Any) -> HttpRequest: +def build_duration_client_property_float64_seconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -118,7 +120,9 @@ def build_property_float64_seconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_int32_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -135,7 +139,9 @@ def build_property_int32_milliseconds_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -152,7 +158,9 @@ def build_property_float_milliseconds_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float64_milliseconds_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float64_milliseconds_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -169,7 +177,9 @@ def build_property_float64_milliseconds_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_seconds_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -186,7 +196,9 @@ def build_property_float_seconds_array_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -203,7 +215,9 @@ def build_property_float_milliseconds_array_request(**kwargs: Any) -> HttpReques return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_seconds_larger_unit_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_int32_seconds_larger_unit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -220,7 +234,9 @@ def build_property_int32_seconds_larger_unit_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_seconds_larger_unit_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_duration_client_property_float_seconds_larger_unit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -237,7 +253,7 @@ def build_property_float_seconds_larger_unit_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_property_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -256,7 +272,7 @@ def build_property_int32_milliseconds_larger_unit_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_property_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -275,14 +291,14 @@ def build_property_float_milliseconds_larger_unit_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class DurationClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`property` attribute. + :attr:`duration_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -372,7 +388,7 @@ def default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_default_request( + _request = build_duration_client_property_default_request( content_type=content_type, content=_content, headers=_headers, @@ -487,7 +503,7 @@ def iso8601( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_iso8601_request( + _request = build_duration_client_property_iso8601_request( content_type=content_type, content=_content, headers=_headers, @@ -607,7 +623,7 @@ def int32_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_request( + _request = build_duration_client_property_int32_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -727,7 +743,7 @@ def float_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_request( + _request = build_duration_client_property_float_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -848,7 +864,7 @@ def float64_seconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_seconds_request( + _request = build_duration_client_property_float64_seconds_request( content_type=content_type, content=_content, headers=_headers, @@ -969,7 +985,7 @@ def int32_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_request( + _request = build_duration_client_property_int32_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1090,7 +1106,7 @@ def float_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_request( + _request = build_duration_client_property_float_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1215,7 +1231,7 @@ def float64_milliseconds( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float64_milliseconds_request( + _request = build_duration_client_property_float64_milliseconds_request( content_type=content_type, content=_content, headers=_headers, @@ -1336,7 +1352,7 @@ def float_seconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_array_request( + _request = build_duration_client_property_float_seconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -1461,7 +1477,7 @@ def float_milliseconds_array( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_array_request( + _request = build_duration_client_property_float_milliseconds_array_request( content_type=content_type, content=_content, headers=_headers, @@ -1586,7 +1602,7 @@ def int32_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_seconds_larger_unit_request( + _request = build_duration_client_property_int32_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1711,7 +1727,7 @@ def float_seconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_seconds_larger_unit_request( + _request = build_duration_client_property_float_seconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1836,7 +1852,7 @@ def int32_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_int32_milliseconds_larger_unit_request( + _request = build_duration_client_property_int32_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, @@ -1961,7 +1977,7 @@ def float_milliseconds_larger_unit( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_float_milliseconds_larger_unit_request( + _request = build_duration_client_property_float_milliseconds_larger_unit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/__init__.py index 2f5d3ef93d..649832690a 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DurationClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DurationClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/_operations.py index 9e7441f9c2..a461f6ed8c 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/aio/operations/_operations.py @@ -18,34 +18,34 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import DurationClientConfiguration from ...operations._operations import ( - build_query_default_request, - build_query_float64_milliseconds_request, - build_query_float64_seconds_request, - build_query_float_milliseconds_larger_unit_request, - build_query_float_milliseconds_request, - build_query_float_seconds_larger_unit_request, - build_query_float_seconds_request, - build_query_int32_milliseconds_array_request, - build_query_int32_milliseconds_larger_unit_request, - build_query_int32_milliseconds_request, - build_query_int32_seconds_array_request, - build_query_int32_seconds_larger_unit_request, - build_query_int32_seconds_request, - build_query_iso8601_request, + build_duration_client_query_default_request, + build_duration_client_query_float64_milliseconds_request, + build_duration_client_query_float64_seconds_request, + build_duration_client_query_float_milliseconds_larger_unit_request, + build_duration_client_query_float_milliseconds_request, + build_duration_client_query_float_seconds_larger_unit_request, + build_duration_client_query_float_seconds_request, + build_duration_client_query_int32_milliseconds_array_request, + build_duration_client_query_int32_milliseconds_larger_unit_request, + build_duration_client_query_int32_milliseconds_request, + build_duration_client_query_int32_seconds_array_request, + build_duration_client_query_int32_seconds_larger_unit_request, + build_duration_client_query_int32_seconds_request, + build_duration_client_query_iso8601_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class DurationClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.aio.DurationClient`'s - :attr:`query` attribute. + :attr:`duration_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -77,7 +77,7 @@ async def default(self, *, input: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_duration_client_query_default_request( input=input, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def iso8601(self, *, input: datetime.timedelta, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_iso8601_request( + _request = build_duration_client_query_iso8601_request( input=input, headers=_headers, params=_params, @@ -165,7 +165,7 @@ async def int32_seconds(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_request( + _request = build_duration_client_query_int32_seconds_request( input=input, headers=_headers, params=_params, @@ -209,7 +209,7 @@ async def int32_seconds_larger_unit(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_larger_unit_request( + _request = build_duration_client_query_int32_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -253,7 +253,7 @@ async def float_seconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_request( + _request = build_duration_client_query_float_seconds_request( input=input, headers=_headers, params=_params, @@ -297,7 +297,7 @@ async def float_seconds_larger_unit(self, *, input: float, **kwargs: Any) -> Non cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_larger_unit_request( + _request = build_duration_client_query_float_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -341,7 +341,7 @@ async def float64_seconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_seconds_request( + _request = build_duration_client_query_float64_seconds_request( input=input, headers=_headers, params=_params, @@ -385,7 +385,7 @@ async def int32_milliseconds(self, *, input: int, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_request( + _request = build_duration_client_query_int32_milliseconds_request( input=input, headers=_headers, params=_params, @@ -429,7 +429,7 @@ async def int32_milliseconds_larger_unit(self, *, input: int, **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_larger_unit_request( + _request = build_duration_client_query_int32_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -473,7 +473,7 @@ async def float_milliseconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_request( + _request = build_duration_client_query_float_milliseconds_request( input=input, headers=_headers, params=_params, @@ -517,7 +517,7 @@ async def float_milliseconds_larger_unit(self, *, input: float, **kwargs: Any) - cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_larger_unit_request( + _request = build_duration_client_query_float_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -561,7 +561,7 @@ async def float64_milliseconds(self, *, input: float, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_milliseconds_request( + _request = build_duration_client_query_float64_milliseconds_request( input=input, headers=_headers, params=_params, @@ -605,7 +605,7 @@ async def int32_seconds_array(self, *, input: list[int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_array_request( + _request = build_duration_client_query_int32_seconds_array_request( input=input, headers=_headers, params=_params, @@ -649,7 +649,7 @@ async def int32_milliseconds_array(self, *, input: list[int], **kwargs: Any) -> cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_array_request( + _request = build_duration_client_query_int32_milliseconds_array_request( input=input, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/__init__.py index 2f5d3ef93d..649832690a 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import DurationClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "DurationClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/_operations.py index 2167ca34a1..1053df2258 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/query/operations/_operations.py @@ -26,7 +26,9 @@ _SERIALIZER.client_side_validation = False -def build_query_default_request(*, input: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_default_request( # pylint: disable=name-too-long + *, input: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -38,7 +40,9 @@ def build_query_default_request(*, input: datetime.timedelta, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_iso8601_request(*, input: datetime.timedelta, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_iso8601_request( # pylint: disable=name-too-long + *, input: datetime.timedelta, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -50,7 +54,9 @@ def build_query_iso8601_request(*, input: datetime.timedelta, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_request(*, input: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_seconds_request( # pylint: disable=name-too-long + *, input: int, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -62,7 +68,7 @@ def build_query_int32_seconds_request(*, input: int, **kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-long *, input: int, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -76,7 +82,9 @@ def build_query_int32_seconds_larger_unit_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_seconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float_seconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -88,7 +96,7 @@ def build_query_float_seconds_request(*, input: float, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_seconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_float_seconds_larger_unit_request( # pylint: disable=name-too-long *, input: float, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -102,7 +110,9 @@ def build_query_float_seconds_larger_unit_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float64_seconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float64_seconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -114,7 +124,9 @@ def build_query_float64_seconds_request(*, input: float, **kwargs: Any) -> HttpR return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_request(*, input: int, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_milliseconds_request( # pylint: disable=name-too-long + *, input: int, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -126,7 +138,7 @@ def build_query_int32_milliseconds_request(*, input: int, **kwargs: Any) -> Http return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, input: int, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -140,7 +152,9 @@ def build_query_int32_milliseconds_larger_unit_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_milliseconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float_milliseconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -152,7 +166,7 @@ def build_query_float_milliseconds_request(*, input: float, **kwargs: Any) -> Ht return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long +def build_duration_client_query_float_milliseconds_larger_unit_request( # pylint: disable=name-too-long *, input: float, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -166,7 +180,9 @@ def build_query_float_milliseconds_larger_unit_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_float64_milliseconds_request(*, input: float, **kwargs: Any) -> HttpRequest: +def build_duration_client_query_float64_milliseconds_request( # pylint: disable=name-too-long + *, input: float, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -178,7 +194,9 @@ def build_query_float64_milliseconds_request(*, input: float, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_seconds_array_request(*, input: list[int], **kwargs: Any) -> HttpRequest: +def build_duration_client_query_int32_seconds_array_request( # pylint: disable=name-too-long + *, input: list[int], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -190,7 +208,7 @@ def build_query_int32_seconds_array_request(*, input: list[int], **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_int32_milliseconds_array_request( # pylint: disable=name-too-long +def build_duration_client_query_int32_milliseconds_array_request( # pylint: disable=name-too-long *, input: list[int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -204,14 +222,14 @@ def build_query_int32_milliseconds_array_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class DurationClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.duration.DurationClient`'s - :attr:`query` attribute. + :attr:`duration_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -245,7 +263,7 @@ def default( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_default_request( + _request = build_duration_client_query_default_request( input=input, headers=_headers, params=_params, @@ -291,7 +309,7 @@ def iso8601( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_iso8601_request( + _request = build_duration_client_query_iso8601_request( input=input, headers=_headers, params=_params, @@ -335,7 +353,7 @@ def int32_seconds(self, *, input: int, **kwargs: Any) -> None: # pylint: disabl cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_request( + _request = build_duration_client_query_int32_seconds_request( input=input, headers=_headers, params=_params, @@ -381,7 +399,7 @@ def int32_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_larger_unit_request( + _request = build_duration_client_query_int32_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -425,7 +443,7 @@ def float_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: disa cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_request( + _request = build_duration_client_query_float_seconds_request( input=input, headers=_headers, params=_params, @@ -471,7 +489,7 @@ def float_seconds_larger_unit( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_seconds_larger_unit_request( + _request = build_duration_client_query_float_seconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -515,7 +533,7 @@ def float64_seconds(self, *, input: float, **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_seconds_request( + _request = build_duration_client_query_float64_seconds_request( input=input, headers=_headers, params=_params, @@ -561,7 +579,7 @@ def int32_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_request( + _request = build_duration_client_query_int32_milliseconds_request( input=input, headers=_headers, params=_params, @@ -607,7 +625,7 @@ def int32_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_larger_unit_request( + _request = build_duration_client_query_int32_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -653,7 +671,7 @@ def float_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_request( + _request = build_duration_client_query_float_milliseconds_request( input=input, headers=_headers, params=_params, @@ -699,7 +717,7 @@ def float_milliseconds_larger_unit( # pylint: disable=inconsistent-return-state cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float_milliseconds_larger_unit_request( + _request = build_duration_client_query_float_milliseconds_larger_unit_request( input=input, headers=_headers, params=_params, @@ -745,7 +763,7 @@ def float64_milliseconds( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_float64_milliseconds_request( + _request = build_duration_client_query_float64_milliseconds_request( input=input, headers=_headers, params=_params, @@ -791,7 +809,7 @@ def int32_seconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_seconds_array_request( + _request = build_duration_client_query_int32_seconds_array_request( input=input, headers=_headers, params=_params, @@ -837,7 +855,7 @@ def int32_milliseconds_array( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_int32_milliseconds_array_request( + _request = build_duration_client_query_int32_milliseconds_array_request( input=input, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_client.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_client.py index ae39adff41..553a7f338e 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/_client.py @@ -9,14 +9,14 @@ from ._configuration import NumericClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .property.operations import PropertyOperations +from .property.operations import NumericClientPropertyOperations class NumericClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on integer. - :ivar property: PropertyOperations operations - :vartype property: encode.numeric.operations.PropertyOperations + :ivar numeric_client_property: NumericClientPropertyOperations operations + :vartype numeric_client_property: encode.numeric.operations.NumericClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.numeric_client_property = NumericClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/_client.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/_client.py index 0afca9d019..52a46ce1d3 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/aio/_client.py @@ -8,15 +8,15 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..property.aio.operations import PropertyOperations +from ..property.aio.operations import NumericClientPropertyOperations from ._configuration import NumericClientConfiguration class NumericClient: # pylint: disable=client-accepts-api-version-keyword """Test for encode decorator on integer. - :ivar property: PropertyOperations operations - :vartype property: encode.numeric.aio.operations.PropertyOperations + :ivar numeric_client_property: NumericClientPropertyOperations operations + :vartype numeric_client_property: encode.numeric.aio.operations.NumericClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.numeric_client_property = NumericClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/__init__.py index 02fe504541..3c0841f974 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import NumericClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "NumericClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/_operations.py index 04aaad990c..66828c2b23 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/aio/operations/_operations.py @@ -24,9 +24,9 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import NumericClientConfiguration from ...operations._operations import ( - build_property_safeint_as_string_request, - build_property_uint32_as_string_optional_request, - build_property_uint8_as_string_request, + build_numeric_client_property_safeint_as_string_request, + build_numeric_client_property_uint32_as_string_optional_request, + build_numeric_client_property_uint8_as_string_request, ) JSON = MutableMapping[str, Any] @@ -34,14 +34,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class NumericClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.numeric.aio.NumericClient`'s - :attr:`property` attribute. + :attr:`numeric_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -131,7 +131,7 @@ async def safeint_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_safeint_as_string_request( + _request = build_numeric_client_property_safeint_as_string_request( content_type=content_type, content=_content, headers=_headers, @@ -246,7 +246,7 @@ async def uint32_as_string_optional( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint32_as_string_optional_request( + _request = build_numeric_client_property_uint32_as_string_optional_request( content_type=content_type, content=_content, headers=_headers, @@ -361,7 +361,7 @@ async def uint8_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint8_as_string_request( + _request = build_numeric_client_property_uint8_as_string_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/__init__.py index 02fe504541..3c0841f974 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import NumericClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "NumericClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/_operations.py index 3a995abf90..28421a1fb4 100644 --- a/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/encode-numeric/encode/numeric/property/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_property_safeint_as_string_request(**kwargs: Any) -> HttpRequest: +def build_numeric_client_property_safeint_as_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -49,7 +51,9 @@ def build_property_safeint_as_string_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_uint32_as_string_optional_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_numeric_client_property_uint32_as_string_optional_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -66,7 +70,9 @@ def build_property_uint32_as_string_optional_request(**kwargs: Any) -> HttpReque return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_uint8_as_string_request(**kwargs: Any) -> HttpRequest: +def build_numeric_client_property_uint8_as_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -83,14 +89,14 @@ def build_property_uint8_as_string_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class NumericClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~encode.numeric.NumericClient`'s - :attr:`property` attribute. + :attr:`numeric_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -180,7 +186,7 @@ def safeint_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_safeint_as_string_request( + _request = build_numeric_client_property_safeint_as_string_request( content_type=content_type, content=_content, headers=_headers, @@ -295,7 +301,7 @@ def uint32_as_string_optional( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint32_as_string_optional_request( + _request = build_numeric_client_property_uint32_as_string_optional_request( content_type=content_type, content=_content, headers=_headers, @@ -410,7 +416,7 @@ def uint8_as_string( else: _content = json.dumps(value, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_uint8_as_string_request( + _request = build_numeric_client_property_uint8_as_string_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_client.py index c6f0c505e8..816370156a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/_client.py @@ -9,17 +9,19 @@ from ._configuration import BasicClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .explicitbody.operations import ExplicitBodyOperations -from .implicitbody.operations import ImplicitBodyOperations +from .explicitbody.operations import BasicClientExplicitBodyOperations +from .implicitbody.operations import BasicClientImplicitBodyOperations class BasicClient: # pylint: disable=client-accepts-api-version-keyword """Test for basic parameters cases. - :ivar explicit_body: ExplicitBodyOperations operations - :vartype explicit_body: parameters.basic.operations.ExplicitBodyOperations - :ivar implicit_body: ImplicitBodyOperations operations - :vartype implicit_body: parameters.basic.operations.ImplicitBodyOperations + :ivar basic_client_explicit_body: BasicClientExplicitBodyOperations operations + :vartype basic_client_explicit_body: + parameters.basic.operations.BasicClientExplicitBodyOperations + :ivar basic_client_implicit_body: BasicClientImplicitBodyOperations operations + :vartype basic_client_implicit_body: + parameters.basic.operations.BasicClientImplicitBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.explicit_body = ExplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.implicit_body = ImplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.basic_client_explicit_body = BasicClientExplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.basic_client_implicit_body = BasicClientImplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/_client.py index 129562a9cf..90391b5d26 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/aio/_client.py @@ -8,18 +8,20 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..explicitbody.aio.operations import ExplicitBodyOperations -from ..implicitbody.aio.operations import ImplicitBodyOperations +from ..explicitbody.aio.operations import BasicClientExplicitBodyOperations +from ..implicitbody.aio.operations import BasicClientImplicitBodyOperations from ._configuration import BasicClientConfiguration class BasicClient: # pylint: disable=client-accepts-api-version-keyword """Test for basic parameters cases. - :ivar explicit_body: ExplicitBodyOperations operations - :vartype explicit_body: parameters.basic.aio.operations.ExplicitBodyOperations - :ivar implicit_body: ImplicitBodyOperations operations - :vartype implicit_body: parameters.basic.aio.operations.ImplicitBodyOperations + :ivar basic_client_explicit_body: BasicClientExplicitBodyOperations operations + :vartype basic_client_explicit_body: + parameters.basic.aio.operations.BasicClientExplicitBodyOperations + :ivar basic_client_implicit_body: BasicClientImplicitBodyOperations operations + :vartype basic_client_implicit_body: + parameters.basic.aio.operations.BasicClientImplicitBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.explicit_body = ExplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.implicit_body = ImplicitBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.basic_client_explicit_body = BasicClientExplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.basic_client_implicit_body = BasicClientImplicitBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/__init__.py index e8b1df520f..3951e8a451 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExplicitBodyOperations # type: ignore +from ._operations import BasicClientExplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExplicitBodyOperations", + "BasicClientExplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/_operations.py index b58f7052c7..ad2c300fab 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/aio/operations/_operations.py @@ -21,21 +21,21 @@ from ...._utils.model_base import SdkJSONEncoder from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BasicClientConfiguration -from ...operations._operations import build_explicit_body_simple_request +from ...operations._operations import build_basic_client_explicit_body_simple_request JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ExplicitBodyOperations: +class BasicClientExplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.aio.BasicClient`'s - :attr:`explicit_body` attribute. + :attr:`basic_client_explicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -117,7 +117,7 @@ async def simple(self, body: Union[_models2.User, JSON, IO[bytes]], **kwargs: An else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_explicit_body_simple_request( + _request = build_basic_client_explicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/__init__.py index e8b1df520f..3951e8a451 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExplicitBodyOperations # type: ignore +from ._operations import BasicClientExplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExplicitBodyOperations", + "BasicClientExplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/_operations.py index d6c88b5e8b..25e12781ef 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/explicitbody/operations/_operations.py @@ -30,7 +30,7 @@ _SERIALIZER.client_side_validation = False -def build_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: +def build_basic_client_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -44,14 +44,14 @@ def build_explicit_body_simple_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ExplicitBodyOperations: +class BasicClientExplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.BasicClient`'s - :attr:`explicit_body` attribute. + :attr:`basic_client_explicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -135,7 +135,7 @@ def simple( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_explicit_body_simple_request( + _request = build_basic_client_explicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/__init__.py index 612c6a99ca..f0e4facc71 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ImplicitBodyOperations # type: ignore +from ._operations import BasicClientImplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ImplicitBodyOperations", + "BasicClientImplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/_operations.py index ef2d731593..22f1eda693 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/aio/operations/_operations.py @@ -20,7 +20,7 @@ from ...._utils.model_base import SdkJSONEncoder from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BasicClientConfiguration -from ...operations._operations import build_implicit_body_simple_request +from ...operations._operations import build_basic_client_implicit_body_simple_request JSON = MutableMapping[str, Any] _Unset: Any = object() @@ -28,14 +28,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ImplicitBodyOperations: +class BasicClientImplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.aio.BasicClient`'s - :attr:`implicit_body` attribute. + :attr:`basic_client_implicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -124,7 +124,7 @@ async def simple(self, body: Union[JSON, IO[bytes]] = _Unset, *, name: str = _Un else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_implicit_body_simple_request( + _request = build_basic_client_implicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/__init__.py index 612c6a99ca..f0e4facc71 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ImplicitBodyOperations # type: ignore +from ._operations import BasicClientImplicitBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ImplicitBodyOperations", + "BasicClientImplicitBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/_operations.py index 3058077739..5ff5c6fe40 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-basic/parameters/basic/implicitbody/operations/_operations.py @@ -30,7 +30,7 @@ _SERIALIZER.client_side_validation = False -def build_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: +def build_basic_client_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -44,14 +44,14 @@ def build_implicit_body_simple_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ImplicitBodyOperations: +class BasicClientImplicitBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.basic.BasicClient`'s - :attr:`implicit_body` attribute. + :attr:`basic_client_implicit_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -142,7 +142,7 @@ def simple( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_implicit_body_simple_request( + _request = build_basic_client_implicit_body_simple_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py index b9f179a036..65f3b55369 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/_client.py @@ -10,7 +10,7 @@ from ._configuration import BodyOptionalityClientConfiguration from ._operations import _BodyOptionalityClientOperationsMixin from ._utils.serialization import Deserializer, Serializer -from .optionalexplicit.operations import OptionalExplicitOperations +from .optionalexplicit.operations import BodyOptionalityClientOptionalExplicitOperations class BodyOptionalityClient( @@ -18,8 +18,10 @@ class BodyOptionalityClient( ): # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar optional_explicit: OptionalExplicitOperations operations - :vartype optional_explicit: parameters.bodyoptionality.operations.OptionalExplicitOperations + :ivar body_optionality_client_optional_explicit: + BodyOptionalityClientOptionalExplicitOperations operations + :vartype body_optionality_client_optional_explicit: + parameters.bodyoptionality.operations.BodyOptionalityClientOptionalExplicitOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,7 +48,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.optional_explicit = OptionalExplicitOperations( + self.body_optionality_client_optional_explicit = BodyOptionalityClientOptionalExplicitOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py index 053836c3ca..c54b1b580c 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/aio/_client.py @@ -8,7 +8,7 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..optionalexplicit.aio.operations import OptionalExplicitOperations +from ..optionalexplicit.aio.operations import BodyOptionalityClientOptionalExplicitOperations from ._configuration import BodyOptionalityClientConfiguration from ._operations import _BodyOptionalityClientOperationsMixin @@ -18,9 +18,10 @@ class BodyOptionalityClient( ): # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar optional_explicit: OptionalExplicitOperations operations - :vartype optional_explicit: - parameters.bodyoptionality.aio.operations.OptionalExplicitOperations + :ivar body_optionality_client_optional_explicit: + BodyOptionalityClientOptionalExplicitOperations operations + :vartype body_optionality_client_optional_explicit: + parameters.bodyoptionality.aio.operations.BodyOptionalityClientOptionalExplicitOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -47,7 +48,7 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.optional_explicit = OptionalExplicitOperations( + self.body_optionality_client_optional_explicit = BodyOptionalityClientOptionalExplicitOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py index c3ce33b3ab..60a36a2a1b 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import OptionalExplicitOperations # type: ignore +from ._operations import BodyOptionalityClientOptionalExplicitOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "OptionalExplicitOperations", + "BodyOptionalityClientOptionalExplicitOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py index d3d1289077..2e84cf255a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/aio/operations/_operations.py @@ -21,21 +21,24 @@ from ...._utils.model_base import SdkJSONEncoder from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import BodyOptionalityClientConfiguration -from ...operations._operations import build_optional_explicit_omit_request, build_optional_explicit_set_request +from ...operations._operations import ( + build_body_optionality_client_optional_explicit_omit_request, + build_body_optionality_client_optional_explicit_set_request, +) JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class OptionalExplicitOperations: +class BodyOptionalityClientOptionalExplicitOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.bodyoptionality.aio.BodyOptionalityClient`'s - :attr:`optional_explicit` attribute. + :attr:`body_optionality_client_optional_explicit` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -125,7 +128,7 @@ async def set(self, body: Optional[Union[_models3.BodyModel, JSON, IO[bytes]]] = else: _content = None - _request = build_optional_explicit_set_request( + _request = build_body_optionality_client_optional_explicit_set_request( content_type=content_type, content=_content, headers=_headers, @@ -228,7 +231,7 @@ async def omit(self, body: Optional[Union[_models3.BodyModel, JSON, IO[bytes]]] else: _content = None - _request = build_optional_explicit_omit_request( + _request = build_body_optionality_client_optional_explicit_omit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py index c3ce33b3ab..60a36a2a1b 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import OptionalExplicitOperations # type: ignore +from ._operations import BodyOptionalityClientOptionalExplicitOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "OptionalExplicitOperations", + "BodyOptionalityClientOptionalExplicitOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py index 61670a8ec1..8ae8d77892 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-body-optionality/parameters/bodyoptionality/optionalexplicit/operations/_operations.py @@ -30,7 +30,9 @@ _SERIALIZER.client_side_validation = False -def build_optional_explicit_set_request(**kwargs: Any) -> HttpRequest: +def build_body_optionality_client_optional_explicit_set_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -44,7 +46,9 @@ def build_optional_explicit_set_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_optional_explicit_omit_request(**kwargs: Any) -> HttpRequest: +def build_body_optionality_client_optional_explicit_omit_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -58,14 +62,14 @@ def build_optional_explicit_omit_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class OptionalExplicitOperations: +class BodyOptionalityClientOptionalExplicitOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.bodyoptionality.BodyOptionalityClient`'s - :attr:`optional_explicit` attribute. + :attr:`body_optionality_client_optional_explicit` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -155,7 +159,7 @@ def set( # pylint: disable=inconsistent-return-statements else: _content = None - _request = build_optional_explicit_set_request( + _request = build_body_optionality_client_optional_explicit_set_request( content_type=content_type, content=_content, headers=_headers, @@ -258,7 +262,7 @@ def omit( # pylint: disable=inconsistent-return-statements else: _content = None - _request = build_optional_explicit_omit_request( + _request = build_body_optionality_client_optional_explicit_omit_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_client.py index 11a2623f9b..a7ac76a115 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/_client.py @@ -9,17 +9,19 @@ from ._configuration import CollectionFormatClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .header.operations import HeaderOperations -from .query.operations import QueryOperations +from .header.operations import CollectionFormatClientHeaderOperations +from .query.operations import CollectionFormatClientQueryOperations class CollectionFormatClient: # pylint: disable=client-accepts-api-version-keyword """Test for collectionFormat. - :ivar query: QueryOperations operations - :vartype query: parameters.collectionformat.operations.QueryOperations - :ivar header: HeaderOperations operations - :vartype header: parameters.collectionformat.operations.HeaderOperations + :ivar collection_format_client_query: CollectionFormatClientQueryOperations operations + :vartype collection_format_client_query: + parameters.collectionformat.operations.CollectionFormatClientQueryOperations + :ivar collection_format_client_header: CollectionFormatClientHeaderOperations operations + :vartype collection_format_client_header: + parameters.collectionformat.operations.CollectionFormatClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_format_client_query = CollectionFormatClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_format_client_header = CollectionFormatClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py index e58a9c2157..3f50352bb7 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/aio/_client.py @@ -8,18 +8,20 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..header.aio.operations import HeaderOperations -from ..query.aio.operations import QueryOperations +from ..header.aio.operations import CollectionFormatClientHeaderOperations +from ..query.aio.operations import CollectionFormatClientQueryOperations from ._configuration import CollectionFormatClientConfiguration class CollectionFormatClient: # pylint: disable=client-accepts-api-version-keyword """Test for collectionFormat. - :ivar query: QueryOperations operations - :vartype query: parameters.collectionformat.aio.operations.QueryOperations - :ivar header: HeaderOperations operations - :vartype header: parameters.collectionformat.aio.operations.HeaderOperations + :ivar collection_format_client_query: CollectionFormatClientQueryOperations operations + :vartype collection_format_client_query: + parameters.collectionformat.aio.operations.CollectionFormatClientQueryOperations + :ivar collection_format_client_header: CollectionFormatClientHeaderOperations operations + :vartype collection_format_client_header: + parameters.collectionformat.aio.operations.CollectionFormatClientHeaderOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.query = QueryOperations(self._client, self._config, self._serialize, self._deserialize) - self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize) + self.collection_format_client_query = CollectionFormatClientQueryOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.collection_format_client_header = CollectionFormatClientHeaderOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py index 8e39e7642d..28966080e8 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import CollectionFormatClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "CollectionFormatClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py index fa8a7ee67b..6f0789d9b1 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/aio/operations/_operations.py @@ -16,20 +16,20 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import CollectionFormatClientConfiguration -from ...operations._operations import build_header_csv_request +from ...operations._operations import build_collection_format_client_header_csv_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class HeaderOperations: +class CollectionFormatClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.aio.CollectionFormatClient`'s - :attr:`header` attribute. + :attr:`collection_format_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -61,7 +61,7 @@ async def csv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_csv_request( + _request = build_collection_format_client_header_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py index 8e39e7642d..28966080e8 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import HeaderOperations # type: ignore +from ._operations import CollectionFormatClientHeaderOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "HeaderOperations", + "CollectionFormatClientHeaderOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py index c4811553d4..87f1764c41 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/header/operations/_operations.py @@ -25,7 +25,9 @@ _SERIALIZER.client_side_validation = False -def build_header_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_header_csv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -37,14 +39,14 @@ def build_header_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class HeaderOperations: +class CollectionFormatClientHeaderOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.CollectionFormatClient`'s - :attr:`header` attribute. + :attr:`collection_format_client_header` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +78,7 @@ def csv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_header_csv_request( + _request = build_collection_format_client_header_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py index 2f5d3ef93d..c2f0a34f40 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import CollectionFormatClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "CollectionFormatClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py index 2f3730542d..6685f40cd8 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/aio/operations/_operations.py @@ -17,24 +17,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import CollectionFormatClientConfiguration from ...operations._operations import ( - build_query_csv_request, - build_query_multi_request, - build_query_pipes_request, - build_query_ssv_request, + build_collection_format_client_query_csv_request, + build_collection_format_client_query_multi_request, + build_collection_format_client_query_pipes_request, + build_collection_format_client_query_ssv_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryOperations: +class CollectionFormatClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.aio.CollectionFormatClient`'s - :attr:`query` attribute. + :attr:`collection_format_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -66,7 +66,7 @@ async def multi(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_multi_request( + _request = build_collection_format_client_query_multi_request( colors=colors, headers=_headers, params=_params, @@ -110,7 +110,7 @@ async def ssv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_ssv_request( + _request = build_collection_format_client_query_ssv_request( colors=colors, headers=_headers, params=_params, @@ -154,7 +154,7 @@ async def pipes(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_pipes_request( + _request = build_collection_format_client_query_pipes_request( colors=colors, headers=_headers, params=_params, @@ -198,7 +198,7 @@ async def csv(self, *, colors: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_csv_request( + _request = build_collection_format_client_query_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py index 2f5d3ef93d..c2f0a34f40 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryOperations # type: ignore +from ._operations import CollectionFormatClientQueryOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryOperations", + "CollectionFormatClientQueryOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py index 6f348e8e6d..e5f77bad7d 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-collection-format/parameters/collectionformat/query/operations/_operations.py @@ -25,7 +25,9 @@ _SERIALIZER.client_side_validation = False -def build_query_multi_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_multi_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -37,7 +39,9 @@ def build_query_multi_request(*, colors: list[str], **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_ssv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_ssv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -49,7 +53,9 @@ def build_query_ssv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_pipes_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_pipes_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -61,7 +67,9 @@ def build_query_pipes_request(*, colors: list[str], **kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: +def build_collection_format_client_query_csv_request( # pylint: disable=name-too-long + *, colors: list[str], **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -73,14 +81,14 @@ def build_query_csv_request(*, colors: list[str], **kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryOperations: +class CollectionFormatClientQueryOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.collectionformat.CollectionFormatClient`'s - :attr:`query` attribute. + :attr:`collection_format_client_query` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -112,7 +120,7 @@ def multi(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_multi_request( + _request = build_collection_format_client_query_multi_request( colors=colors, headers=_headers, params=_params, @@ -156,7 +164,7 @@ def ssv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_ssv_request( + _request = build_collection_format_client_query_ssv_request( colors=colors, headers=_headers, params=_params, @@ -200,7 +208,7 @@ def pipes(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_pipes_request( + _request = build_collection_format_client_query_pipes_request( colors=colors, headers=_headers, params=_params, @@ -244,7 +252,7 @@ def csv(self, *, colors: list[str], **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_csv_request( + _request = build_collection_format_client_query_csv_request( colors=colors, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/_client.py index b2e753b414..34c7b18f00 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/_client.py @@ -9,14 +9,14 @@ from ._configuration import QueryClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ConstantOperations +from .operations import QueryClientConstantOperations class QueryClient: # pylint: disable=client-accepts-api-version-keyword """Test for query parameter cases. - :ivar constant: ConstantOperations operations - :vartype constant: parameters.query.operations.ConstantOperations + :ivar query_client_constant: QueryClientConstantOperations operations + :vartype query_client_constant: parameters.query.operations.QueryClientConstantOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.constant = ConstantOperations(self._client, self._config, self._serialize, self._deserialize) + self.query_client_constant = QueryClientConstantOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/_client.py index 4b2b6c630f..e99702516c 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/_client.py @@ -9,14 +9,14 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import QueryClientConfiguration -from .operations import ConstantOperations +from .operations import QueryClientConstantOperations class QueryClient: # pylint: disable=client-accepts-api-version-keyword """Test for query parameter cases. - :ivar constant: ConstantOperations operations - :vartype constant: parameters.query.aio.operations.ConstantOperations + :ivar query_client_constant: QueryClientConstantOperations operations + :vartype query_client_constant: parameters.query.aio.operations.QueryClientConstantOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.constant = ConstantOperations(self._client, self._config, self._serialize, self._deserialize) + self.query_client_constant = QueryClientConstantOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/__init__.py index 2c4278d4d1..654a16a702 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ConstantOperations # type: ignore +from ._operations import QueryClientConstantOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ConstantOperations", + "QueryClientConstantOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/_operations.py index 73b085eeb7..9000a5e9ee 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/aio/operations/_operations.py @@ -15,21 +15,21 @@ from corehttp.runtime.pipeline import PipelineResponse from ..._utils.serialization import Deserializer, Serializer -from ...operations._operations import build_constant_post_request +from ...operations._operations import build_query_client_constant_post_request from .._configuration import QueryClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ConstantOperations: +class QueryClientConstantOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.query.aio.QueryClient`'s - :attr:`constant` attribute. + :attr:`query_client_constant` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -60,7 +60,7 @@ async def post(self, **kwargs: Any) -> None: query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_constant_post_request( + _request = build_query_client_constant_post_request( query_param=query_param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/__init__.py index 2c4278d4d1..654a16a702 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ConstantOperations # type: ignore +from ._operations import QueryClientConstantOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ConstantOperations", + "QueryClientConstantOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/_operations.py index 2a4cbd1352..2d1e066921 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-query/parameters/query/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_constant_post_request(**kwargs: Any) -> HttpRequest: +def build_query_client_constant_post_request(**kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) @@ -38,14 +38,14 @@ def build_constant_post_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -class ConstantOperations: +class QueryClientConstantOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.query.QueryClient`'s - :attr:`constant` attribute. + :attr:`query_client_constant` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ def post(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-st query_param: Literal["constantValue"] = kwargs.pop("query_param", _params.pop("queryParam", "constantValue")) cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_constant_post_request( + _request = build_query_client_constant_post_request( query_param=query_param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_client.py index 65ea261490..34ccb53b07 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/_client.py @@ -9,17 +9,17 @@ from ._configuration import SpreadClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .alias.operations import AliasOperations -from .model.operations import ModelOperations +from .alias.operations import SpreadClientAliasOperations +from .model.operations import SpreadClientModelOperations class SpreadClient: # pylint: disable=client-accepts-api-version-keyword """Test for the spread operator. - :ivar model: ModelOperations operations - :vartype model: parameters.spread.operations.ModelOperations - :ivar alias: AliasOperations operations - :vartype alias: parameters.spread.operations.AliasOperations + :ivar spread_client_model: SpreadClientModelOperations operations + :vartype spread_client_model: parameters.spread.operations.SpreadClientModelOperations + :ivar spread_client_alias: SpreadClientAliasOperations operations + :vartype spread_client_alias: parameters.spread.operations.SpreadClientAliasOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +46,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize) + self.spread_client_model = SpreadClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.spread_client_alias = SpreadClientAliasOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/_client.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/_client.py index fd96b553be..e8fa793cf9 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/aio/_client.py @@ -8,18 +8,18 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..alias.aio.operations import AliasOperations -from ..model.aio.operations import ModelOperations +from ..alias.aio.operations import SpreadClientAliasOperations +from ..model.aio.operations import SpreadClientModelOperations from ._configuration import SpreadClientConfiguration class SpreadClient: # pylint: disable=client-accepts-api-version-keyword """Test for the spread operator. - :ivar model: ModelOperations operations - :vartype model: parameters.spread.aio.operations.ModelOperations - :ivar alias: AliasOperations operations - :vartype alias: parameters.spread.aio.operations.AliasOperations + :ivar spread_client_model: SpreadClientModelOperations operations + :vartype spread_client_model: parameters.spread.aio.operations.SpreadClientModelOperations + :ivar spread_client_alias: SpreadClientAliasOperations operations + :vartype spread_client_alias: parameters.spread.aio.operations.SpreadClientAliasOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +46,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.alias = AliasOperations(self._client, self._config, self._serialize, self._deserialize) + self.spread_client_model = SpreadClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.spread_client_alias = SpreadClientAliasOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/__init__.py index c29ccd445b..8ccf0e540a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AliasOperations # type: ignore +from ._operations import SpreadClientAliasOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AliasOperations", + "SpreadClientAliasOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/_operations.py index 471a358aca..6a6c292883 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/aio/operations/_operations.py @@ -21,11 +21,11 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import SpreadClientConfiguration from ...operations._operations import ( - build_alias_spread_as_request_body_request, - build_alias_spread_as_request_parameter_request, - build_alias_spread_parameter_with_inner_alias_request, - build_alias_spread_parameter_with_inner_model_request, - build_alias_spread_with_multiple_parameters_request, + build_spread_client_alias_spread_as_request_body_request, + build_spread_client_alias_spread_as_request_parameter_request, + build_spread_client_alias_spread_parameter_with_inner_alias_request, + build_spread_client_alias_spread_parameter_with_inner_model_request, + build_spread_client_alias_spread_with_multiple_parameters_request, ) JSON = MutableMapping[str, Any] @@ -34,14 +34,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class AliasOperations: +class SpreadClientAliasOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.aio.SpreadClient`'s - :attr:`alias` attribute. + :attr:`spread_client_alias` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -136,7 +136,7 @@ async def spread_as_request_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_body_request( + _request = build_spread_client_alias_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -268,7 +268,7 @@ async def spread_parameter_with_inner_model( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_model_request( + _request = build_spread_client_alias_spread_parameter_with_inner_model_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -402,7 +402,7 @@ async def spread_as_request_parameter( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_parameter_request( + _request = build_spread_client_alias_spread_as_request_parameter_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -567,7 +567,7 @@ async def spread_with_multiple_parameters( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_with_multiple_parameters_request( + _request = build_spread_client_alias_spread_with_multiple_parameters_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -715,7 +715,7 @@ async def spread_parameter_with_inner_alias( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_alias_request( + _request = build_spread_client_alias_spread_parameter_with_inner_alias_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/__init__.py index c29ccd445b..8ccf0e540a 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import AliasOperations # type: ignore +from ._operations import SpreadClientAliasOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "AliasOperations", + "SpreadClientAliasOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/_operations.py index 80d4b75225..ab3156637c 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/alias/operations/_operations.py @@ -30,7 +30,9 @@ _SERIALIZER.client_side_validation = False -def build_alias_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_spread_client_alias_spread_as_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -44,7 +46,7 @@ def build_alias_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_parameter_with_inner_model_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_parameter_with_inner_model_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -66,7 +68,7 @@ def build_alias_spread_parameter_with_inner_model_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_alias_spread_as_request_parameter_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_as_request_parameter_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -88,7 +90,7 @@ def build_alias_spread_as_request_parameter_request( # pylint: disable=name-too return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_with_multiple_parameters_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_with_multiple_parameters_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -110,7 +112,7 @@ def build_alias_spread_with_multiple_parameters_request( # pylint: disable=name return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_alias_spread_parameter_with_inner_alias_request( # pylint: disable=name-too-long +def build_spread_client_alias_spread_parameter_with_inner_alias_request( # pylint: disable=name-too-long id: str, *, x_ms_test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -132,14 +134,14 @@ def build_alias_spread_parameter_with_inner_alias_request( # pylint: disable=na return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class AliasOperations: +class SpreadClientAliasOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.SpreadClient`'s - :attr:`alias` attribute. + :attr:`spread_client_alias` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -230,7 +232,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_body_request( + _request = build_spread_client_alias_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -320,7 +322,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st *, x_ms_test_header: str, name: str = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """spread_parameter_with_inner_model. @@ -362,7 +364,7 @@ def spread_parameter_with_inner_model( # pylint: disable=inconsistent-return-st else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_model_request( + _request = build_spread_client_alias_spread_parameter_with_inner_model_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -454,7 +456,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen *, x_ms_test_header: str, name: str = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """spread_as_request_parameter. @@ -496,7 +498,7 @@ def spread_as_request_parameter( # pylint: disable=inconsistent-return-statemen else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_as_request_parameter_request( + _request = build_spread_client_alias_spread_as_request_parameter_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -532,7 +534,7 @@ def spread_with_multiple_parameters( content_type: str = "application/json", optional_int: Optional[int] = None, optional_string_list: Optional[list[str]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """spread_with_multiple_parameters. @@ -606,7 +608,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat required_int_list: list[int] = _Unset, optional_int: Optional[int] = None, optional_string_list: Optional[list[str]] = None, - **kwargs: Any + **kwargs: Any, ) -> None: """spread_with_multiple_parameters. @@ -661,7 +663,7 @@ def spread_with_multiple_parameters( # pylint: disable=inconsistent-return-stat else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_with_multiple_parameters_request( + _request = build_spread_client_alias_spread_with_multiple_parameters_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, @@ -695,7 +697,7 @@ def spread_parameter_with_inner_alias( name: str, age: int, content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> None: """spread an alias with contains another alias property as body. @@ -763,7 +765,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st x_ms_test_header: str, name: str = _Unset, age: int = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """spread an alias with contains another alias property as body. @@ -809,7 +811,7 @@ def spread_parameter_with_inner_alias( # pylint: disable=inconsistent-return-st else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_alias_spread_parameter_with_inner_alias_request( + _request = build_spread_client_alias_spread_parameter_with_inner_alias_request( id=id, x_ms_test_header=x_ms_test_header, content_type=content_type, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/__init__.py index dc723878f6..5e2c9fe321 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelOperations # type: ignore +from ._operations import SpreadClientModelOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelOperations", + "SpreadClientModelOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/_operations.py index 4fb0a9a01d..9c8d2dcd5d 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/aio/operations/_operations.py @@ -22,11 +22,11 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import SpreadClientConfiguration from ...operations._operations import ( - build_model_spread_as_request_body_request, - build_model_spread_composite_request_mix_request, - build_model_spread_composite_request_only_with_body_request, - build_model_spread_composite_request_request, - build_model_spread_composite_request_without_body_request, + build_spread_client_model_spread_as_request_body_request, + build_spread_client_model_spread_composite_request_mix_request, + build_spread_client_model_spread_composite_request_only_with_body_request, + build_spread_client_model_spread_composite_request_request, + build_spread_client_model_spread_composite_request_without_body_request, ) JSON = MutableMapping[str, Any] @@ -35,14 +35,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelOperations: +class SpreadClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.aio.SpreadClient`'s - :attr:`model` attribute. + :attr:`spread_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -137,7 +137,7 @@ async def spread_as_request_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_as_request_body_request( + _request = build_spread_client_model_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -240,7 +240,7 @@ async def spread_composite_request_only_with_body( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_only_with_body_request( + _request = build_spread_client_model_spread_composite_request_only_with_body_request( content_type=content_type, content=_content, headers=_headers, @@ -287,7 +287,7 @@ async def spread_composite_request_without_body(self, name: str, *, test_header: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_model_spread_composite_request_without_body_request( + _request = build_spread_client_model_spread_composite_request_without_body_request( name=name, test_header=test_header, headers=_headers, @@ -412,7 +412,7 @@ async def spread_composite_request( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_request( + _request = build_spread_client_model_spread_composite_request_request( name=name, test_header=test_header, content_type=content_type, @@ -540,7 +540,7 @@ async def spread_composite_request_mix( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_mix_request( + _request = build_spread_client_model_spread_composite_request_mix_request( name=name, test_header=test_header, content_type=content_type, diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/__init__.py index dc723878f6..5e2c9fe321 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelOperations # type: ignore +from ._operations import SpreadClientModelOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelOperations", + "SpreadClientModelOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/_operations.py index d58bae8d1d..8572464d7f 100644 --- a/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/parameters-spread/parameters/spread/model/operations/_operations.py @@ -31,7 +31,9 @@ _SERIALIZER.client_side_validation = False -def build_model_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_spread_client_model_spread_as_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -45,7 +47,7 @@ def build_model_spread_as_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_only_with_body_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_only_with_body_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -61,7 +63,7 @@ def build_model_spread_composite_request_only_with_body_request( # pylint: disa return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_without_body_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_without_body_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -80,7 +82,7 @@ def build_model_spread_composite_request_without_body_request( # pylint: disabl return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -102,7 +104,7 @@ def build_model_spread_composite_request_request( # pylint: disable=name-too-lo return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_spread_composite_request_mix_request( # pylint: disable=name-too-long +def build_spread_client_model_spread_composite_request_mix_request( # pylint: disable=name-too-long name: str, *, test_header: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -124,14 +126,14 @@ def build_model_spread_composite_request_mix_request( # pylint: disable=name-to return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ModelOperations: +class SpreadClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~parameters.spread.SpreadClient`'s - :attr:`model` attribute. + :attr:`spread_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -222,7 +224,7 @@ def spread_as_request_body( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_as_request_body_request( + _request = build_spread_client_model_spread_as_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -325,7 +327,7 @@ def spread_composite_request_only_with_body( # pylint: disable=inconsistent-ret else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_only_with_body_request( + _request = build_spread_client_model_spread_composite_request_only_with_body_request( content_type=content_type, content=_content, headers=_headers, @@ -374,7 +376,7 @@ def spread_composite_request_without_body( # pylint: disable=inconsistent-retur cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_model_spread_composite_request_without_body_request( + _request = build_spread_client_model_spread_composite_request_without_body_request( name=name, test_header=test_header, headers=_headers, @@ -499,7 +501,7 @@ def spread_composite_request( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_request( + _request = build_spread_client_model_spread_composite_request_request( name=name, test_header=test_header, content_type=content_type, @@ -627,7 +629,7 @@ def spread_composite_request_mix( # pylint: disable=inconsistent-return-stateme else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_spread_composite_request_mix_request( + _request = build_spread_client_model_spread_composite_request_mix_request( name=name, test_header=test_header, content_type=content_type, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_client.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_client.py index 3dc6c6dc51..e35bf0f7de 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/_client.py @@ -9,17 +9,21 @@ from ._configuration import ContentNegotiationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .differentbody.operations import DifferentBodyOperations -from .samebody.operations import SameBodyOperations +from .differentbody.operations import ContentNegotiationClientDifferentBodyOperations +from .samebody.operations import ContentNegotiationClientSameBodyOperations class ContentNegotiationClient: # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar same_body: SameBodyOperations operations - :vartype same_body: payload.contentnegotiation.operations.SameBodyOperations - :ivar different_body: DifferentBodyOperations operations - :vartype different_body: payload.contentnegotiation.operations.DifferentBodyOperations + :ivar content_negotiation_client_same_body: ContentNegotiationClientSameBodyOperations + operations + :vartype content_negotiation_client_same_body: + payload.contentnegotiation.operations.ContentNegotiationClientSameBodyOperations + :ivar content_negotiation_client_different_body: + ContentNegotiationClientDifferentBodyOperations operations + :vartype content_negotiation_client_different_body: + payload.contentnegotiation.operations.ContentNegotiationClientDifferentBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +50,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.same_body = SameBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.different_body = DifferentBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_negotiation_client_same_body = ContentNegotiationClientSameBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.content_negotiation_client_different_body = ContentNegotiationClientDifferentBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py index 46f3edf440..43c7dc34cc 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/aio/_client.py @@ -8,18 +8,22 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..differentbody.aio.operations import DifferentBodyOperations -from ..samebody.aio.operations import SameBodyOperations +from ..differentbody.aio.operations import ContentNegotiationClientDifferentBodyOperations +from ..samebody.aio.operations import ContentNegotiationClientSameBodyOperations from ._configuration import ContentNegotiationClientConfiguration class ContentNegotiationClient: # pylint: disable=client-accepts-api-version-keyword """Test describing optionality of the request body. - :ivar same_body: SameBodyOperations operations - :vartype same_body: payload.contentnegotiation.aio.operations.SameBodyOperations - :ivar different_body: DifferentBodyOperations operations - :vartype different_body: payload.contentnegotiation.aio.operations.DifferentBodyOperations + :ivar content_negotiation_client_same_body: ContentNegotiationClientSameBodyOperations + operations + :vartype content_negotiation_client_same_body: + payload.contentnegotiation.aio.operations.ContentNegotiationClientSameBodyOperations + :ivar content_negotiation_client_different_body: + ContentNegotiationClientDifferentBodyOperations operations + :vartype content_negotiation_client_different_body: + payload.contentnegotiation.aio.operations.ContentNegotiationClientDifferentBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -46,8 +50,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.same_body = SameBodyOperations(self._client, self._config, self._serialize, self._deserialize) - self.different_body = DifferentBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.content_negotiation_client_same_body = ContentNegotiationClientSameBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.content_negotiation_client_different_body = ContentNegotiationClientDifferentBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/__init__.py index 6e5f721e56..6ab0ce9420 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import DifferentBodyOperations # type: ignore +from ._operations import ContentNegotiationClientDifferentBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "DifferentBodyOperations", + "ContentNegotiationClientDifferentBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/_operations.py index b8cf90ec1b..a824a8a524 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/aio/operations/_operations.py @@ -22,22 +22,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import ContentNegotiationClientConfiguration from ...operations._operations import ( - build_different_body_get_avatar_as_json_request, - build_different_body_get_avatar_as_png_request, + build_content_negotiation_client_different_body_get_avatar_as_json_request, + build_content_negotiation_client_different_body_get_avatar_as_png_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class DifferentBodyOperations: +class ContentNegotiationClientDifferentBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.aio.ContentNegotiationClient`'s - :attr:`different_body` attribute. + :attr:`content_negotiation_client_different_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -123,7 +123,7 @@ async def get_avatar_as_json(self, **kwargs: Any) -> _models2.PngImageAsJson: accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) cls: ClsType[_models2.PngImageAsJson] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_json_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_json_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/__init__.py index 6e5f721e56..6ab0ce9420 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import DifferentBodyOperations # type: ignore +from ._operations import ContentNegotiationClientDifferentBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "DifferentBodyOperations", + "ContentNegotiationClientDifferentBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/_operations.py index 2e89be1335..cbd740957a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/differentbody/operations/_operations.py @@ -29,7 +29,9 @@ _SERIALIZER.client_side_validation = False -def build_different_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_different_body_get_avatar_as_png_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) @@ -42,7 +44,9 @@ def build_different_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_different_body_get_avatar_as_json_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_different_body_get_avatar_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) @@ -55,14 +59,14 @@ def build_different_body_get_avatar_as_json_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class DifferentBodyOperations: +class ContentNegotiationClientDifferentBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.ContentNegotiationClient`'s - :attr:`different_body` attribute. + :attr:`content_negotiation_client_different_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -93,7 +97,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -148,7 +152,7 @@ def get_avatar_as_json(self, **kwargs: Any) -> _models1.PngImageAsJson: accept: Literal["application/json"] = kwargs.pop("accept", _headers.pop("accept", "application/json")) cls: ClsType[_models1.PngImageAsJson] = kwargs.pop("cls", None) - _request = build_different_body_get_avatar_as_json_request( + _request = build_content_negotiation_client_different_body_get_avatar_as_json_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/__init__.py index 85609cdc2a..a8571df5e0 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SameBodyOperations # type: ignore +from ._operations import ContentNegotiationClientSameBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SameBodyOperations", + "ContentNegotiationClientSameBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/_operations.py index aa32942a7a..862573ce8d 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/aio/operations/_operations.py @@ -20,22 +20,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import ContentNegotiationClientConfiguration from ...operations._operations import ( - build_same_body_get_avatar_as_jpeg_request, - build_same_body_get_avatar_as_png_request, + build_content_negotiation_client_same_body_get_avatar_as_jpeg_request, + build_content_negotiation_client_same_body_get_avatar_as_png_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class SameBodyOperations: +class ContentNegotiationClientSameBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.aio.ContentNegotiationClient`'s - :attr:`same_body` attribute. + :attr:`content_negotiation_client_same_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -66,7 +66,7 @@ async def get_avatar_as_png(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -121,7 +121,7 @@ async def get_avatar_as_jpeg(self, **kwargs: Any) -> AsyncIterator[bytes]: accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_jpeg_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/__init__.py index 85609cdc2a..a8571df5e0 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SameBodyOperations # type: ignore +from ._operations import ContentNegotiationClientSameBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SameBodyOperations", + "ContentNegotiationClientSameBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/_operations.py index 33878495c4..7819384410 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-content-negotiation/payload/contentnegotiation/samebody/operations/_operations.py @@ -27,7 +27,9 @@ _SERIALIZER.client_side_validation = False -def build_same_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_same_body_get_avatar_as_png_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) @@ -40,7 +42,9 @@ def build_same_body_get_avatar_as_png_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_same_body_get_avatar_as_jpeg_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) @@ -53,14 +57,14 @@ def build_same_body_get_avatar_as_jpeg_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class SameBodyOperations: +class ContentNegotiationClientSameBodyOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.contentnegotiation.ContentNegotiationClient`'s - :attr:`same_body` attribute. + :attr:`content_negotiation_client_same_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -91,7 +95,7 @@ def get_avatar_as_png(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/png"] = kwargs.pop("accept", _headers.pop("accept", "image/png")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_png_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_png_request( accept=accept, headers=_headers, params=_params, @@ -146,7 +150,7 @@ def get_avatar_as_jpeg(self, **kwargs: Any) -> Iterator[bytes]: accept: Literal["image/jpeg"] = kwargs.pop("accept", _headers.pop("accept", "image/jpeg")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_same_body_get_avatar_as_jpeg_request( + _request = build_content_negotiation_client_same_body_get_avatar_as_jpeg_request( accept=accept, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_client.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_client.py index 90dadced1c..7a2828ed89 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/_client.py @@ -9,14 +9,15 @@ from ._configuration import MediaTypeClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .stringbody.operations import StringBodyOperations +from .stringbody.operations import MediaTypeClientStringBodyOperations class MediaTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test the payload with different media types and different types of the payload itself. - :ivar string_body: StringBodyOperations operations - :vartype string_body: payload.mediatype.operations.StringBodyOperations + :ivar media_type_client_string_body: MediaTypeClientStringBodyOperations operations + :vartype media_type_client_string_body: + payload.mediatype.operations.MediaTypeClientStringBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string_body = StringBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.media_type_client_string_body = MediaTypeClientStringBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_client.py index f35d7df40b..0158b2ac57 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/aio/_client.py @@ -8,15 +8,16 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..stringbody.aio.operations import StringBodyOperations +from ..stringbody.aio.operations import MediaTypeClientStringBodyOperations from ._configuration import MediaTypeClientConfiguration class MediaTypeClient: # pylint: disable=client-accepts-api-version-keyword """Test the payload with different media types and different types of the payload itself. - :ivar string_body: StringBodyOperations operations - :vartype string_body: payload.mediatype.aio.operations.StringBodyOperations + :ivar media_type_client_string_body: MediaTypeClientStringBodyOperations operations + :vartype media_type_client_string_body: + payload.mediatype.aio.operations.MediaTypeClientStringBodyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string_body = StringBodyOperations(self._client, self._config, self._serialize, self._deserialize) + self.media_type_client_string_body = MediaTypeClientStringBodyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py index 773bd5b3b7..b8a27e6cf4 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringBodyOperations # type: ignore +from ._operations import MediaTypeClientStringBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringBodyOperations", + "MediaTypeClientStringBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py index 32c01530cf..05241e9d88 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/aio/operations/_operations.py @@ -22,24 +22,24 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import MediaTypeClientConfiguration from ...operations._operations import ( - build_string_body_get_as_json_request, - build_string_body_get_as_text_request, - build_string_body_send_as_json_request, - build_string_body_send_as_text_request, + build_media_type_client_string_body_get_as_json_request, + build_media_type_client_string_body_get_as_text_request, + build_media_type_client_string_body_send_as_json_request, + build_media_type_client_string_body_send_as_text_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringBodyOperations: +class MediaTypeClientStringBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.mediatype.aio.MediaTypeClient`'s - :attr:`string_body` attribute. + :attr:`media_type_client_string_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -74,7 +74,7 @@ async def send_as_text(self, text: str, **kwargs: Any) -> None: _content = text - _request = build_string_body_send_as_text_request( + _request = build_media_type_client_string_body_send_as_text_request( content_type=content_type, content=_content, headers=_headers, @@ -117,7 +117,7 @@ async def get_as_text(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_text_request( + _request = build_media_type_client_string_body_get_as_text_request( headers=_headers, params=_params, ) @@ -178,7 +178,7 @@ async def send_as_json(self, text: str, **kwargs: Any) -> None: _content = json.dumps(text, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_body_send_as_json_request( + _request = build_media_type_client_string_body_send_as_json_request( content_type=content_type, content=_content, headers=_headers, @@ -221,7 +221,7 @@ async def get_as_json(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_json_request( + _request = build_media_type_client_string_body_get_as_json_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py index 773bd5b3b7..b8a27e6cf4 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringBodyOperations # type: ignore +from ._operations import MediaTypeClientStringBodyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringBodyOperations", + "MediaTypeClientStringBodyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py index 792cfd13a0..9190317c41 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-media-type/payload/mediatype/stringbody/operations/_operations.py @@ -29,7 +29,9 @@ _SERIALIZER.client_side_validation = False -def build_string_body_send_as_text_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_send_as_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -42,7 +44,9 @@ def build_string_body_send_as_text_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_body_get_as_text_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_get_as_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "text/plain") @@ -56,7 +60,9 @@ def build_string_body_get_as_text_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_body_send_as_json_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_send_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -69,7 +75,9 @@ def build_string_body_send_as_json_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_body_get_as_json_request(**kwargs: Any) -> HttpRequest: +def build_media_type_client_string_body_get_as_json_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -83,14 +91,14 @@ def build_string_body_get_as_json_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class StringBodyOperations: +class MediaTypeClientStringBodyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.mediatype.MediaTypeClient`'s - :attr:`string_body` attribute. + :attr:`media_type_client_string_body` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -125,7 +133,7 @@ def send_as_text(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc _content = text - _request = build_string_body_send_as_text_request( + _request = build_media_type_client_string_body_send_as_text_request( content_type=content_type, content=_content, headers=_headers, @@ -168,7 +176,7 @@ def get_as_text(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_text_request( + _request = build_media_type_client_string_body_get_as_text_request( headers=_headers, params=_params, ) @@ -229,7 +237,7 @@ def send_as_json(self, text: str, **kwargs: Any) -> None: # pylint: disable=inc _content = json.dumps(text, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_body_send_as_json_request( + _request = build_media_type_client_string_body_send_as_json_request( content_type=content_type, content=_content, headers=_headers, @@ -272,7 +280,7 @@ def get_as_json(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_body_get_as_json_request( + _request = build_media_type_client_string_body_get_as_json_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_client.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_client.py index 6ea2b329db..8a1165857a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/_client.py @@ -9,14 +9,15 @@ from ._configuration import MultiPartClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .formdata.operations import FormDataOperations +from .formdata.operations import MultiPartClientFormDataOperations class MultiPartClient: # pylint: disable=client-accepts-api-version-keyword """Test for multipart. - :ivar form_data: FormDataOperations operations - :vartype form_data: payload.multipart.operations.FormDataOperations + :ivar multi_part_client_form_data: MultiPartClientFormDataOperations operations + :vartype multi_part_client_form_data: + payload.multipart.operations.MultiPartClientFormDataOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.form_data = FormDataOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data = MultiPartClientFormDataOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_client.py index cfc5b1fe28..a9cf62052d 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/aio/_client.py @@ -8,15 +8,16 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..formdata.aio.operations import FormDataOperations +from ..formdata.aio.operations import MultiPartClientFormDataOperations from ._configuration import MultiPartClientConfiguration class MultiPartClient: # pylint: disable=client-accepts-api-version-keyword """Test for multipart. - :ivar form_data: FormDataOperations operations - :vartype form_data: payload.multipart.aio.operations.FormDataOperations + :ivar multi_part_client_form_data: MultiPartClientFormDataOperations operations + :vartype multi_part_client_form_data: + payload.multipart.aio.operations.MultiPartClientFormDataOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.form_data = FormDataOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data = MultiPartClientFormDataOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/__init__.py index 32e35954df..c4ef4801ab 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FormDataOperations # type: ignore +from ._operations import MultiPartClientFormDataOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FormDataOperations", + "MultiPartClientFormDataOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/_operations.py index b5b4cd142e..e4f4934977 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/aio/operations/_operations.py @@ -20,18 +20,18 @@ from ...._utils.serialization import Deserializer, Serializer from ...._utils.utils import prepare_multipart_form_data from ....aio._configuration import MultiPartClientConfiguration -from ...file.aio.operations._operations import FormDataFileOperations -from ...httpparts.aio.operations._operations import FormDataHttpPartsOperations +from ...file.aio.operations._operations import MultiPartClientFormDataFileOperations +from ...httpparts.aio.operations._operations import MultiPartClientFormDataHttpPartsOperations from ...operations._operations import ( - build_form_data_anonymous_model_request, - build_form_data_basic_request, - build_form_data_binary_array_parts_request, - build_form_data_check_file_name_and_content_type_request, - build_form_data_file_array_and_basic_request, - build_form_data_json_part_request, - build_form_data_multi_binary_parts_request, - build_form_data_optional_parts_request, - build_form_data_with_wire_name_request, + build_multi_part_client_form_data_anonymous_model_request, + build_multi_part_client_form_data_basic_request, + build_multi_part_client_form_data_binary_array_parts_request, + build_multi_part_client_form_data_check_file_name_and_content_type_request, + build_multi_part_client_form_data_file_array_and_basic_request, + build_multi_part_client_form_data_json_part_request, + build_multi_part_client_form_data_multi_binary_parts_request, + build_multi_part_client_form_data_optional_parts_request, + build_multi_part_client_form_data_with_wire_name_request, ) JSON = MutableMapping[str, Any] @@ -39,14 +39,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataOperations: +class MultiPartClientFormDataOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`form_data` attribute. + :attr:`multi_part_client_form_data` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -56,8 +56,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) - self.file = FormDataFileOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data_http_parts = MultiPartClientFormDataHttpPartsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.multi_part_client_form_data_file = MultiPartClientFormDataFileOperations( + self._client, self._config, self._serialize, self._deserialize + ) @overload async def basic(self, body: _models3.MultiPartRequest, **kwargs: Any) -> None: @@ -108,7 +112,7 @@ async def basic(self, body: Union[_models3.MultiPartRequest, JSON], **kwargs: An _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_basic_request( + _request = build_multi_part_client_form_data_basic_request( files=_files, headers=_headers, params=_params, @@ -179,7 +183,7 @@ async def with_wire_name(self, body: Union[_models3.MultiPartRequestWithWireName _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_with_wire_name_request( + _request = build_multi_part_client_form_data_with_wire_name_request( files=_files, headers=_headers, params=_params, @@ -250,7 +254,7 @@ async def optional_parts(self, body: Union[_models3.MultiPartOptionalRequest, JS _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_optional_parts_request( + _request = build_multi_part_client_form_data_optional_parts_request( files=_files, headers=_headers, params=_params, @@ -321,7 +325,7 @@ async def file_array_and_basic(self, body: Union[_models3.ComplexPartsRequest, J _data_fields: list[str] = ["id", "address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_array_and_basic_request( + _request = build_multi_part_client_form_data_file_array_and_basic_request( files=_files, headers=_headers, params=_params, @@ -392,7 +396,7 @@ async def json_part(self, body: Union[_models3.JsonPartRequest, JSON], **kwargs: _data_fields: list[str] = ["address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_json_part_request( + _request = build_multi_part_client_form_data_json_part_request( files=_files, headers=_headers, params=_params, @@ -463,7 +467,7 @@ async def binary_array_parts(self, body: Union[_models3.BinaryArrayPartsRequest, _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_binary_array_parts_request( + _request = build_multi_part_client_form_data_binary_array_parts_request( files=_files, headers=_headers, params=_params, @@ -534,7 +538,7 @@ async def multi_binary_parts(self, body: Union[_models3.MultiBinaryPartsRequest, _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_multi_binary_parts_request( + _request = build_multi_part_client_form_data_multi_binary_parts_request( files=_files, headers=_headers, params=_params, @@ -607,7 +611,7 @@ async def check_file_name_and_content_type( _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_check_file_name_and_content_type_request( + _request = build_multi_part_client_form_data_check_file_name_and_content_type_request( files=_files, headers=_headers, params=_params, @@ -678,7 +682,7 @@ async def anonymous_model(self, body: Union[_models2.AnonymousModelRequest, JSON _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_anonymous_model_request( + _request = build_multi_part_client_form_data_anonymous_model_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/aio/operations/_operations.py index fa06202194..ba5d62221e 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/aio/operations/_operations.py @@ -20,9 +20,9 @@ from ....._utils.utils import prepare_multipart_form_data from .....aio._configuration import MultiPartClientConfiguration from ...operations._operations import ( - build_form_data_file_upload_file_array_request, - build_form_data_file_upload_file_required_filename_request, - build_form_data_file_upload_file_specific_content_type_request, + build_multi_part_client_form_data_file_upload_file_array_request, + build_multi_part_client_form_data_file_upload_file_required_filename_request, + build_multi_part_client_form_data_file_upload_file_specific_content_type_request, ) JSON = MutableMapping[str, Any] @@ -30,14 +30,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataFileOperations: +class MultiPartClientFormDataFileOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`file` attribute. + :attr:`multi_part_client_form_data_file` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -101,7 +101,7 @@ async def upload_file_specific_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_specific_content_type_request( + _request = build_multi_part_client_form_data_file_upload_file_specific_content_type_request( files=_files, headers=_headers, params=_params, @@ -176,7 +176,7 @@ async def upload_file_required_filename( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_required_filename_request( + _request = build_multi_part_client_form_data_file_upload_file_required_filename_request( files=_files, headers=_headers, params=_params, @@ -247,7 +247,7 @@ async def upload_file_array(self, body: Union[_models2.UploadFileArrayRequest, J _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_array_request( + _request = build_multi_part_client_form_data_file_upload_file_array_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/operations/_operations.py index 3b0ebc3765..260c456c85 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/file/operations/_operations.py @@ -29,7 +29,7 @@ _SERIALIZER.client_side_validation = False -def build_form_data_file_upload_file_specific_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_specific_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -40,7 +40,7 @@ def build_form_data_file_upload_file_specific_content_type_request( # pylint: d return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_upload_file_required_filename_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_required_filename_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -51,7 +51,9 @@ def build_form_data_file_upload_file_required_filename_request( # pylint: disab return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_upload_file_array_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_upload_file_array_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -60,14 +62,14 @@ def build_form_data_file_upload_file_array_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataFileOperations: +class MultiPartClientFormDataFileOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`file` attribute. + :attr:`multi_part_client_form_data_file` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -131,7 +133,7 @@ def upload_file_specific_content_type( # pylint: disable=inconsistent-return-st _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_specific_content_type_request( + _request = build_multi_part_client_form_data_file_upload_file_specific_content_type_request( files=_files, headers=_headers, params=_params, @@ -204,7 +206,7 @@ def upload_file_required_filename( # pylint: disable=inconsistent-return-statem _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_required_filename_request( + _request = build_multi_part_client_form_data_file_upload_file_required_filename_request( files=_files, headers=_headers, params=_params, @@ -277,7 +279,7 @@ def upload_file_array( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_upload_file_array_request( + _request = build_multi_part_client_form_data_file_upload_file_array_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/aio/operations/_operations.py index 88e0e6c4d7..f24cdc5d97 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/aio/operations/_operations.py @@ -19,23 +19,23 @@ from ....._utils.serialization import Deserializer, Serializer from ....._utils.utils import prepare_multipart_form_data from .....aio._configuration import MultiPartClientConfiguration -from ...contenttype.aio.operations._operations import FormDataHttpPartsContentTypeOperations -from ...nonstring.aio.operations._operations import FormDataHttpPartsNonStringOperations -from ...operations._operations import build_form_data_http_parts_json_array_and_file_array_request +from ...contenttype.aio.operations._operations import MultiPartClientFormDataHttpPartsContentTypeOperations +from ...nonstring.aio.operations._operations import MultiPartClientFormDataHttpPartsNonStringOperations +from ...operations._operations import build_multi_part_client_form_data_http_parts_json_array_and_file_array_request JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataHttpPartsOperations: +class MultiPartClientFormDataHttpPartsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`http_parts` attribute. + :attr:`multi_part_client_form_data_http_parts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -45,10 +45,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.content_type = FormDataHttpPartsContentTypeOperations( - self._client, self._config, self._serialize, self._deserialize + self.multi_part_client_form_data_http_parts_content_type = ( + MultiPartClientFormDataHttpPartsContentTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.non_string = FormDataHttpPartsNonStringOperations( + self.multi_part_client_form_data_http_parts_non_string = MultiPartClientFormDataHttpPartsNonStringOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -103,7 +105,7 @@ async def json_array_and_file_array( _data_fields: list[str] = ["id", "address", "previousAddresses"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_json_array_and_file_array_request( + _request = build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/aio/operations/_operations.py index 8126e20f1a..ba8b8c1b96 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/aio/operations/_operations.py @@ -20,9 +20,9 @@ from ......_utils.utils import prepare_multipart_form_data from ......aio._configuration import MultiPartClientConfiguration from ...operations._operations import ( - build_form_data_http_parts_content_type_image_jpeg_content_type_request, - build_form_data_http_parts_content_type_optional_content_type_request, - build_form_data_http_parts_content_type_required_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request, + build_multi_part_client_form_data_http_parts_content_type_required_content_type_request, ) JSON = MutableMapping[str, Any] @@ -30,14 +30,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataHttpPartsContentTypeOperations: +class MultiPartClientFormDataHttpPartsContentTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`content_type` attribute. + :attr:`multi_part_client_form_data_http_parts_content_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -101,7 +101,7 @@ async def image_jpeg_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_image_jpeg_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( files=_files, headers=_headers, params=_params, @@ -177,7 +177,7 @@ async def required_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_required_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( files=_files, headers=_headers, params=_params, @@ -253,7 +253,7 @@ async def optional_content_type( _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_optional_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/operations/_operations.py index ce1e8d8fdd..a5d8527520 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/contenttype/operations/_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 from collections.abc import MutableMapping from typing import Any, Callable, Optional, TypeVar, Union, overload @@ -29,7 +30,7 @@ _SERIALIZER.client_side_validation = False -def build_form_data_http_parts_content_type_image_jpeg_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -40,7 +41,7 @@ def build_form_data_http_parts_content_type_image_jpeg_content_type_request( # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_content_type_required_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -51,7 +52,7 @@ def build_form_data_http_parts_content_type_required_content_type_request( # py return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_http_parts_content_type_optional_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -62,14 +63,14 @@ def build_form_data_http_parts_content_type_optional_content_type_request( # py return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataHttpPartsContentTypeOperations: +class MultiPartClientFormDataHttpPartsContentTypeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`content_type` attribute. + :attr:`multi_part_client_form_data_http_parts_content_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -131,7 +132,7 @@ def image_jpeg_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_image_jpeg_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_image_jpeg_content_type_request( files=_files, headers=_headers, params=_params, @@ -205,7 +206,7 @@ def required_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_required_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_required_content_type_request( files=_files, headers=_headers, params=_params, @@ -279,7 +280,7 @@ def optional_content_type( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_content_type_optional_content_type_request( + _request = build_multi_part_client_form_data_http_parts_content_type_optional_content_type_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/aio/operations/_operations.py index 2a8c1f21f1..a71649039a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/aio/operations/_operations.py @@ -19,21 +19,21 @@ from ......_utils.serialization import Deserializer, Serializer from ......_utils.utils import prepare_multipart_form_data from ......aio._configuration import MultiPartClientConfiguration -from ...operations._operations import build_form_data_http_parts_non_string_float_request +from ...operations._operations import build_multi_part_client_form_data_http_parts_non_string_float_request JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class FormDataHttpPartsNonStringOperations: +class MultiPartClientFormDataHttpPartsNonStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.aio.MultiPartClient`'s - :attr:`non_string` attribute. + :attr:`multi_part_client_form_data_http_parts_non_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -92,7 +92,7 @@ async def float(self, body: Union[_models2.FloatRequest, JSON], **kwargs: Any) - _data_fields: list[str] = ["temperature"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_non_string_float_request( + _request = build_multi_part_client_form_data_http_parts_non_string_float_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/operations/_operations.py index df81cc4626..ec72d39cb7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/nonstring/operations/_operations.py @@ -29,7 +29,9 @@ _SERIALIZER.client_side_validation = False -def build_form_data_http_parts_non_string_float_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_non_string_float_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -38,14 +40,14 @@ def build_form_data_http_parts_non_string_float_request(**kwargs: Any) -> HttpRe return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataHttpPartsNonStringOperations: +class MultiPartClientFormDataHttpPartsNonStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`non_string` attribute. + :attr:`multi_part_client_form_data_http_parts_non_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +108,7 @@ def float( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["temperature"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_non_string_float_request( + _request = build_multi_part_client_form_data_http_parts_non_string_float_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/operations/_operations.py index 375fa67116..c77888ce45 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/httpparts/operations/_operations.py @@ -20,8 +20,8 @@ from ...._utils.model_base import Model as _Model from ...._utils.serialization import Deserializer, Serializer from ...._utils.utils import prepare_multipart_form_data -from ..contenttype.operations._operations import FormDataHttpPartsContentTypeOperations -from ..nonstring.operations._operations import FormDataHttpPartsNonStringOperations +from ..contenttype.operations._operations import MultiPartClientFormDataHttpPartsContentTypeOperations +from ..nonstring.operations._operations import MultiPartClientFormDataHttpPartsNonStringOperations JSON = MutableMapping[str, Any] T = TypeVar("T") @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_form_data_http_parts_json_array_and_file_array_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -42,14 +42,14 @@ def build_form_data_http_parts_json_array_and_file_array_request( # pylint: dis return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataHttpPartsOperations: +class MultiPartClientFormDataHttpPartsOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`http_parts` attribute. + :attr:`multi_part_client_form_data_http_parts` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -59,10 +59,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.content_type = FormDataHttpPartsContentTypeOperations( - self._client, self._config, self._serialize, self._deserialize + self.multi_part_client_form_data_http_parts_content_type = ( + MultiPartClientFormDataHttpPartsContentTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.non_string = FormDataHttpPartsNonStringOperations( + self.multi_part_client_form_data_http_parts_non_string = MultiPartClientFormDataHttpPartsNonStringOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -117,7 +119,7 @@ def json_array_and_file_array( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id", "address", "previousAddresses"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_http_parts_json_array_and_file_array_request( + _request = build_multi_part_client_form_data_http_parts_json_array_and_file_array_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/__init__.py index 32e35954df..c4ef4801ab 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import FormDataOperations # type: ignore +from ._operations import MultiPartClientFormDataOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "FormDataOperations", + "MultiPartClientFormDataOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/_operations.py index b892bbb269..f6d6cc3a43 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-multipart/payload/multipart/formdata/operations/_operations.py @@ -21,8 +21,8 @@ from ..._utils.model_base import Model as _Model from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import prepare_multipart_form_data -from ..file.operations._operations import FormDataFileOperations -from ..httpparts.operations._operations import FormDataHttpPartsOperations +from ..file.operations._operations import MultiPartClientFormDataFileOperations +from ..httpparts.operations._operations import MultiPartClientFormDataHttpPartsOperations JSON = MutableMapping[str, Any] T = TypeVar("T") @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_form_data_basic_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_basic_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -41,7 +41,9 @@ def build_form_data_basic_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_with_wire_name_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_with_wire_name_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -50,7 +52,9 @@ def build_form_data_with_wire_name_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_optional_parts_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_optional_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -59,7 +63,9 @@ def build_form_data_optional_parts_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_file_array_and_basic_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_file_array_and_basic_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -68,7 +74,7 @@ def build_form_data_file_array_and_basic_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_json_part_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_json_part_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -77,7 +83,9 @@ def build_form_data_json_part_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_binary_array_parts_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_binary_array_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -86,7 +94,9 @@ def build_form_data_binary_array_parts_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_multi_binary_parts_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_multi_part_client_form_data_multi_binary_parts_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -95,7 +105,7 @@ def build_form_data_multi_binary_parts_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_check_file_name_and_content_type_request( # pylint: disable=name-too-long +def build_multi_part_client_form_data_check_file_name_and_content_type_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -106,7 +116,9 @@ def build_form_data_check_file_name_and_content_type_request( # pylint: disable return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_form_data_anonymous_model_request(**kwargs: Any) -> HttpRequest: +def build_multi_part_client_form_data_anonymous_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) # Construct URL @@ -115,14 +127,14 @@ def build_form_data_anonymous_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class FormDataOperations: +class MultiPartClientFormDataOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.multipart.MultiPartClient`'s - :attr:`form_data` attribute. + :attr:`multi_part_client_form_data` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -132,8 +144,12 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.http_parts = FormDataHttpPartsOperations(self._client, self._config, self._serialize, self._deserialize) - self.file = FormDataFileOperations(self._client, self._config, self._serialize, self._deserialize) + self.multi_part_client_form_data_http_parts = MultiPartClientFormDataHttpPartsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.multi_part_client_form_data_file = MultiPartClientFormDataFileOperations( + self._client, self._config, self._serialize, self._deserialize + ) @overload def basic(self, body: _models2.MultiPartRequest, **kwargs: Any) -> None: @@ -186,7 +202,7 @@ def basic( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_basic_request( + _request = build_multi_part_client_form_data_basic_request( files=_files, headers=_headers, params=_params, @@ -259,7 +275,7 @@ def with_wire_name( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_with_wire_name_request( + _request = build_multi_part_client_form_data_with_wire_name_request( files=_files, headers=_headers, params=_params, @@ -332,7 +348,7 @@ def optional_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_optional_parts_request( + _request = build_multi_part_client_form_data_optional_parts_request( files=_files, headers=_headers, params=_params, @@ -405,7 +421,7 @@ def file_array_and_basic( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id", "address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_file_array_and_basic_request( + _request = build_multi_part_client_form_data_file_array_and_basic_request( files=_files, headers=_headers, params=_params, @@ -478,7 +494,7 @@ def json_part( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["address"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_json_part_request( + _request = build_multi_part_client_form_data_json_part_request( files=_files, headers=_headers, params=_params, @@ -551,7 +567,7 @@ def binary_array_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_binary_array_parts_request( + _request = build_multi_part_client_form_data_binary_array_parts_request( files=_files, headers=_headers, params=_params, @@ -624,7 +640,7 @@ def multi_binary_parts( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_multi_binary_parts_request( + _request = build_multi_part_client_form_data_multi_binary_parts_request( files=_files, headers=_headers, params=_params, @@ -697,7 +713,7 @@ def check_file_name_and_content_type( # pylint: disable=inconsistent-return-sta _data_fields: list[str] = ["id"] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_check_file_name_and_content_type_request( + _request = build_multi_part_client_form_data_check_file_name_and_content_type_request( files=_files, headers=_headers, params=_params, @@ -770,7 +786,7 @@ def anonymous_model( # pylint: disable=inconsistent-return-statements _data_fields: list[str] = [] _files = prepare_multipart_form_data(_body, _file_fields, _data_fields) - _request = build_form_data_anonymous_model_request( + _request = build_multi_part_client_form_data_anonymous_model_request( files=_files, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_client.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_client.py index dc031a8f67..ea0ff55de4 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/_client.py @@ -9,20 +9,24 @@ from ._configuration import PageableClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .pagesize.operations import PageSizeOperations -from .serverdrivenpagination.operations import ServerDrivenPaginationOperations -from .xmlpagination.operations import XmlPaginationOperations +from .pagesize.operations import PageableClientPageSizeOperations +from .serverdrivenpagination.operations import PageableClientServerDrivenPaginationOperations +from .xmlpagination.operations import PageableClientXmlPaginationOperations class PageableClient: # pylint: disable=client-accepts-api-version-keyword """Test for pageable payload. - :ivar server_driven_pagination: ServerDrivenPaginationOperations operations - :vartype server_driven_pagination: payload.pageable.operations.ServerDrivenPaginationOperations - :ivar page_size: PageSizeOperations operations - :vartype page_size: payload.pageable.operations.PageSizeOperations - :ivar xml_pagination: XmlPaginationOperations operations - :vartype xml_pagination: payload.pageable.operations.XmlPaginationOperations + :ivar pageable_client_server_driven_pagination: PageableClientServerDrivenPaginationOperations + operations + :vartype pageable_client_server_driven_pagination: + payload.pageable.operations.PageableClientServerDrivenPaginationOperations + :ivar pageable_client_page_size: PageableClientPageSizeOperations operations + :vartype pageable_client_page_size: + payload.pageable.operations.PageableClientPageSizeOperations + :ivar pageable_client_xml_pagination: PageableClientXmlPaginationOperations operations + :vartype pageable_client_xml_pagination: + payload.pageable.operations.PageableClientXmlPaginationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -49,11 +53,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.server_driven_pagination = ServerDrivenPaginationOperations( + self.pageable_client_server_driven_pagination = PageableClientServerDrivenPaginationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_page_size = PageableClientPageSizeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_xml_pagination = PageableClientXmlPaginationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.page_size = PageSizeOperations(self._client, self._config, self._serialize, self._deserialize) - self.xml_pagination = XmlPaginationOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_client.py index ad05d7bcea..6de973a725 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/aio/_client.py @@ -8,22 +8,25 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..pagesize.aio.operations import PageSizeOperations -from ..serverdrivenpagination.aio.operations import ServerDrivenPaginationOperations -from ..xmlpagination.aio.operations import XmlPaginationOperations +from ..pagesize.aio.operations import PageableClientPageSizeOperations +from ..serverdrivenpagination.aio.operations import PageableClientServerDrivenPaginationOperations +from ..xmlpagination.aio.operations import PageableClientXmlPaginationOperations from ._configuration import PageableClientConfiguration class PageableClient: # pylint: disable=client-accepts-api-version-keyword """Test for pageable payload. - :ivar server_driven_pagination: ServerDrivenPaginationOperations operations - :vartype server_driven_pagination: - payload.pageable.aio.operations.ServerDrivenPaginationOperations - :ivar page_size: PageSizeOperations operations - :vartype page_size: payload.pageable.aio.operations.PageSizeOperations - :ivar xml_pagination: XmlPaginationOperations operations - :vartype xml_pagination: payload.pageable.aio.operations.XmlPaginationOperations + :ivar pageable_client_server_driven_pagination: PageableClientServerDrivenPaginationOperations + operations + :vartype pageable_client_server_driven_pagination: + payload.pageable.aio.operations.PageableClientServerDrivenPaginationOperations + :ivar pageable_client_page_size: PageableClientPageSizeOperations operations + :vartype pageable_client_page_size: + payload.pageable.aio.operations.PageableClientPageSizeOperations + :ivar pageable_client_xml_pagination: PageableClientXmlPaginationOperations operations + :vartype pageable_client_xml_pagination: + payload.pageable.aio.operations.PageableClientXmlPaginationOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -50,11 +53,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.server_driven_pagination = ServerDrivenPaginationOperations( + self.pageable_client_server_driven_pagination = PageableClientServerDrivenPaginationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_page_size = PageableClientPageSizeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.pageable_client_xml_pagination = PageableClientXmlPaginationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.page_size = PageSizeOperations(self._client, self._config, self._serialize, self._deserialize) - self.xml_pagination = XmlPaginationOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py index 0a569d9ac8..1dffcdd7bc 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PageSizeOperations # type: ignore +from ._operations import PageableClientPageSizeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PageSizeOperations", + "PageableClientPageSizeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py index a807bee5a7..44770ada42 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/aio/operations/_operations.py @@ -20,22 +20,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_page_size_list_with_page_size_request, - build_page_size_list_without_continuation_request, + build_pageable_client_page_size_list_with_page_size_request, + build_pageable_client_page_size_list_without_continuation_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PageSizeOperations: +class PageableClientPageSizeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`page_size` attribute. + :attr:`pageable_client_page_size` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ def list_without_continuation(self, **kwargs: Any) -> AsyncItemPaged["_models3.P def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_without_continuation_request( + _request = build_pageable_client_page_size_list_without_continuation_request( headers=_headers, params=_params, ) @@ -137,7 +137,7 @@ def list_with_page_size(self, *, page_size: Optional[int] = None, **kwargs: Any) def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_with_page_size_request( + _request = build_pageable_client_page_size_list_with_page_size_request( page_size=page_size, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py index 0a569d9ac8..1dffcdd7bc 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PageSizeOperations # type: ignore +from ._operations import PageableClientPageSizeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PageSizeOperations", + "PageableClientPageSizeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py index 1f5ecc8868..e0434cc50f 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/pagesize/operations/_operations.py @@ -28,7 +28,9 @@ _SERIALIZER.client_side_validation = False -def build_page_size_list_without_continuation_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_page_size_list_without_continuation_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -42,7 +44,7 @@ def build_page_size_list_without_continuation_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_page_size_list_with_page_size_request( # pylint: disable=name-too-long +def build_pageable_client_page_size_list_with_page_size_request( # pylint: disable=name-too-long *, page_size: Optional[int] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -63,14 +65,14 @@ def build_page_size_list_with_page_size_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class PageSizeOperations: +class PageableClientPageSizeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`page_size` attribute. + :attr:`pageable_client_page_size` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -103,7 +105,7 @@ def list_without_continuation(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_without_continuation_request( + _request = build_pageable_client_page_size_list_without_continuation_request( headers=_headers, params=_params, ) @@ -172,7 +174,7 @@ def list_with_page_size(self, *, page_size: Optional[int] = None, **kwargs: Any) def prepare_request(next_link=None): if not next_link: - _request = build_page_size_list_with_page_size_request( + _request = build_pageable_client_page_size_list_with_page_size_request( page_size=page_size, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py index 7c9450d097..0939de9a3c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ServerDrivenPaginationOperations # type: ignore +from ._operations import PageableClientServerDrivenPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ServerDrivenPaginationOperations", + "PageableClientServerDrivenPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py index 9906ca03bf..afd4b03ffa 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/aio/operations/_operations.py @@ -19,25 +19,27 @@ from ...._utils.model_base import _deserialize from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration -from ...continuationtoken.aio.operations._operations import ServerDrivenPaginationContinuationTokenOperations +from ...continuationtoken.aio.operations._operations import ( + PageableClientServerDrivenPaginationContinuationTokenOperations, +) from ...operations._operations import ( - build_server_driven_pagination_link_request, - build_server_driven_pagination_link_string_request, - build_server_driven_pagination_nested_link_request, + build_pageable_client_server_driven_pagination_link_request, + build_pageable_client_server_driven_pagination_link_string_request, + build_pageable_client_server_driven_pagination_nested_link_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ServerDrivenPaginationOperations: +class PageableClientServerDrivenPaginationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`server_driven_pagination` attribute. + :attr:`pageable_client_server_driven_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -47,8 +49,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.continuation_token = ServerDrivenPaginationContinuationTokenOperations( - self._client, self._config, self._serialize, self._deserialize + self.pageable_client_server_driven_pagination_continuation_token = ( + PageableClientServerDrivenPaginationContinuationTokenOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) def link(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: @@ -74,7 +78,7 @@ def link(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_request( + _request = build_pageable_client_server_driven_pagination_link_request( headers=_headers, params=_params, ) @@ -141,7 +145,7 @@ def link_string(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_string_request( + _request = build_pageable_client_server_driven_pagination_link_string_request( headers=_headers, params=_params, ) @@ -208,7 +212,7 @@ def nested_link(self, **kwargs: Any) -> AsyncItemPaged["_models3.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_nested_link_request( + _request = build_pageable_client_server_driven_pagination_nested_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py index 1a9e297c67..bcdcb8016a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/aio/operations/_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 from collections.abc import MutableMapping from typing import Any, Callable, Optional, TypeVar @@ -20,26 +21,26 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_server_driven_pagination_continuation_token_request_header_nested_response_body_request, - build_server_driven_pagination_continuation_token_request_header_response_body_request, - build_server_driven_pagination_continuation_token_request_header_response_header_request, - build_server_driven_pagination_continuation_token_request_query_nested_response_body_request, - build_server_driven_pagination_continuation_token_request_query_response_body_request, - build_server_driven_pagination_continuation_token_request_query_response_header_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request, + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long +class PageableClientServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`continuation_token` attribute. + :attr:`pageable_client_server_driven_pagination_continuation_token` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -77,12 +78,14 @@ def request_query_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -140,12 +143,14 @@ def request_header_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -203,12 +208,14 @@ def request_query_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_header_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -266,7 +273,7 @@ def request_header_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_header_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( token=_continuation_token, foo=foo, bar=bar, @@ -329,7 +336,7 @@ def request_query_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, @@ -392,7 +399,7 @@ def request_header_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py index ca7d63352d..c7a5079603 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/continuationtoken/operations/_operations.py @@ -29,7 +29,7 @@ _SERIALIZER.client_side_validation = False -def build_server_driven_pagination_continuation_token_request_query_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -54,7 +54,7 @@ def build_server_driven_pagination_continuation_token_request_query_response_bod return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -79,7 +79,7 @@ def build_server_driven_pagination_continuation_token_request_header_response_bo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_query_response_header_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -104,7 +104,7 @@ def build_server_driven_pagination_continuation_token_request_query_response_hea return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_response_header_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -129,7 +129,7 @@ def build_server_driven_pagination_continuation_token_request_header_response_he return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -154,7 +154,7 @@ def build_server_driven_pagination_continuation_token_request_query_nested_respo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( # pylint: disable=name-too-long *, token: Optional[str] = None, foo: Optional[str] = None, bar: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -179,14 +179,14 @@ def build_server_driven_pagination_continuation_token_request_header_nested_resp return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class ServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long +class PageableClientServerDrivenPaginationContinuationTokenOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`continuation_token` attribute. + :attr:`pageable_client_server_driven_pagination_continuation_token` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -224,12 +224,14 @@ def request_query_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -287,12 +289,14 @@ def request_header_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_body_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_header_response_body_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -350,12 +354,14 @@ def request_query_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_response_header_request( - token=_continuation_token, - foo=foo, - bar=bar, - headers=_headers, - params=_params, + _request = ( + build_pageable_client_server_driven_pagination_continuation_token_request_query_response_header_request( + token=_continuation_token, + foo=foo, + bar=bar, + headers=_headers, + params=_params, + ) ) path_format_arguments = { "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), @@ -413,7 +419,7 @@ def request_header_response_header( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_response_header_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_response_header_request( token=_continuation_token, foo=foo, bar=bar, @@ -476,7 +482,7 @@ def request_query_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_query_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_query_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, @@ -539,7 +545,7 @@ def request_header_nested_response_body( def prepare_request(_continuation_token=None): - _request = build_server_driven_pagination_continuation_token_request_header_nested_response_body_request( + _request = build_pageable_client_server_driven_pagination_continuation_token_request_header_nested_response_body_request( token=_continuation_token, foo=foo, bar=bar, diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py index 7c9450d097..0939de9a3c 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ServerDrivenPaginationOperations # type: ignore +from ._operations import PageableClientServerDrivenPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ServerDrivenPaginationOperations", + "PageableClientServerDrivenPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py index 1a39050715..5596254be7 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/serverdrivenpagination/operations/_operations.py @@ -20,7 +20,7 @@ from ..._configuration import PageableClientConfiguration from ..._utils.model_base import _deserialize from ..._utils.serialization import Deserializer, Serializer -from ..continuationtoken.operations._operations import ServerDrivenPaginationContinuationTokenOperations +from ..continuationtoken.operations._operations import PageableClientServerDrivenPaginationContinuationTokenOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -29,7 +29,9 @@ _SERIALIZER.client_side_validation = False -def build_server_driven_pagination_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -43,7 +45,9 @@ def build_server_driven_pagination_link_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_server_driven_pagination_link_string_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_link_string_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -57,7 +61,9 @@ def build_server_driven_pagination_link_string_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_server_driven_pagination_nested_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_server_driven_pagination_nested_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -71,14 +77,14 @@ def build_server_driven_pagination_nested_link_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class ServerDrivenPaginationOperations: +class PageableClientServerDrivenPaginationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`server_driven_pagination` attribute. + :attr:`pageable_client_server_driven_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -88,8 +94,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.continuation_token = ServerDrivenPaginationContinuationTokenOperations( - self._client, self._config, self._serialize, self._deserialize + self.pageable_client_server_driven_pagination_continuation_token = ( + PageableClientServerDrivenPaginationContinuationTokenOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) def link(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: @@ -115,7 +123,7 @@ def link(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_request( + _request = build_pageable_client_server_driven_pagination_link_request( headers=_headers, params=_params, ) @@ -182,7 +190,7 @@ def link_string(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_link_string_request( + _request = build_pageable_client_server_driven_pagination_link_string_request( headers=_headers, params=_params, ) @@ -249,7 +257,7 @@ def nested_link(self, **kwargs: Any) -> ItemPaged["_models2.Pet"]: def prepare_request(next_link=None): if not next_link: - _request = build_server_driven_pagination_nested_link_request( + _request = build_pageable_client_server_driven_pagination_nested_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py index c0046a5fec..7840767102 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import XmlPaginationOperations # type: ignore +from ._operations import PageableClientXmlPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "XmlPaginationOperations", + "PageableClientXmlPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py index 138b7b05d1..417115bfd9 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/aio/operations/_operations.py @@ -21,22 +21,22 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import PageableClientConfiguration from ...operations._operations import ( - build_xml_pagination_list_with_continuation_request, - build_xml_pagination_list_with_next_link_request, + build_pageable_client_xml_pagination_list_with_continuation_request, + build_pageable_client_xml_pagination_list_with_next_link_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class XmlPaginationOperations: +class PageableClientXmlPaginationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.aio.PageableClient`'s - :attr:`xml_pagination` attribute. + :attr:`pageable_client_xml_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -68,7 +68,7 @@ def list_with_continuation(self, **kwargs: Any) -> AsyncItemPaged["_models3.XmlP def prepare_request(_continuation_token=None): - _request = build_xml_pagination_list_with_continuation_request( + _request = build_pageable_client_xml_pagination_list_with_continuation_request( marker=_continuation_token, headers=_headers, params=_params, @@ -125,7 +125,7 @@ def list_with_next_link(self, **kwargs: Any) -> AsyncItemPaged["_models3.XmlPet" def prepare_request(next_link=None): if not next_link: - _request = build_xml_pagination_list_with_next_link_request( + _request = build_pageable_client_xml_pagination_list_with_next_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py index c0046a5fec..7840767102 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import XmlPaginationOperations # type: ignore +from ._operations import PageableClientXmlPaginationOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "XmlPaginationOperations", + "PageableClientXmlPaginationOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py index 06b715ffb3..8ec7ecf02d 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-pageable/payload/pageable/xmlpagination/operations/_operations.py @@ -29,7 +29,7 @@ _SERIALIZER.client_side_validation = False -def build_xml_pagination_list_with_continuation_request( # pylint: disable=name-too-long +def build_pageable_client_xml_pagination_list_with_continuation_request( # pylint: disable=name-too-long *, marker: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -50,7 +50,9 @@ def build_xml_pagination_list_with_continuation_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_xml_pagination_list_with_next_link_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_pageable_client_xml_pagination_list_with_next_link_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -64,14 +66,14 @@ def build_xml_pagination_list_with_next_link_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class XmlPaginationOperations: +class PageableClientXmlPaginationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.pageable.PageableClient`'s - :attr:`xml_pagination` attribute. + :attr:`pageable_client_xml_pagination` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -103,7 +105,7 @@ def list_with_continuation(self, **kwargs: Any) -> ItemPaged["_models2.XmlPet"]: def prepare_request(_continuation_token=None): - _request = build_xml_pagination_list_with_continuation_request( + _request = build_pageable_client_xml_pagination_list_with_continuation_request( marker=_continuation_token, headers=_headers, params=_params, @@ -160,7 +162,7 @@ def list_with_next_link(self, **kwargs: Any) -> ItemPaged["_models2.XmlPet"]: def prepare_request(next_link=None): if not next_link: - _request = build_xml_pagination_list_with_next_link_request( + _request = build_pageable_client_xml_pagination_list_with_next_link_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_client.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_client.py index 84aa0595c5..048d1bd3df 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/_client.py @@ -10,65 +10,73 @@ from ._configuration import XmlClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - ModelWithArrayOfModelValueOperations, - ModelWithAttributesValueOperations, - ModelWithDatetimeValueOperations, - ModelWithDictionaryValueOperations, - ModelWithEmptyArrayValueOperations, - ModelWithEncodedNamesValueOperations, - ModelWithEnumValueOperations, - ModelWithOptionalFieldValueOperations, - ModelWithRenamedArraysValueOperations, - ModelWithRenamedFieldsValueOperations, - ModelWithSimpleArraysValueOperations, - ModelWithTextValueOperations, - ModelWithUnwrappedArrayValueOperations, - SimpleModelValueOperations, - XmlErrorValueOperations, + XmlClientModelWithArrayOfModelValueOperations, + XmlClientModelWithAttributesValueOperations, + XmlClientModelWithDictionaryValueOperations, + XmlClientModelWithEmptyArrayValueOperations, + XmlClientModelWithEncodedNamesValueOperations, + XmlClientModelWithOptionalFieldValueOperations, + XmlClientModelWithRenamedArraysValueOperations, + XmlClientModelWithRenamedFieldsValueOperations, + XmlClientModelWithSimpleArraysValueOperations, + XmlClientModelWithTextValueOperations, + XmlClientModelWithUnwrappedArrayValueOperations, + XmlClientSimpleModelValueOperations, + XmlClientXmlErrorValueOperations, ) class XmlClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Sends and receives bodies in XML format. - :ivar simple_model_value: SimpleModelValueOperations operations - :vartype simple_model_value: payload.xml.operations.SimpleModelValueOperations - :ivar model_with_simple_arrays_value: ModelWithSimpleArraysValueOperations operations - :vartype model_with_simple_arrays_value: - payload.xml.operations.ModelWithSimpleArraysValueOperations - :ivar model_with_array_of_model_value: ModelWithArrayOfModelValueOperations operations - :vartype model_with_array_of_model_value: - payload.xml.operations.ModelWithArrayOfModelValueOperations - :ivar model_with_optional_field_value: ModelWithOptionalFieldValueOperations operations - :vartype model_with_optional_field_value: - payload.xml.operations.ModelWithOptionalFieldValueOperations - :ivar model_with_attributes_value: ModelWithAttributesValueOperations operations - :vartype model_with_attributes_value: payload.xml.operations.ModelWithAttributesValueOperations - :ivar model_with_unwrapped_array_value: ModelWithUnwrappedArrayValueOperations operations - :vartype model_with_unwrapped_array_value: - payload.xml.operations.ModelWithUnwrappedArrayValueOperations - :ivar model_with_renamed_arrays_value: ModelWithRenamedArraysValueOperations operations - :vartype model_with_renamed_arrays_value: - payload.xml.operations.ModelWithRenamedArraysValueOperations - :ivar model_with_renamed_fields_value: ModelWithRenamedFieldsValueOperations operations - :vartype model_with_renamed_fields_value: - payload.xml.operations.ModelWithRenamedFieldsValueOperations - :ivar model_with_empty_array_value: ModelWithEmptyArrayValueOperations operations - :vartype model_with_empty_array_value: - payload.xml.operations.ModelWithEmptyArrayValueOperations - :ivar model_with_text_value: ModelWithTextValueOperations operations - :vartype model_with_text_value: payload.xml.operations.ModelWithTextValueOperations - :ivar model_with_dictionary_value: ModelWithDictionaryValueOperations operations - :vartype model_with_dictionary_value: payload.xml.operations.ModelWithDictionaryValueOperations - :ivar model_with_encoded_names_value: ModelWithEncodedNamesValueOperations operations - :vartype model_with_encoded_names_value: - payload.xml.operations.ModelWithEncodedNamesValueOperations - :ivar model_with_enum_value: ModelWithEnumValueOperations operations - :vartype model_with_enum_value: payload.xml.operations.ModelWithEnumValueOperations - :ivar model_with_datetime_value: ModelWithDatetimeValueOperations operations - :vartype model_with_datetime_value: payload.xml.operations.ModelWithDatetimeValueOperations - :ivar xml_error_value: XmlErrorValueOperations operations - :vartype xml_error_value: payload.xml.operations.XmlErrorValueOperations + :ivar xml_client_simple_model_value: XmlClientSimpleModelValueOperations operations + :vartype xml_client_simple_model_value: + payload.xml.operations.XmlClientSimpleModelValueOperations + :ivar xml_client_model_with_simple_arrays_value: XmlClientModelWithSimpleArraysValueOperations + operations + :vartype xml_client_model_with_simple_arrays_value: + payload.xml.operations.XmlClientModelWithSimpleArraysValueOperations + :ivar xml_client_model_with_array_of_model_value: XmlClientModelWithArrayOfModelValueOperations + operations + :vartype xml_client_model_with_array_of_model_value: + payload.xml.operations.XmlClientModelWithArrayOfModelValueOperations + :ivar xml_client_model_with_optional_field_value: + XmlClientModelWithOptionalFieldValueOperations operations + :vartype xml_client_model_with_optional_field_value: + payload.xml.operations.XmlClientModelWithOptionalFieldValueOperations + :ivar xml_client_model_with_attributes_value: XmlClientModelWithAttributesValueOperations + operations + :vartype xml_client_model_with_attributes_value: + payload.xml.operations.XmlClientModelWithAttributesValueOperations + :ivar xml_client_model_with_unwrapped_array_value: + XmlClientModelWithUnwrappedArrayValueOperations operations + :vartype xml_client_model_with_unwrapped_array_value: + payload.xml.operations.XmlClientModelWithUnwrappedArrayValueOperations + :ivar xml_client_model_with_renamed_arrays_value: + XmlClientModelWithRenamedArraysValueOperations operations + :vartype xml_client_model_with_renamed_arrays_value: + payload.xml.operations.XmlClientModelWithRenamedArraysValueOperations + :ivar xml_client_model_with_renamed_fields_value: + XmlClientModelWithRenamedFieldsValueOperations operations + :vartype xml_client_model_with_renamed_fields_value: + payload.xml.operations.XmlClientModelWithRenamedFieldsValueOperations + :ivar xml_client_model_with_empty_array_value: XmlClientModelWithEmptyArrayValueOperations + operations + :vartype xml_client_model_with_empty_array_value: + payload.xml.operations.XmlClientModelWithEmptyArrayValueOperations + :ivar xml_client_model_with_text_value: XmlClientModelWithTextValueOperations operations + :vartype xml_client_model_with_text_value: + payload.xml.operations.XmlClientModelWithTextValueOperations + :ivar xml_client_model_with_dictionary_value: XmlClientModelWithDictionaryValueOperations + operations + :vartype xml_client_model_with_dictionary_value: + payload.xml.operations.XmlClientModelWithDictionaryValueOperations + :ivar xml_client_model_with_encoded_names_value: XmlClientModelWithEncodedNamesValueOperations + operations + :vartype xml_client_model_with_encoded_names_value: + payload.xml.operations.XmlClientModelWithEncodedNamesValueOperations + :ivar xml_client_xml_error_value: XmlClientXmlErrorValueOperations operations + :vartype xml_client_xml_error_value: payload.xml.operations.XmlClientXmlErrorValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -95,49 +103,45 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.simple_model_value = SimpleModelValueOperations( + self.xml_client_simple_model_value = XmlClientSimpleModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_simple_arrays_value = ModelWithSimpleArraysValueOperations( + self.xml_client_model_with_simple_arrays_value = XmlClientModelWithSimpleArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_array_of_model_value = ModelWithArrayOfModelValueOperations( + self.xml_client_model_with_array_of_model_value = XmlClientModelWithArrayOfModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_optional_field_value = ModelWithOptionalFieldValueOperations( + self.xml_client_model_with_optional_field_value = XmlClientModelWithOptionalFieldValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_attributes_value = ModelWithAttributesValueOperations( + self.xml_client_model_with_attributes_value = XmlClientModelWithAttributesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_unwrapped_array_value = ModelWithUnwrappedArrayValueOperations( + self.xml_client_model_with_unwrapped_array_value = XmlClientModelWithUnwrappedArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_arrays_value = ModelWithRenamedArraysValueOperations( + self.xml_client_model_with_renamed_arrays_value = XmlClientModelWithRenamedArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_fields_value = ModelWithRenamedFieldsValueOperations( + self.xml_client_model_with_renamed_fields_value = XmlClientModelWithRenamedFieldsValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_empty_array_value = ModelWithEmptyArrayValueOperations( + self.xml_client_model_with_empty_array_value = XmlClientModelWithEmptyArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_text_value = ModelWithTextValueOperations( + self.xml_client_model_with_text_value = XmlClientModelWithTextValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_dictionary_value = ModelWithDictionaryValueOperations( + self.xml_client_model_with_dictionary_value = XmlClientModelWithDictionaryValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_encoded_names_value = ModelWithEncodedNamesValueOperations( + self.xml_client_model_with_encoded_names_value = XmlClientModelWithEncodedNamesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_enum_value = ModelWithEnumValueOperations( + self.xml_client_xml_error_value = XmlClientXmlErrorValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_datetime_value = ModelWithDatetimeValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.xml_error_value = XmlErrorValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/_client.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/_client.py index d935954210..c8874f91b5 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/_client.py @@ -10,67 +10,74 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import XmlClientConfiguration from .operations import ( - ModelWithArrayOfModelValueOperations, - ModelWithAttributesValueOperations, - ModelWithDatetimeValueOperations, - ModelWithDictionaryValueOperations, - ModelWithEmptyArrayValueOperations, - ModelWithEncodedNamesValueOperations, - ModelWithEnumValueOperations, - ModelWithOptionalFieldValueOperations, - ModelWithRenamedArraysValueOperations, - ModelWithRenamedFieldsValueOperations, - ModelWithSimpleArraysValueOperations, - ModelWithTextValueOperations, - ModelWithUnwrappedArrayValueOperations, - SimpleModelValueOperations, - XmlErrorValueOperations, + XmlClientModelWithArrayOfModelValueOperations, + XmlClientModelWithAttributesValueOperations, + XmlClientModelWithDictionaryValueOperations, + XmlClientModelWithEmptyArrayValueOperations, + XmlClientModelWithEncodedNamesValueOperations, + XmlClientModelWithOptionalFieldValueOperations, + XmlClientModelWithRenamedArraysValueOperations, + XmlClientModelWithRenamedFieldsValueOperations, + XmlClientModelWithSimpleArraysValueOperations, + XmlClientModelWithTextValueOperations, + XmlClientModelWithUnwrappedArrayValueOperations, + XmlClientSimpleModelValueOperations, + XmlClientXmlErrorValueOperations, ) class XmlClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Sends and receives bodies in XML format. - :ivar simple_model_value: SimpleModelValueOperations operations - :vartype simple_model_value: payload.xml.aio.operations.SimpleModelValueOperations - :ivar model_with_simple_arrays_value: ModelWithSimpleArraysValueOperations operations - :vartype model_with_simple_arrays_value: - payload.xml.aio.operations.ModelWithSimpleArraysValueOperations - :ivar model_with_array_of_model_value: ModelWithArrayOfModelValueOperations operations - :vartype model_with_array_of_model_value: - payload.xml.aio.operations.ModelWithArrayOfModelValueOperations - :ivar model_with_optional_field_value: ModelWithOptionalFieldValueOperations operations - :vartype model_with_optional_field_value: - payload.xml.aio.operations.ModelWithOptionalFieldValueOperations - :ivar model_with_attributes_value: ModelWithAttributesValueOperations operations - :vartype model_with_attributes_value: - payload.xml.aio.operations.ModelWithAttributesValueOperations - :ivar model_with_unwrapped_array_value: ModelWithUnwrappedArrayValueOperations operations - :vartype model_with_unwrapped_array_value: - payload.xml.aio.operations.ModelWithUnwrappedArrayValueOperations - :ivar model_with_renamed_arrays_value: ModelWithRenamedArraysValueOperations operations - :vartype model_with_renamed_arrays_value: - payload.xml.aio.operations.ModelWithRenamedArraysValueOperations - :ivar model_with_renamed_fields_value: ModelWithRenamedFieldsValueOperations operations - :vartype model_with_renamed_fields_value: - payload.xml.aio.operations.ModelWithRenamedFieldsValueOperations - :ivar model_with_empty_array_value: ModelWithEmptyArrayValueOperations operations - :vartype model_with_empty_array_value: - payload.xml.aio.operations.ModelWithEmptyArrayValueOperations - :ivar model_with_text_value: ModelWithTextValueOperations operations - :vartype model_with_text_value: payload.xml.aio.operations.ModelWithTextValueOperations - :ivar model_with_dictionary_value: ModelWithDictionaryValueOperations operations - :vartype model_with_dictionary_value: - payload.xml.aio.operations.ModelWithDictionaryValueOperations - :ivar model_with_encoded_names_value: ModelWithEncodedNamesValueOperations operations - :vartype model_with_encoded_names_value: - payload.xml.aio.operations.ModelWithEncodedNamesValueOperations - :ivar model_with_enum_value: ModelWithEnumValueOperations operations - :vartype model_with_enum_value: payload.xml.aio.operations.ModelWithEnumValueOperations - :ivar model_with_datetime_value: ModelWithDatetimeValueOperations operations - :vartype model_with_datetime_value: payload.xml.aio.operations.ModelWithDatetimeValueOperations - :ivar xml_error_value: XmlErrorValueOperations operations - :vartype xml_error_value: payload.xml.aio.operations.XmlErrorValueOperations + :ivar xml_client_simple_model_value: XmlClientSimpleModelValueOperations operations + :vartype xml_client_simple_model_value: + payload.xml.aio.operations.XmlClientSimpleModelValueOperations + :ivar xml_client_model_with_simple_arrays_value: XmlClientModelWithSimpleArraysValueOperations + operations + :vartype xml_client_model_with_simple_arrays_value: + payload.xml.aio.operations.XmlClientModelWithSimpleArraysValueOperations + :ivar xml_client_model_with_array_of_model_value: XmlClientModelWithArrayOfModelValueOperations + operations + :vartype xml_client_model_with_array_of_model_value: + payload.xml.aio.operations.XmlClientModelWithArrayOfModelValueOperations + :ivar xml_client_model_with_optional_field_value: + XmlClientModelWithOptionalFieldValueOperations operations + :vartype xml_client_model_with_optional_field_value: + payload.xml.aio.operations.XmlClientModelWithOptionalFieldValueOperations + :ivar xml_client_model_with_attributes_value: XmlClientModelWithAttributesValueOperations + operations + :vartype xml_client_model_with_attributes_value: + payload.xml.aio.operations.XmlClientModelWithAttributesValueOperations + :ivar xml_client_model_with_unwrapped_array_value: + XmlClientModelWithUnwrappedArrayValueOperations operations + :vartype xml_client_model_with_unwrapped_array_value: + payload.xml.aio.operations.XmlClientModelWithUnwrappedArrayValueOperations + :ivar xml_client_model_with_renamed_arrays_value: + XmlClientModelWithRenamedArraysValueOperations operations + :vartype xml_client_model_with_renamed_arrays_value: + payload.xml.aio.operations.XmlClientModelWithRenamedArraysValueOperations + :ivar xml_client_model_with_renamed_fields_value: + XmlClientModelWithRenamedFieldsValueOperations operations + :vartype xml_client_model_with_renamed_fields_value: + payload.xml.aio.operations.XmlClientModelWithRenamedFieldsValueOperations + :ivar xml_client_model_with_empty_array_value: XmlClientModelWithEmptyArrayValueOperations + operations + :vartype xml_client_model_with_empty_array_value: + payload.xml.aio.operations.XmlClientModelWithEmptyArrayValueOperations + :ivar xml_client_model_with_text_value: XmlClientModelWithTextValueOperations operations + :vartype xml_client_model_with_text_value: + payload.xml.aio.operations.XmlClientModelWithTextValueOperations + :ivar xml_client_model_with_dictionary_value: XmlClientModelWithDictionaryValueOperations + operations + :vartype xml_client_model_with_dictionary_value: + payload.xml.aio.operations.XmlClientModelWithDictionaryValueOperations + :ivar xml_client_model_with_encoded_names_value: XmlClientModelWithEncodedNamesValueOperations + operations + :vartype xml_client_model_with_encoded_names_value: + payload.xml.aio.operations.XmlClientModelWithEncodedNamesValueOperations + :ivar xml_client_xml_error_value: XmlClientXmlErrorValueOperations operations + :vartype xml_client_xml_error_value: + payload.xml.aio.operations.XmlClientXmlErrorValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -97,49 +104,45 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.simple_model_value = SimpleModelValueOperations( + self.xml_client_simple_model_value = XmlClientSimpleModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_simple_arrays_value = ModelWithSimpleArraysValueOperations( + self.xml_client_model_with_simple_arrays_value = XmlClientModelWithSimpleArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_array_of_model_value = ModelWithArrayOfModelValueOperations( + self.xml_client_model_with_array_of_model_value = XmlClientModelWithArrayOfModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_optional_field_value = ModelWithOptionalFieldValueOperations( + self.xml_client_model_with_optional_field_value = XmlClientModelWithOptionalFieldValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_attributes_value = ModelWithAttributesValueOperations( + self.xml_client_model_with_attributes_value = XmlClientModelWithAttributesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_unwrapped_array_value = ModelWithUnwrappedArrayValueOperations( + self.xml_client_model_with_unwrapped_array_value = XmlClientModelWithUnwrappedArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_arrays_value = ModelWithRenamedArraysValueOperations( + self.xml_client_model_with_renamed_arrays_value = XmlClientModelWithRenamedArraysValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_renamed_fields_value = ModelWithRenamedFieldsValueOperations( + self.xml_client_model_with_renamed_fields_value = XmlClientModelWithRenamedFieldsValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_empty_array_value = ModelWithEmptyArrayValueOperations( + self.xml_client_model_with_empty_array_value = XmlClientModelWithEmptyArrayValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_text_value = ModelWithTextValueOperations( + self.xml_client_model_with_text_value = XmlClientModelWithTextValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_dictionary_value = ModelWithDictionaryValueOperations( + self.xml_client_model_with_dictionary_value = XmlClientModelWithDictionaryValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_encoded_names_value = ModelWithEncodedNamesValueOperations( + self.xml_client_model_with_encoded_names_value = XmlClientModelWithEncodedNamesValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_enum_value = ModelWithEnumValueOperations( + self.xml_client_xml_error_value = XmlClientXmlErrorValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.model_with_datetime_value = ModelWithDatetimeValueOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.xml_error_value = XmlErrorValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/__init__.py index 9fb7963fc4..da239c1b62 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/__init__.py @@ -6,42 +6,38 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SimpleModelValueOperations # type: ignore -from ._operations import ModelWithSimpleArraysValueOperations # type: ignore -from ._operations import ModelWithArrayOfModelValueOperations # type: ignore -from ._operations import ModelWithOptionalFieldValueOperations # type: ignore -from ._operations import ModelWithAttributesValueOperations # type: ignore -from ._operations import ModelWithUnwrappedArrayValueOperations # type: ignore -from ._operations import ModelWithRenamedArraysValueOperations # type: ignore -from ._operations import ModelWithRenamedFieldsValueOperations # type: ignore -from ._operations import ModelWithEmptyArrayValueOperations # type: ignore -from ._operations import ModelWithTextValueOperations # type: ignore -from ._operations import ModelWithDictionaryValueOperations # type: ignore -from ._operations import ModelWithEncodedNamesValueOperations # type: ignore -from ._operations import ModelWithEnumValueOperations # type: ignore -from ._operations import ModelWithDatetimeValueOperations # type: ignore -from ._operations import XmlErrorValueOperations # type: ignore +from ._operations import XmlClientSimpleModelValueOperations # type: ignore +from ._operations import XmlClientModelWithSimpleArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithArrayOfModelValueOperations # type: ignore +from ._operations import XmlClientModelWithOptionalFieldValueOperations # type: ignore +from ._operations import XmlClientModelWithAttributesValueOperations # type: ignore +from ._operations import XmlClientModelWithUnwrappedArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedFieldsValueOperations # type: ignore +from ._operations import XmlClientModelWithEmptyArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithTextValueOperations # type: ignore +from ._operations import XmlClientModelWithDictionaryValueOperations # type: ignore +from ._operations import XmlClientModelWithEncodedNamesValueOperations # type: ignore +from ._operations import XmlClientXmlErrorValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SimpleModelValueOperations", - "ModelWithSimpleArraysValueOperations", - "ModelWithArrayOfModelValueOperations", - "ModelWithOptionalFieldValueOperations", - "ModelWithAttributesValueOperations", - "ModelWithUnwrappedArrayValueOperations", - "ModelWithRenamedArraysValueOperations", - "ModelWithRenamedFieldsValueOperations", - "ModelWithEmptyArrayValueOperations", - "ModelWithTextValueOperations", - "ModelWithDictionaryValueOperations", - "ModelWithEncodedNamesValueOperations", - "ModelWithEnumValueOperations", - "ModelWithDatetimeValueOperations", - "XmlErrorValueOperations", + "XmlClientSimpleModelValueOperations", + "XmlClientModelWithSimpleArraysValueOperations", + "XmlClientModelWithArrayOfModelValueOperations", + "XmlClientModelWithOptionalFieldValueOperations", + "XmlClientModelWithAttributesValueOperations", + "XmlClientModelWithUnwrappedArrayValueOperations", + "XmlClientModelWithRenamedArraysValueOperations", + "XmlClientModelWithRenamedFieldsValueOperations", + "XmlClientModelWithEmptyArrayValueOperations", + "XmlClientModelWithTextValueOperations", + "XmlClientModelWithDictionaryValueOperations", + "XmlClientModelWithEncodedNamesValueOperations", + "XmlClientXmlErrorValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py index a63e669008..88e80c84a8 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/aio/operations/_operations.py @@ -22,35 +22,31 @@ from ..._utils.model_base import _deserialize_xml, _failsafe_deserialize_xml, _get_element from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_model_with_array_of_model_value_get_request, - build_model_with_array_of_model_value_put_request, - build_model_with_attributes_value_get_request, - build_model_with_attributes_value_put_request, - build_model_with_datetime_value_get_request, - build_model_with_datetime_value_put_request, - build_model_with_dictionary_value_get_request, - build_model_with_dictionary_value_put_request, - build_model_with_empty_array_value_get_request, - build_model_with_empty_array_value_put_request, - build_model_with_encoded_names_value_get_request, - build_model_with_encoded_names_value_put_request, - build_model_with_enum_value_get_request, - build_model_with_enum_value_put_request, - build_model_with_optional_field_value_get_request, - build_model_with_optional_field_value_put_request, - build_model_with_renamed_arrays_value_get_request, - build_model_with_renamed_arrays_value_put_request, - build_model_with_renamed_fields_value_get_request, - build_model_with_renamed_fields_value_put_request, - build_model_with_simple_arrays_value_get_request, - build_model_with_simple_arrays_value_put_request, - build_model_with_text_value_get_request, - build_model_with_text_value_put_request, - build_model_with_unwrapped_array_value_get_request, - build_model_with_unwrapped_array_value_put_request, - build_simple_model_value_get_request, - build_simple_model_value_put_request, - build_xml_error_value_get_request, + build_xml_client_model_with_array_of_model_value_get_request, + build_xml_client_model_with_array_of_model_value_put_request, + build_xml_client_model_with_attributes_value_get_request, + build_xml_client_model_with_attributes_value_put_request, + build_xml_client_model_with_dictionary_value_get_request, + build_xml_client_model_with_dictionary_value_put_request, + build_xml_client_model_with_empty_array_value_get_request, + build_xml_client_model_with_empty_array_value_put_request, + build_xml_client_model_with_encoded_names_value_get_request, + build_xml_client_model_with_encoded_names_value_put_request, + build_xml_client_model_with_optional_field_value_get_request, + build_xml_client_model_with_optional_field_value_put_request, + build_xml_client_model_with_renamed_arrays_value_get_request, + build_xml_client_model_with_renamed_arrays_value_put_request, + build_xml_client_model_with_renamed_fields_value_get_request, + build_xml_client_model_with_renamed_fields_value_put_request, + build_xml_client_model_with_simple_arrays_value_get_request, + build_xml_client_model_with_simple_arrays_value_put_request, + build_xml_client_model_with_text_value_get_request, + build_xml_client_model_with_text_value_put_request, + build_xml_client_model_with_unwrapped_array_value_get_request, + build_xml_client_model_with_unwrapped_array_value_put_request, + build_xml_client_simple_model_value_get_request, + build_xml_client_simple_model_value_put_request, + build_xml_client_xml_error_value_get_request, ) from .._configuration import XmlClientConfiguration @@ -58,14 +54,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class SimpleModelValueOperations: +class XmlClientSimpleModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`simple_model_value` attribute. + :attr:`xml_client_simple_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -95,7 +91,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_simple_model_value_get_request( + _request = build_xml_client_simple_model_value_get_request( headers=_headers, params=_params, ) @@ -156,7 +152,7 @@ async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_simple_model_value_put_request( + _request = build_xml_client_simple_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -180,14 +176,14 @@ async def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithSimpleArraysValueOperations: +class XmlClientModelWithSimpleArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_simple_arrays_value` attribute. + :attr:`xml_client_model_with_simple_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -217,7 +213,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: cls: ClsType[_models.ModelWithSimpleArrays] = kwargs.pop("cls", None) - _request = build_model_with_simple_arrays_value_get_request( + _request = build_xml_client_model_with_simple_arrays_value_get_request( headers=_headers, params=_params, ) @@ -278,7 +274,7 @@ async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_simple_arrays_value_put_request( + _request = build_xml_client_model_with_simple_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -302,14 +298,14 @@ async def put(self, input: _models.ModelWithSimpleArrays, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithArrayOfModelValueOperations: +class XmlClientModelWithArrayOfModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_array_of_model_value` attribute. + :attr:`xml_client_model_with_array_of_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -339,7 +335,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: cls: ClsType[_models.ModelWithArrayOfModel] = kwargs.pop("cls", None) - _request = build_model_with_array_of_model_value_get_request( + _request = build_xml_client_model_with_array_of_model_value_get_request( headers=_headers, params=_params, ) @@ -400,7 +396,7 @@ async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_array_of_model_value_put_request( + _request = build_xml_client_model_with_array_of_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -424,14 +420,14 @@ async def put(self, input: _models.ModelWithArrayOfModel, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithOptionalFieldValueOperations: +class XmlClientModelWithOptionalFieldValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_optional_field_value` attribute. + :attr:`xml_client_model_with_optional_field_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -461,7 +457,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: cls: ClsType[_models.ModelWithOptionalField] = kwargs.pop("cls", None) - _request = build_model_with_optional_field_value_get_request( + _request = build_xml_client_model_with_optional_field_value_get_request( headers=_headers, params=_params, ) @@ -522,7 +518,7 @@ async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_optional_field_value_put_request( + _request = build_xml_client_model_with_optional_field_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -546,14 +542,14 @@ async def put(self, input: _models.ModelWithOptionalField, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithAttributesValueOperations: +class XmlClientModelWithAttributesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_attributes_value` attribute. + :attr:`xml_client_model_with_attributes_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -583,7 +579,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithAttributes: cls: ClsType[_models.ModelWithAttributes] = kwargs.pop("cls", None) - _request = build_model_with_attributes_value_get_request( + _request = build_xml_client_model_with_attributes_value_get_request( headers=_headers, params=_params, ) @@ -644,7 +640,7 @@ async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_attributes_value_put_request( + _request = build_xml_client_model_with_attributes_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -668,14 +664,14 @@ async def put(self, input: _models.ModelWithAttributes, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithUnwrappedArrayValueOperations: +class XmlClientModelWithUnwrappedArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_unwrapped_array_value` attribute. + :attr:`xml_client_model_with_unwrapped_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -705,7 +701,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: cls: ClsType[_models.ModelWithUnwrappedArray] = kwargs.pop("cls", None) - _request = build_model_with_unwrapped_array_value_get_request( + _request = build_xml_client_model_with_unwrapped_array_value_get_request( headers=_headers, params=_params, ) @@ -766,7 +762,7 @@ async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> No _content = _get_element(input) - _request = build_model_with_unwrapped_array_value_put_request( + _request = build_xml_client_model_with_unwrapped_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -790,14 +786,14 @@ async def put(self, input: _models.ModelWithUnwrappedArray, **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedArraysValueOperations: +class XmlClientModelWithRenamedArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_renamed_arrays_value` attribute. + :attr:`xml_client_model_with_renamed_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -827,7 +823,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: cls: ClsType[_models.ModelWithRenamedArrays] = kwargs.pop("cls", None) - _request = build_model_with_renamed_arrays_value_get_request( + _request = build_xml_client_model_with_renamed_arrays_value_get_request( headers=_headers, params=_params, ) @@ -888,7 +884,7 @@ async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_renamed_arrays_value_put_request( + _request = build_xml_client_model_with_renamed_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -912,14 +908,14 @@ async def put(self, input: _models.ModelWithRenamedArrays, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedFieldsValueOperations: +class XmlClientModelWithRenamedFieldsValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_renamed_fields_value` attribute. + :attr:`xml_client_model_with_renamed_fields_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -949,7 +945,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: cls: ClsType[_models.ModelWithRenamedFields] = kwargs.pop("cls", None) - _request = build_model_with_renamed_fields_value_get_request( + _request = build_xml_client_model_with_renamed_fields_value_get_request( headers=_headers, params=_params, ) @@ -1010,7 +1006,7 @@ async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> Non _content = _get_element(input) - _request = build_model_with_renamed_fields_value_put_request( + _request = build_xml_client_model_with_renamed_fields_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1034,14 +1030,14 @@ async def put(self, input: _models.ModelWithRenamedFields, **kwargs: Any) -> Non return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEmptyArrayValueOperations: +class XmlClientModelWithEmptyArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_empty_array_value` attribute. + :attr:`xml_client_model_with_empty_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1071,7 +1067,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: cls: ClsType[_models.ModelWithEmptyArray] = kwargs.pop("cls", None) - _request = build_model_with_empty_array_value_get_request( + _request = build_xml_client_model_with_empty_array_value_get_request( headers=_headers, params=_params, ) @@ -1132,7 +1128,7 @@ async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_empty_array_value_put_request( + _request = build_xml_client_model_with_empty_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1156,14 +1152,14 @@ async def put(self, input: _models.ModelWithEmptyArray, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithTextValueOperations: +class XmlClientModelWithTextValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_text_value` attribute. + :attr:`xml_client_model_with_text_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1193,7 +1189,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithText: cls: ClsType[_models.ModelWithText] = kwargs.pop("cls", None) - _request = build_model_with_text_value_get_request( + _request = build_xml_client_model_with_text_value_get_request( headers=_headers, params=_params, ) @@ -1254,7 +1250,7 @@ async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_text_value_put_request( + _request = build_xml_client_model_with_text_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1278,14 +1274,14 @@ async def put(self, input: _models.ModelWithText, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithDictionaryValueOperations: +class XmlClientModelWithDictionaryValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_dictionary_value` attribute. + :attr:`xml_client_model_with_dictionary_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1315,7 +1311,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithDictionary: cls: ClsType[_models.ModelWithDictionary] = kwargs.pop("cls", None) - _request = build_model_with_dictionary_value_get_request( + _request = build_xml_client_model_with_dictionary_value_get_request( headers=_headers, params=_params, ) @@ -1376,7 +1372,7 @@ async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: _content = _get_element(input) - _request = build_model_with_dictionary_value_put_request( + _request = build_xml_client_model_with_dictionary_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1400,14 +1396,14 @@ async def put(self, input: _models.ModelWithDictionary, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEncodedNamesValueOperations: +class XmlClientModelWithEncodedNamesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_encoded_names_value` attribute. + :attr:`xml_client_model_with_encoded_names_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1437,7 +1433,7 @@ async def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: cls: ClsType[_models.ModelWithEncodedNames] = kwargs.pop("cls", None) - _request = build_model_with_encoded_names_value_get_request( + _request = build_xml_client_model_with_encoded_names_value_get_request( headers=_headers, params=_params, ) @@ -1498,7 +1494,7 @@ async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None _content = _get_element(input) - _request = build_model_with_encoded_names_value_put_request( + _request = build_xml_client_model_with_encoded_names_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1522,258 +1518,14 @@ async def put(self, input: _models.ModelWithEncodedNames, **kwargs: Any) -> None return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEnumValueOperations: +class XmlClientXmlErrorValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_enum_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def get(self, **kwargs: Any) -> _models.ModelWithEnum: - """get. - - :return: ModelWithEnum. The ModelWithEnum is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithEnum - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithEnum] = kwargs.pop("cls", None) - - _request = build_model_with_enum_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithEnum, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def put(self, input: _models.ModelWithEnum, **kwargs: Any) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithEnum - :return: None - :rtype: None - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_enum_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithDatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.aio.XmlClient`'s - :attr:`model_with_datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - async def get(self, **kwargs: Any) -> _models.ModelWithDatetime: - """get. - - :return: ModelWithDatetime. The ModelWithDatetime is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithDatetime - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithDatetime] = kwargs.pop("cls", None) - - _request = build_model_with_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithDatetime, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - async def put(self, input: _models.ModelWithDatetime, **kwargs: Any) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithDatetime - :return: None - :rtype: None - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_datetime_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class XmlErrorValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.aio.XmlClient`'s - :attr:`xml_error_value` attribute. + :attr:`xml_client_xml_error_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1803,7 +1555,7 @@ async def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_xml_error_value_get_request( + _request = build_xml_client_xml_error_value_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/__init__.py index e630c4a936..8b46708868 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/__init__.py @@ -10,11 +10,9 @@ from ._models import ( # type: ignore ModelWithArrayOfModel, ModelWithAttributes, - ModelWithDatetime, ModelWithDictionary, ModelWithEmptyArray, ModelWithEncodedNames, - ModelWithEnum, ModelWithOptionalField, ModelWithRenamedArrays, ModelWithRenamedFields, @@ -24,10 +22,6 @@ SimpleModel, XmlErrorBody, ) - -from ._enums import ( # type: ignore - Status, -) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk @@ -35,11 +29,9 @@ __all__ = [ "ModelWithArrayOfModel", "ModelWithAttributes", - "ModelWithDatetime", "ModelWithDictionary", "ModelWithEmptyArray", "ModelWithEncodedNames", - "ModelWithEnum", "ModelWithOptionalField", "ModelWithRenamedArrays", "ModelWithRenamedFields", @@ -48,7 +40,6 @@ "ModelWithUnwrappedArray", "SimpleModel", "XmlErrorBody", - "Status", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py index 51dae4ba58..75505ef7ce 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/models/_models.py @@ -1,8 +1,7 @@ # coding=utf-8 # pylint: disable=useless-super-delegation -import datetime -from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, overload from .._utils.model_base import Model as _Model, rest_field @@ -94,49 +93,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ModelWithDatetime(_Model): - """Contains datetime properties with different encodings. - - :ivar rfc3339: DateTime value with rfc3339 encoding. Required. - :vartype rfc3339: ~datetime.datetime - :ivar rfc7231: DateTime value with rfc7231 encoding. Required. - :vartype rfc7231: ~datetime.datetime - """ - - rfc3339: datetime.datetime = rest_field( - visibility=["read", "create", "update", "delete", "query"], - format="rfc3339", - xml={"attribute": False, "name": "rfc3339", "text": False, "unwrapped": False}, - ) - """DateTime value with rfc3339 encoding. Required.""" - rfc7231: datetime.datetime = rest_field( - visibility=["read", "create", "update", "delete", "query"], - format="rfc7231", - xml={"attribute": False, "name": "rfc7231", "text": False, "unwrapped": False}, - ) - """DateTime value with rfc7231 encoding. Required.""" - - _xml = {"attribute": False, "name": "ModelWithDatetime", "text": False, "unwrapped": False} - - @overload - def __init__( - self, - *, - rfc3339: datetime.datetime, - rfc7231: datetime.datetime, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ModelWithDictionary(_Model): """Contains a dictionary of key value pairs. @@ -247,39 +203,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ModelWithEnum(_Model): - """Contains a single property with an enum value. - - :ivar status: Required. Known values are: "pending", "success", and "error". - :vartype status: str or ~payload.xml.models.Status - """ - - status: Union[str, "_models.Status"] = rest_field( - visibility=["read", "create", "update", "delete", "query"], - xml={"attribute": False, "name": "status", "text": False, "unwrapped": False}, - ) - """Required. Known values are: \"pending\", \"success\", and \"error\".""" - - _xml = {"attribute": False, "name": "ModelWithEnum", "text": False, "unwrapped": False} - - @overload - def __init__( - self, - *, - status: Union[str, "_models.Status"], - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ModelWithOptionalField(_Model): """Contains an optional field. diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/__init__.py index 9fb7963fc4..da239c1b62 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/__init__.py @@ -6,42 +6,38 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import SimpleModelValueOperations # type: ignore -from ._operations import ModelWithSimpleArraysValueOperations # type: ignore -from ._operations import ModelWithArrayOfModelValueOperations # type: ignore -from ._operations import ModelWithOptionalFieldValueOperations # type: ignore -from ._operations import ModelWithAttributesValueOperations # type: ignore -from ._operations import ModelWithUnwrappedArrayValueOperations # type: ignore -from ._operations import ModelWithRenamedArraysValueOperations # type: ignore -from ._operations import ModelWithRenamedFieldsValueOperations # type: ignore -from ._operations import ModelWithEmptyArrayValueOperations # type: ignore -from ._operations import ModelWithTextValueOperations # type: ignore -from ._operations import ModelWithDictionaryValueOperations # type: ignore -from ._operations import ModelWithEncodedNamesValueOperations # type: ignore -from ._operations import ModelWithEnumValueOperations # type: ignore -from ._operations import ModelWithDatetimeValueOperations # type: ignore -from ._operations import XmlErrorValueOperations # type: ignore +from ._operations import XmlClientSimpleModelValueOperations # type: ignore +from ._operations import XmlClientModelWithSimpleArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithArrayOfModelValueOperations # type: ignore +from ._operations import XmlClientModelWithOptionalFieldValueOperations # type: ignore +from ._operations import XmlClientModelWithAttributesValueOperations # type: ignore +from ._operations import XmlClientModelWithUnwrappedArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedArraysValueOperations # type: ignore +from ._operations import XmlClientModelWithRenamedFieldsValueOperations # type: ignore +from ._operations import XmlClientModelWithEmptyArrayValueOperations # type: ignore +from ._operations import XmlClientModelWithTextValueOperations # type: ignore +from ._operations import XmlClientModelWithDictionaryValueOperations # type: ignore +from ._operations import XmlClientModelWithEncodedNamesValueOperations # type: ignore +from ._operations import XmlClientXmlErrorValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "SimpleModelValueOperations", - "ModelWithSimpleArraysValueOperations", - "ModelWithArrayOfModelValueOperations", - "ModelWithOptionalFieldValueOperations", - "ModelWithAttributesValueOperations", - "ModelWithUnwrappedArrayValueOperations", - "ModelWithRenamedArraysValueOperations", - "ModelWithRenamedFieldsValueOperations", - "ModelWithEmptyArrayValueOperations", - "ModelWithTextValueOperations", - "ModelWithDictionaryValueOperations", - "ModelWithEncodedNamesValueOperations", - "ModelWithEnumValueOperations", - "ModelWithDatetimeValueOperations", - "XmlErrorValueOperations", + "XmlClientSimpleModelValueOperations", + "XmlClientModelWithSimpleArraysValueOperations", + "XmlClientModelWithArrayOfModelValueOperations", + "XmlClientModelWithOptionalFieldValueOperations", + "XmlClientModelWithAttributesValueOperations", + "XmlClientModelWithUnwrappedArrayValueOperations", + "XmlClientModelWithRenamedArraysValueOperations", + "XmlClientModelWithRenamedFieldsValueOperations", + "XmlClientModelWithEmptyArrayValueOperations", + "XmlClientModelWithTextValueOperations", + "XmlClientModelWithDictionaryValueOperations", + "XmlClientModelWithEncodedNamesValueOperations", + "XmlClientXmlErrorValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py index 20eacc8622..db309efd6a 100644 --- a/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/payload-xml/payload/xml/operations/_operations.py @@ -30,7 +30,7 @@ _SERIALIZER.client_side_validation = False -def build_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -44,7 +44,7 @@ def build_simple_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -57,7 +57,9 @@ def build_simple_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_simple_arrays_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_simple_arrays_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -71,7 +73,9 @@ def build_model_with_simple_arrays_value_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_simple_arrays_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_simple_arrays_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -84,7 +88,9 @@ def build_model_with_simple_arrays_value_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_array_of_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_array_of_model_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -98,7 +104,9 @@ def build_model_with_array_of_model_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_array_of_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_array_of_model_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -111,7 +119,9 @@ def build_model_with_array_of_model_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_optional_field_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_optional_field_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -125,7 +135,9 @@ def build_model_with_optional_field_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_optional_field_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_optional_field_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -138,7 +150,9 @@ def build_model_with_optional_field_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_attributes_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_attributes_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -152,7 +166,9 @@ def build_model_with_attributes_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_attributes_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_attributes_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -165,7 +181,9 @@ def build_model_with_attributes_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_unwrapped_array_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_unwrapped_array_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -179,7 +197,9 @@ def build_model_with_unwrapped_array_value_get_request(**kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_unwrapped_array_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_unwrapped_array_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -192,7 +212,9 @@ def build_model_with_unwrapped_array_value_put_request(**kwargs: Any) -> HttpReq return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_arrays_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_arrays_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -206,7 +228,9 @@ def build_model_with_renamed_arrays_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_arrays_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_arrays_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -219,7 +243,9 @@ def build_model_with_renamed_arrays_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_fields_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_fields_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -233,7 +259,9 @@ def build_model_with_renamed_fields_value_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_renamed_fields_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_renamed_fields_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -246,7 +274,9 @@ def build_model_with_renamed_fields_value_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_empty_array_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_empty_array_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -260,7 +290,9 @@ def build_model_with_empty_array_value_get_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_empty_array_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_empty_array_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -273,7 +305,7 @@ def build_model_with_empty_array_value_put_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -287,7 +319,7 @@ def build_model_with_text_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -300,7 +332,9 @@ def build_model_with_text_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_dictionary_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_dictionary_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -314,7 +348,9 @@ def build_model_with_dictionary_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_dictionary_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_dictionary_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -327,7 +363,9 @@ def build_model_with_dictionary_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_encoded_names_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_encoded_names_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -341,7 +379,9 @@ def build_model_with_encoded_names_value_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_with_encoded_names_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_xml_client_model_with_encoded_names_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -354,61 +394,7 @@ def build_model_with_encoded_names_value_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_with_enum_value_get_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/xml") - - # Construct URL - _url = "/payload/xml/modelWithEnum" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_model_with_enum_value_put_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: str = kwargs.pop("content_type") - # Construct URL - _url = "/payload/xml/modelWithEnum" - - # Construct headers - _headers["content-type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_model_with_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - accept = _headers.pop("Accept", "application/xml") - - # Construct URL - _url = "/payload/xml/modelWithDatetime" - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) - - -def build_model_with_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - - content_type: str = kwargs.pop("content_type") - # Construct URL - _url = "/payload/xml/modelWithDatetime" - - # Construct headers - _headers["content-type"] = _SERIALIZER.header("content_type", content_type, "str") - - return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) - - -def build_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: +def build_xml_client_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/xml") @@ -422,14 +408,14 @@ def build_xml_error_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class SimpleModelValueOperations: +class XmlClientSimpleModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`simple_model_value` attribute. + :attr:`xml_client_simple_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -459,7 +445,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_simple_model_value_get_request( + _request = build_xml_client_simple_model_value_get_request( headers=_headers, params=_params, ) @@ -520,7 +506,7 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis _content = _get_element(input) - _request = build_simple_model_value_put_request( + _request = build_xml_client_simple_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -544,14 +530,14 @@ def put(self, input: _models.SimpleModel, **kwargs: Any) -> None: # pylint: dis return cls(pipeline_response, None, {}) # type: ignore -class ModelWithSimpleArraysValueOperations: +class XmlClientModelWithSimpleArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_simple_arrays_value` attribute. + :attr:`xml_client_model_with_simple_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -581,7 +567,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithSimpleArrays: cls: ClsType[_models.ModelWithSimpleArrays] = kwargs.pop("cls", None) - _request = build_model_with_simple_arrays_value_get_request( + _request = build_xml_client_model_with_simple_arrays_value_get_request( headers=_headers, params=_params, ) @@ -644,7 +630,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_simple_arrays_value_put_request( + _request = build_xml_client_model_with_simple_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -668,14 +654,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithArrayOfModelValueOperations: +class XmlClientModelWithArrayOfModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_array_of_model_value` attribute. + :attr:`xml_client_model_with_array_of_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -705,7 +691,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithArrayOfModel: cls: ClsType[_models.ModelWithArrayOfModel] = kwargs.pop("cls", None) - _request = build_model_with_array_of_model_value_get_request( + _request = build_xml_client_model_with_array_of_model_value_get_request( headers=_headers, params=_params, ) @@ -768,7 +754,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_array_of_model_value_put_request( + _request = build_xml_client_model_with_array_of_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -792,14 +778,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithOptionalFieldValueOperations: +class XmlClientModelWithOptionalFieldValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_optional_field_value` attribute. + :attr:`xml_client_model_with_optional_field_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -829,7 +815,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithOptionalField: cls: ClsType[_models.ModelWithOptionalField] = kwargs.pop("cls", None) - _request = build_model_with_optional_field_value_get_request( + _request = build_xml_client_model_with_optional_field_value_get_request( headers=_headers, params=_params, ) @@ -892,7 +878,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_optional_field_value_put_request( + _request = build_xml_client_model_with_optional_field_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -916,14 +902,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithAttributesValueOperations: +class XmlClientModelWithAttributesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_attributes_value` attribute. + :attr:`xml_client_model_with_attributes_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -953,7 +939,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithAttributes: cls: ClsType[_models.ModelWithAttributes] = kwargs.pop("cls", None) - _request = build_model_with_attributes_value_get_request( + _request = build_xml_client_model_with_attributes_value_get_request( headers=_headers, params=_params, ) @@ -1016,7 +1002,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_attributes_value_put_request( + _request = build_xml_client_model_with_attributes_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1040,14 +1026,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithUnwrappedArrayValueOperations: +class XmlClientModelWithUnwrappedArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_unwrapped_array_value` attribute. + :attr:`xml_client_model_with_unwrapped_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1077,7 +1063,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithUnwrappedArray: cls: ClsType[_models.ModelWithUnwrappedArray] = kwargs.pop("cls", None) - _request = build_model_with_unwrapped_array_value_get_request( + _request = build_xml_client_model_with_unwrapped_array_value_get_request( headers=_headers, params=_params, ) @@ -1140,7 +1126,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_unwrapped_array_value_put_request( + _request = build_xml_client_model_with_unwrapped_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1164,14 +1150,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedArraysValueOperations: +class XmlClientModelWithRenamedArraysValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_renamed_arrays_value` attribute. + :attr:`xml_client_model_with_renamed_arrays_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1201,7 +1187,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedArrays: cls: ClsType[_models.ModelWithRenamedArrays] = kwargs.pop("cls", None) - _request = build_model_with_renamed_arrays_value_get_request( + _request = build_xml_client_model_with_renamed_arrays_value_get_request( headers=_headers, params=_params, ) @@ -1264,7 +1250,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_renamed_arrays_value_put_request( + _request = build_xml_client_model_with_renamed_arrays_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1288,14 +1274,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithRenamedFieldsValueOperations: +class XmlClientModelWithRenamedFieldsValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_renamed_fields_value` attribute. + :attr:`xml_client_model_with_renamed_fields_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1325,7 +1311,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithRenamedFields: cls: ClsType[_models.ModelWithRenamedFields] = kwargs.pop("cls", None) - _request = build_model_with_renamed_fields_value_get_request( + _request = build_xml_client_model_with_renamed_fields_value_get_request( headers=_headers, params=_params, ) @@ -1388,7 +1374,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_renamed_fields_value_put_request( + _request = build_xml_client_model_with_renamed_fields_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1412,14 +1398,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEmptyArrayValueOperations: +class XmlClientModelWithEmptyArrayValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_empty_array_value` attribute. + :attr:`xml_client_model_with_empty_array_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1449,7 +1435,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEmptyArray: cls: ClsType[_models.ModelWithEmptyArray] = kwargs.pop("cls", None) - _request = build_model_with_empty_array_value_get_request( + _request = build_xml_client_model_with_empty_array_value_get_request( headers=_headers, params=_params, ) @@ -1512,7 +1498,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_empty_array_value_put_request( + _request = build_xml_client_model_with_empty_array_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1536,14 +1522,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithTextValueOperations: +class XmlClientModelWithTextValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_text_value` attribute. + :attr:`xml_client_model_with_text_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1573,7 +1559,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithText: cls: ClsType[_models.ModelWithText] = kwargs.pop("cls", None) - _request = build_model_with_text_value_get_request( + _request = build_xml_client_model_with_text_value_get_request( headers=_headers, params=_params, ) @@ -1636,7 +1622,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_text_value_put_request( + _request = build_xml_client_model_with_text_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1660,14 +1646,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithDictionaryValueOperations: +class XmlClientModelWithDictionaryValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_dictionary_value` attribute. + :attr:`xml_client_model_with_dictionary_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1697,7 +1683,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithDictionary: cls: ClsType[_models.ModelWithDictionary] = kwargs.pop("cls", None) - _request = build_model_with_dictionary_value_get_request( + _request = build_xml_client_model_with_dictionary_value_get_request( headers=_headers, params=_params, ) @@ -1760,7 +1746,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_dictionary_value_put_request( + _request = build_xml_client_model_with_dictionary_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1784,14 +1770,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelWithEncodedNamesValueOperations: +class XmlClientModelWithEncodedNamesValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`model_with_encoded_names_value` attribute. + :attr:`xml_client_model_with_encoded_names_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1821,7 +1807,7 @@ def get(self, **kwargs: Any) -> _models.ModelWithEncodedNames: cls: ClsType[_models.ModelWithEncodedNames] = kwargs.pop("cls", None) - _request = build_model_with_encoded_names_value_get_request( + _request = build_xml_client_model_with_encoded_names_value_get_request( headers=_headers, params=_params, ) @@ -1884,255 +1870,7 @@ def put( # pylint: disable=inconsistent-return-statements _content = _get_element(input) - _request = build_model_with_encoded_names_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithEnumValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.XmlClient`'s - :attr:`model_with_enum_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def get(self, **kwargs: Any) -> _models.ModelWithEnum: - """get. - - :return: ModelWithEnum. The ModelWithEnum is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithEnum - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithEnum] = kwargs.pop("cls", None) - - _request = build_model_with_enum_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithEnum, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithEnum, **kwargs: Any - ) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithEnum - :return: None - :rtype: None - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_enum_value_put_request( - content_type=content_type, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - -class ModelWithDatetimeValueOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~payload.xml.XmlClient`'s - :attr:`model_with_datetime_value` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: XmlClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - def get(self, **kwargs: Any) -> _models.ModelWithDatetime: - """get. - - :return: ModelWithDatetime. The ModelWithDatetime is compatible with MutableMapping - :rtype: ~payload.xml.models.ModelWithDatetime - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ModelWithDatetime] = kwargs.pop("cls", None) - - _request = build_model_with_datetime_value_get_request( - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client.pipeline.run(_request, stream=_stream, **kwargs) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response) - - response_headers = {} - response_headers["content-type"] = self._deserialize("str", response.headers.get("content-type")) - - if _stream: - deserialized = response.iter_bytes() - else: - deserialized = _deserialize_xml(_models.ModelWithDatetime, response.text()) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - def put( # pylint: disable=inconsistent-return-statements - self, input: _models.ModelWithDatetime, **kwargs: Any - ) -> None: - """put. - - :param input: Required. - :type input: ~payload.xml.models.ModelWithDatetime - :return: None - :rtype: None - :raises ~corehttp.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: str = kwargs.pop("content_type", _headers.pop("content-type", "application/xml")) - cls: ClsType[None] = kwargs.pop("cls", None) - - _content = _get_element(input) - - _request = build_model_with_datetime_value_put_request( + _request = build_xml_client_model_with_encoded_names_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2156,14 +1894,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class XmlErrorValueOperations: +class XmlClientXmlErrorValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~payload.xml.XmlClient`'s - :attr:`xml_error_value` attribute. + :attr:`xml_client_xml_error_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2193,7 +1931,7 @@ def get(self, **kwargs: Any) -> _models.SimpleModel: cls: ClsType[_models.SimpleModel] = kwargs.pop("cls", None) - _request = build_xml_error_value_get_request( + _request = build_xml_client_xml_error_value_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py b/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py index 5774cd376f..a0d154dd06 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/_client.py @@ -9,20 +9,21 @@ from ._configuration import RoutesClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InInterfaceOperations, _RoutesClientOperationsMixin -from .pathparameters.operations import PathParametersOperations -from .queryparameters.operations import QueryParametersOperations +from .operations import RoutesClientInInterfaceOperations, _RoutesClientOperationsMixin +from .pathparameters.operations import RoutesClientPathParametersOperations +from .queryparameters.operations import RoutesClientQueryParametersOperations class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Define scenario in building the http route/uri. - :ivar path_parameters: PathParametersOperations operations - :vartype path_parameters: routes.operations.PathParametersOperations - :ivar query_parameters: QueryParametersOperations operations - :vartype query_parameters: routes.operations.QueryParametersOperations - :ivar in_interface: InInterfaceOperations operations - :vartype in_interface: routes.operations.InInterfaceOperations + :ivar routes_client_path_parameters: RoutesClientPathParametersOperations operations + :vartype routes_client_path_parameters: routes.operations.RoutesClientPathParametersOperations + :ivar routes_client_query_parameters: RoutesClientQueryParametersOperations operations + :vartype routes_client_query_parameters: + routes.operations.RoutesClientQueryParametersOperations + :ivar routes_client_in_interface: RoutesClientInInterfaceOperations operations + :vartype routes_client_in_interface: routes.operations.RoutesClientInInterfaceOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -49,11 +50,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.path_parameters = PathParametersOperations(self._client, self._config, self._serialize, self._deserialize) - self.query_parameters = QueryParametersOperations( + self.routes_client_path_parameters = RoutesClientPathParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_query_parameters = RoutesClientQueryParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_in_interface = RoutesClientInInterfaceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.in_interface = InInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py index 5c5ec1bf12..e825c36078 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/_client.py @@ -8,21 +8,23 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..pathparameters.aio.operations import PathParametersOperations -from ..queryparameters.aio.operations import QueryParametersOperations +from ..pathparameters.aio.operations import RoutesClientPathParametersOperations +from ..queryparameters.aio.operations import RoutesClientQueryParametersOperations from ._configuration import RoutesClientConfiguration -from .operations import InInterfaceOperations, _RoutesClientOperationsMixin +from .operations import RoutesClientInInterfaceOperations, _RoutesClientOperationsMixin class RoutesClient(_RoutesClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Define scenario in building the http route/uri. - :ivar path_parameters: PathParametersOperations operations - :vartype path_parameters: routes.aio.operations.PathParametersOperations - :ivar query_parameters: QueryParametersOperations operations - :vartype query_parameters: routes.aio.operations.QueryParametersOperations - :ivar in_interface: InInterfaceOperations operations - :vartype in_interface: routes.aio.operations.InInterfaceOperations + :ivar routes_client_path_parameters: RoutesClientPathParametersOperations operations + :vartype routes_client_path_parameters: + routes.aio.operations.RoutesClientPathParametersOperations + :ivar routes_client_query_parameters: RoutesClientQueryParametersOperations operations + :vartype routes_client_query_parameters: + routes.aio.operations.RoutesClientQueryParametersOperations + :ivar routes_client_in_interface: RoutesClientInInterfaceOperations operations + :vartype routes_client_in_interface: routes.aio.operations.RoutesClientInInterfaceOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -49,11 +51,15 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.path_parameters = PathParametersOperations(self._client, self._config, self._serialize, self._deserialize) - self.query_parameters = QueryParametersOperations( + self.routes_client_path_parameters = RoutesClientPathParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_query_parameters = RoutesClientQueryParametersOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.routes_client_in_interface = RoutesClientInInterfaceOperations( self._client, self._config, self._serialize, self._deserialize ) - self.in_interface = InInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py index 0b84d5c359..bb908f87b1 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InInterfaceOperations # type: ignore +from ._operations import RoutesClientInInterfaceOperations # type: ignore from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InInterfaceOperations", + "RoutesClientInInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py index 3c78d5fc8a..ec82a6de3a 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/aio/operations/_operations.py @@ -16,21 +16,21 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC -from ...operations._operations import build_in_interface_fixed_request, build_routes_fixed_request +from ...operations._operations import build_routes_client_in_interface_fixed_request, build_routes_fixed_request from .._configuration import RoutesClientConfiguration T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class InInterfaceOperations: +class RoutesClientInInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`in_interface` attribute. + :attr:`routes_client_in_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -60,7 +60,7 @@ async def fixed(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_in_interface_fixed_request( + _request = build_routes_client_in_interface_fixed_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py index 0b84d5c359..bb908f87b1 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InInterfaceOperations # type: ignore +from ._operations import RoutesClientInInterfaceOperations # type: ignore from ._operations import _RoutesClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InInterfaceOperations", + "RoutesClientInInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py index 10d486f68b..acff98ce0a 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_in_interface_fixed_request(**kwargs: Any) -> HttpRequest: +def build_routes_client_in_interface_fixed_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/routes/in-interface/fixed" @@ -39,14 +39,14 @@ def build_routes_fixed_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, **kwargs) -class InInterfaceOperations: +class RoutesClientInInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`in_interface` attribute. + :attr:`routes_client_in_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,7 +76,7 @@ def fixed(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-s cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_in_interface_fixed_request( + _request = build_routes_client_in_interface_fixed_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/__init__.py index 517900cf34..2f9ae6f3d4 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PathParametersOperations # type: ignore +from ._operations import RoutesClientPathParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PathParametersOperations", + "RoutesClientPathParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/_operations.py index 5f5a7e97db..c02b24cb94 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/aio/operations/_operations.py @@ -16,29 +16,29 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import RoutesClientConfiguration -from ...labelexpansion.aio.operations._operations import PathParametersLabelExpansionOperations -from ...matrixexpansion.aio.operations._operations import PathParametersMatrixExpansionOperations +from ...labelexpansion.aio.operations._operations import RoutesClientPathParametersLabelExpansionOperations +from ...matrixexpansion.aio.operations._operations import RoutesClientPathParametersMatrixExpansionOperations from ...operations._operations import ( - build_path_parameters_annotation_only_request, - build_path_parameters_explicit_request, - build_path_parameters_template_only_request, + build_routes_client_path_parameters_annotation_only_request, + build_routes_client_path_parameters_explicit_request, + build_routes_client_path_parameters_template_only_request, ) -from ...pathexpansion.aio.operations._operations import PathParametersPathExpansionOperations -from ...reservedexpansion.aio.operations._operations import PathParametersReservedExpansionOperations -from ...simpleexpansion.aio.operations._operations import PathParametersSimpleExpansionOperations +from ...pathexpansion.aio.operations._operations import RoutesClientPathParametersPathExpansionOperations +from ...reservedexpansion.aio.operations._operations import RoutesClientPathParametersReservedExpansionOperations +from ...simpleexpansion.aio.operations._operations import RoutesClientPathParametersSimpleExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersOperations: +class RoutesClientPathParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`path_parameters` attribute. + :attr:`routes_client_path_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -48,19 +48,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.reserved_expansion = PathParametersReservedExpansionOperations( + self.routes_client_path_parameters_reserved_expansion = RoutesClientPathParametersReservedExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.simple_expansion = PathParametersSimpleExpansionOperations( + self.routes_client_path_parameters_simple_expansion = RoutesClientPathParametersSimpleExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.path_expansion = PathParametersPathExpansionOperations( + self.routes_client_path_parameters_path_expansion = RoutesClientPathParametersPathExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.label_expansion = PathParametersLabelExpansionOperations( + self.routes_client_path_parameters_label_expansion = RoutesClientPathParametersLabelExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.matrix_expansion = PathParametersMatrixExpansionOperations( + self.routes_client_path_parameters_matrix_expansion = RoutesClientPathParametersMatrixExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -86,7 +86,7 @@ async def template_only(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_template_only_request( + _request = build_routes_client_path_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -130,7 +130,7 @@ async def explicit(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_explicit_request( + _request = build_routes_client_path_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -174,7 +174,7 @@ async def annotation_only(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_annotation_only_request( + _request = build_routes_client_path_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py index 4147616127..64b71a8597 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersLabelExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersLabelExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersLabelExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersLabelExpansionStandardOperations -class PathParametersLabelExpansionOperations: +class RoutesClientPathParametersLabelExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`label_expansion` attribute. + :attr:`routes_client_path_parameters_label_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersLabelExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_standard = ( + RoutesClientPathParametersLabelExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersLabelExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_explode = ( + RoutesClientPathParametersLabelExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py index fb0c7d33b9..316829b01b 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_label_expansion_explode_array_request, - build_path_parameters_label_expansion_explode_primitive_request, - build_path_parameters_label_expansion_explode_record_request, + build_routes_client_path_parameters_label_expansion_explode_array_request, + build_routes_client_path_parameters_label_expansion_explode_primitive_request, + build_routes_client_path_parameters_label_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_label_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_array_request( + _request = build_routes_client_path_parameters_label_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_record_request( + _request = build_routes_client_path_parameters_label_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py index cf5e7346fd..49889f9a19 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/explode/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_label_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_label_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_label_expansion_explode_array_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_label_expansion_explode_record_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_label_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_array_request( + _request = build_routes_client_path_parameters_label_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_explode_record_request( + _request = build_routes_client_path_parameters_label_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py index 67a2fec60f..862aecf428 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersLabelExpansionExplodeOperations -from ..standard.operations._operations import PathParametersLabelExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersLabelExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersLabelExpansionStandardOperations -class PathParametersLabelExpansionOperations: +class RoutesClientPathParametersLabelExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`label_expansion` attribute. + :attr:`routes_client_path_parameters_label_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersLabelExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_standard = ( + RoutesClientPathParametersLabelExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersLabelExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_label_expansion_explode = ( + RoutesClientPathParametersLabelExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py index 4f2959d53e..c7ef02ffef 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_label_expansion_standard_array_request, - build_path_parameters_label_expansion_standard_primitive_request, - build_path_parameters_label_expansion_standard_record_request, + build_routes_client_path_parameters_label_expansion_standard_array_request, + build_routes_client_path_parameters_label_expansion_standard_primitive_request, + build_routes_client_path_parameters_label_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_label_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_array_request( + _request = build_routes_client_path_parameters_label_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_record_request( + _request = build_routes_client_path_parameters_label_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py index 0334197d10..4a7770d067 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/labelexpansion/standard/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_label_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_label_expansion_standard_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_label_expansion_standard_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_label_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_label_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_label_expansion_standard_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersLabelExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_label_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_label_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_array_request( + _request = build_routes_client_path_parameters_label_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_label_expansion_standard_record_request( + _request = build_routes_client_path_parameters_label_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py index 0380245802..c4cb3fe66c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersMatrixExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersMatrixExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersMatrixExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersMatrixExpansionStandardOperations -class PathParametersMatrixExpansionOperations: +class RoutesClientPathParametersMatrixExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`matrix_expansion` attribute. + :attr:`routes_client_path_parameters_matrix_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersMatrixExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_standard = ( + RoutesClientPathParametersMatrixExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersMatrixExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_explode = ( + RoutesClientPathParametersMatrixExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py index 7425b7f5b1..2c2d539a79 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_matrix_expansion_explode_array_request, - build_path_parameters_matrix_expansion_explode_primitive_request, - build_path_parameters_matrix_expansion_explode_record_request, + build_routes_client_path_parameters_matrix_expansion_explode_array_request, + build_routes_client_path_parameters_matrix_expansion_explode_primitive_request, + build_routes_client_path_parameters_matrix_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py index 00a64fb51e..b077a41267 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/explode/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_matrix_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_matrix_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_matrix_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_matrix_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_explode_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py index 4aad0971a3..41bb2b7469 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersMatrixExpansionExplodeOperations -from ..standard.operations._operations import PathParametersMatrixExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersMatrixExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersMatrixExpansionStandardOperations -class PathParametersMatrixExpansionOperations: +class RoutesClientPathParametersMatrixExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`matrix_expansion` attribute. + :attr:`routes_client_path_parameters_matrix_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersMatrixExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_standard = ( + RoutesClientPathParametersMatrixExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersMatrixExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_matrix_expansion_explode = ( + RoutesClientPathParametersMatrixExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py index 8de8bf2e3f..91217ea978 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_matrix_expansion_standard_array_request, - build_path_parameters_matrix_expansion_standard_primitive_request, - build_path_parameters_matrix_expansion_standard_record_request, + build_routes_client_path_parameters_matrix_expansion_standard_array_request, + build_routes_client_path_parameters_matrix_expansion_standard_primitive_request, + build_routes_client_path_parameters_matrix_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py index 13b8a0e4cf..81c16311cf 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/matrixexpansion/standard/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_matrix_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_matrix_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_matrix_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_matrix_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_matrix_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_matrix_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersMatrixExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_matrix_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_array_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_matrix_expansion_standard_record_request( + _request = build_routes_client_path_parameters_matrix_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/__init__.py index 517900cf34..2f9ae6f3d4 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PathParametersOperations # type: ignore +from ._operations import RoutesClientPathParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PathParametersOperations", + "RoutesClientPathParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/_operations.py index 885ca262c1..09bf89314f 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/operations/_operations.py @@ -16,11 +16,11 @@ from ..._configuration import RoutesClientConfiguration from ..._utils.serialization import Deserializer, Serializer -from ..labelexpansion.operations._operations import PathParametersLabelExpansionOperations -from ..matrixexpansion.operations._operations import PathParametersMatrixExpansionOperations -from ..pathexpansion.operations._operations import PathParametersPathExpansionOperations -from ..reservedexpansion.operations._operations import PathParametersReservedExpansionOperations -from ..simpleexpansion.operations._operations import PathParametersSimpleExpansionOperations +from ..labelexpansion.operations._operations import RoutesClientPathParametersLabelExpansionOperations +from ..matrixexpansion.operations._operations import RoutesClientPathParametersMatrixExpansionOperations +from ..pathexpansion.operations._operations import RoutesClientPathParametersPathExpansionOperations +from ..reservedexpansion.operations._operations import RoutesClientPathParametersReservedExpansionOperations +from ..simpleexpansion.operations._operations import RoutesClientPathParametersSimpleExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -29,7 +29,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_template_only_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_template_only_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -43,7 +43,9 @@ def build_path_parameters_template_only_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_explicit_request(param: str, **kwargs: Any) -> HttpRequest: +def build_routes_client_path_parameters_explicit_request( # pylint: disable=name-too-long + param: str, **kwargs: Any +) -> HttpRequest: # Construct URL _url = "/routes/path/explicit/{param}" path_format_arguments = { @@ -55,7 +57,7 @@ def build_path_parameters_explicit_request(param: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_annotation_only_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_annotation_only_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -69,14 +71,14 @@ def build_path_parameters_annotation_only_request( # pylint: disable=name-too-l return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersOperations: +class RoutesClientPathParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`path_parameters` attribute. + :attr:`routes_client_path_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -86,19 +88,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.reserved_expansion = PathParametersReservedExpansionOperations( + self.routes_client_path_parameters_reserved_expansion = RoutesClientPathParametersReservedExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.simple_expansion = PathParametersSimpleExpansionOperations( + self.routes_client_path_parameters_simple_expansion = RoutesClientPathParametersSimpleExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.path_expansion = PathParametersPathExpansionOperations( + self.routes_client_path_parameters_path_expansion = RoutesClientPathParametersPathExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.label_expansion = PathParametersLabelExpansionOperations( + self.routes_client_path_parameters_label_expansion = RoutesClientPathParametersLabelExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.matrix_expansion = PathParametersMatrixExpansionOperations( + self.routes_client_path_parameters_matrix_expansion = RoutesClientPathParametersMatrixExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -124,7 +126,7 @@ def template_only(self, param: str, **kwargs: Any) -> None: # pylint: disable=i cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_template_only_request( + _request = build_routes_client_path_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -168,7 +170,7 @@ def explicit(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_explicit_request( + _request = build_routes_client_path_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -212,7 +214,7 @@ def annotation_only(self, param: str, **kwargs: Any) -> None: # pylint: disable cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_annotation_only_request( + _request = build_routes_client_path_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py index 7c690d3e42..333d566b43 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersPathExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersPathExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersPathExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersPathExpansionStandardOperations -class PathParametersPathExpansionOperations: +class RoutesClientPathParametersPathExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`path_expansion` attribute. + :attr:`routes_client_path_parameters_path_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersPathExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_standard = ( + RoutesClientPathParametersPathExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersPathExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_explode = ( + RoutesClientPathParametersPathExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py index 878d397b1a..59abc77232 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_path_expansion_explode_array_request, - build_path_parameters_path_expansion_explode_primitive_request, - build_path_parameters_path_expansion_explode_record_request, + build_routes_client_path_parameters_path_expansion_explode_array_request, + build_routes_client_path_parameters_path_expansion_explode_primitive_request, + build_routes_client_path_parameters_path_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_path_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_array_request( + _request = build_routes_client_path_parameters_path_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_record_request( + _request = build_routes_client_path_parameters_path_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py index 484eb95415..108d8fa457 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/explode/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_path_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_path_expansion_explode_primitive_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_path_expansion_explode_array_request( # pylint: disab return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_path_expansion_explode_record_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_path_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_array_request( + _request = build_routes_client_path_parameters_path_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_explode_record_request( + _request = build_routes_client_path_parameters_path_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py index 92f71f21de..3694cfee4f 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersPathExpansionExplodeOperations -from ..standard.operations._operations import PathParametersPathExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersPathExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersPathExpansionStandardOperations -class PathParametersPathExpansionOperations: +class RoutesClientPathParametersPathExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`path_expansion` attribute. + :attr:`routes_client_path_parameters_path_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersPathExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_standard = ( + RoutesClientPathParametersPathExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersPathExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_path_expansion_explode = ( + RoutesClientPathParametersPathExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py index 4194a2951f..b2777d8df0 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_path_expansion_standard_array_request, - build_path_parameters_path_expansion_standard_primitive_request, - build_path_parameters_path_expansion_standard_record_request, + build_routes_client_path_parameters_path_expansion_standard_array_request, + build_routes_client_path_parameters_path_expansion_standard_primitive_request, + build_routes_client_path_parameters_path_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_path_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_array_request( + _request = build_routes_client_path_parameters_path_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_record_request( + _request = build_routes_client_path_parameters_path_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py index 6ed5fbf9f8..f0e5fd30ab 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/pathexpansion/standard/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_path_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_path_expansion_standard_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_path_expansion_standard_array_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_path_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_path_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_path_expansion_standard_record_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersPathExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_path_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_path_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_array_request( + _request = build_routes_client_path_parameters_path_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_path_expansion_standard_record_request( + _request = build_routes_client_path_parameters_path_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py index d1f3a2f72e..8ac17d1f0c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/aio/operations/_operations.py @@ -17,22 +17,22 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_reserved_expansion_annotation_request, - build_path_parameters_reserved_expansion_template_request, + build_routes_client_path_parameters_reserved_expansion_annotation_request, + build_routes_client_path_parameters_reserved_expansion_template_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersReservedExpansionOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersReservedExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`reserved_expansion` attribute. + :attr:`routes_client_path_parameters_reserved_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -64,7 +64,7 @@ async def template(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_template_request( + _request = build_routes_client_path_parameters_reserved_expansion_template_request( param=param, headers=_headers, params=_params, @@ -108,7 +108,7 @@ async def annotation(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_annotation_request( + _request = build_routes_client_path_parameters_reserved_expansion_annotation_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py index 9da31dcbd1..5a5e5dee41 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/reservedexpansion/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_reserved_expansion_template_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_reserved_expansion_template_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_reserved_expansion_template_request( # pylint: disabl return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_reserved_expansion_annotation_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_reserved_expansion_annotation_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,14 +52,14 @@ def build_path_parameters_reserved_expansion_annotation_request( # pylint: disa return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersReservedExpansionOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersReservedExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`reserved_expansion` attribute. + :attr:`routes_client_path_parameters_reserved_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -91,7 +91,7 @@ def template(self, param: str, **kwargs: Any) -> None: # pylint: disable=incons cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_template_request( + _request = build_routes_client_path_parameters_reserved_expansion_template_request( param=param, headers=_headers, params=_params, @@ -135,7 +135,7 @@ def annotation(self, param: str, **kwargs: Any) -> None: # pylint: disable=inco cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_reserved_expansion_annotation_request( + _request = build_routes_client_path_parameters_reserved_expansion_annotation_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py index db0a1145ef..04a7a216fa 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import PathParametersSimpleExpansionExplodeOperations -from ...standard.aio.operations._operations import PathParametersSimpleExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientPathParametersSimpleExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientPathParametersSimpleExpansionStandardOperations -class PathParametersSimpleExpansionOperations: +class RoutesClientPathParametersSimpleExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`simple_expansion` attribute. + :attr:`routes_client_path_parameters_simple_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersSimpleExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_standard = ( + RoutesClientPathParametersSimpleExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersSimpleExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_explode = ( + RoutesClientPathParametersSimpleExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py index 650b1261b4..9b7d10fff7 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_simple_expansion_explode_array_request, - build_path_parameters_simple_expansion_explode_primitive_request, - build_path_parameters_simple_expansion_explode_record_request, + build_routes_client_path_parameters_simple_expansion_explode_array_request, + build_routes_client_path_parameters_simple_expansion_explode_primitive_request, + build_routes_client_path_parameters_simple_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_simple_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_array_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_record_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py index 4b0638dac8..b2e3ab7fb5 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/explode/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_simple_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_simple_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_simple_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_explode_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_simple_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_path_parameters_simple_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_array_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_explode_record_request( + _request = build_routes_client_path_parameters_simple_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py index 837861f0e6..b781cb3368 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import PathParametersSimpleExpansionExplodeOperations -from ..standard.operations._operations import PathParametersSimpleExpansionStandardOperations +from ..explode.operations._operations import RoutesClientPathParametersSimpleExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientPathParametersSimpleExpansionStandardOperations -class PathParametersSimpleExpansionOperations: +class RoutesClientPathParametersSimpleExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`simple_expansion` attribute. + :attr:`routes_client_path_parameters_simple_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = PathParametersSimpleExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_standard = ( + RoutesClientPathParametersSimpleExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = PathParametersSimpleExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_path_parameters_simple_expansion_explode = ( + RoutesClientPathParametersSimpleExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py index cd35c6e768..fb8ad7eb28 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_path_parameters_simple_expansion_standard_array_request, - build_path_parameters_simple_expansion_standard_primitive_request, - build_path_parameters_simple_expansion_standard_record_request, + build_routes_client_path_parameters_simple_expansion_standard_array_request, + build_routes_client_path_parameters_simple_expansion_standard_primitive_request, + build_routes_client_path_parameters_simple_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_simple_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_array_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_record_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py index c38726b410..576118d237 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/pathparameters/simpleexpansion/standard/operations/_operations.py @@ -24,7 +24,7 @@ _SERIALIZER.client_side_validation = False -def build_path_parameters_simple_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_primitive_request( # pylint: disable=name-too-long param: str, **kwargs: Any ) -> HttpRequest: # Construct URL @@ -38,7 +38,7 @@ def build_path_parameters_simple_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_array_request( # pylint: disable=name-too-long param: list[str], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -52,7 +52,7 @@ def build_path_parameters_simple_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, **kwargs) -def build_path_parameters_simple_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_path_parameters_simple_expansion_standard_record_request( # pylint: disable=name-too-long param: dict[str, int], **kwargs: Any ) -> HttpRequest: # Construct URL @@ -66,14 +66,14 @@ def build_path_parameters_simple_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, **kwargs) -class PathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientPathParametersSimpleExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_path_parameters_simple_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -105,7 +105,7 @@ def primitive(self, param: str, **kwargs: Any) -> None: # pylint: disable=incon cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_primitive_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -149,7 +149,7 @@ def array(self, param: list[str], **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_array_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -193,7 +193,7 @@ def record(self, param: dict[str, int], **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_path_parameters_simple_expansion_standard_record_request( + _request = build_routes_client_path_parameters_simple_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/__init__.py index d0330f82a4..355da905ad 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryParametersOperations # type: ignore +from ._operations import RoutesClientQueryParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryParametersOperations", + "RoutesClientQueryParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/_operations.py index 46f731ef64..2e3cc91193 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/aio/operations/_operations.py @@ -17,25 +17,25 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_annotation_only_request, - build_query_parameters_explicit_request, - build_query_parameters_template_only_request, + build_routes_client_query_parameters_annotation_only_request, + build_routes_client_query_parameters_explicit_request, + build_routes_client_query_parameters_template_only_request, ) -from ...querycontinuation.aio.operations._operations import QueryParametersQueryContinuationOperations -from ...queryexpansion.aio.operations._operations import QueryParametersQueryExpansionOperations +from ...querycontinuation.aio.operations._operations import RoutesClientQueryParametersQueryContinuationOperations +from ...queryexpansion.aio.operations._operations import RoutesClientQueryParametersQueryExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersOperations: +class RoutesClientQueryParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_parameters` attribute. + :attr:`routes_client_query_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -45,10 +45,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.query_expansion = QueryParametersQueryExpansionOperations( + self.routes_client_query_parameters_query_expansion = RoutesClientQueryParametersQueryExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.query_continuation = QueryParametersQueryContinuationOperations( + self.routes_client_query_parameters_query_continuation = RoutesClientQueryParametersQueryContinuationOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -74,7 +74,7 @@ async def template_only(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_template_only_request( + _request = build_routes_client_query_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -118,7 +118,7 @@ async def explicit(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_explicit_request( + _request = build_routes_client_query_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -162,7 +162,7 @@ async def annotation_only(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_annotation_only_request( + _request = build_routes_client_query_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/__init__.py index d0330f82a4..355da905ad 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import QueryParametersOperations # type: ignore +from ._operations import RoutesClientQueryParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "QueryParametersOperations", + "RoutesClientQueryParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/_operations.py index 2023ce6e0f..1992ff21ca 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/operations/_operations.py @@ -17,8 +17,8 @@ from ..._configuration import RoutesClientConfiguration from ..._utils.serialization import Deserializer, Serializer -from ..querycontinuation.operations._operations import QueryParametersQueryContinuationOperations -from ..queryexpansion.operations._operations import QueryParametersQueryExpansionOperations +from ..querycontinuation.operations._operations import RoutesClientQueryParametersQueryContinuationOperations +from ..queryexpansion.operations._operations import RoutesClientQueryParametersQueryExpansionOperations T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] @@ -27,7 +27,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_template_only_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_template_only_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -41,7 +41,9 @@ def build_query_parameters_template_only_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_explicit_request(*, param: str, **kwargs: Any) -> HttpRequest: +def build_routes_client_query_parameters_explicit_request( # pylint: disable=name-too-long + *, param: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -53,7 +55,7 @@ def build_query_parameters_explicit_request(*, param: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_annotation_only_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_annotation_only_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -67,14 +69,14 @@ def build_query_parameters_annotation_only_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersOperations: +class RoutesClientQueryParametersOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_parameters` attribute. + :attr:`routes_client_query_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -84,10 +86,10 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.query_expansion = QueryParametersQueryExpansionOperations( + self.routes_client_query_parameters_query_expansion = RoutesClientQueryParametersQueryExpansionOperations( self._client, self._config, self._serialize, self._deserialize ) - self.query_continuation = QueryParametersQueryContinuationOperations( + self.routes_client_query_parameters_query_continuation = RoutesClientQueryParametersQueryContinuationOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -113,7 +115,7 @@ def template_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disabl cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_template_only_request( + _request = build_routes_client_query_parameters_template_only_request( param=param, headers=_headers, params=_params, @@ -157,7 +159,7 @@ def explicit(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=inc cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_explicit_request( + _request = build_routes_client_query_parameters_explicit_request( param=param, headers=_headers, params=_params, @@ -201,7 +203,7 @@ def annotation_only(self, *, param: str, **kwargs: Any) -> None: # pylint: disa cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_annotation_only_request( + _request = build_routes_client_query_parameters_annotation_only_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py index 8340e017a4..e4aead3336 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import QueryParametersQueryContinuationExplodeOperations -from ...standard.aio.operations._operations import QueryParametersQueryContinuationStandardOperations +from ...explode.aio.operations._operations import RoutesClientQueryParametersQueryContinuationExplodeOperations +from ...standard.aio.operations._operations import RoutesClientQueryParametersQueryContinuationStandardOperations -class QueryParametersQueryContinuationOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_continuation` attribute. + :attr:`routes_client_query_parameters_query_continuation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryContinuationStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_standard = ( + RoutesClientQueryParametersQueryContinuationStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryContinuationExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_explode = ( + RoutesClientQueryParametersQueryContinuationExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py index c5656863da..fbf72b03e4 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_continuation_explode_array_request, - build_query_parameters_query_continuation_explode_primitive_request, - build_query_parameters_query_continuation_explode_record_request, + build_routes_client_query_parameters_query_continuation_explode_array_request, + build_routes_client_query_parameters_query_continuation_explode_primitive_request, + build_routes_client_query_parameters_query_continuation_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_continuation_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_array_request( + _request = build_routes_client_query_parameters_query_continuation_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_record_request( + _request = build_routes_client_query_parameters_query_continuation_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py index f1944af031..d7ec0be65f 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/explode/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_continuation_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -39,7 +39,7 @@ def build_query_parameters_query_continuation_explode_primitive_request( # pyli return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -53,7 +53,7 @@ def build_query_parameters_query_continuation_explode_array_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_explode_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -67,14 +67,14 @@ def build_query_parameters_query_continuation_explode_record_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_continuation_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +106,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -150,7 +150,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_array_request( + _request = build_routes_client_query_parameters_query_continuation_explode_array_request( param=param, headers=_headers, params=_params, @@ -194,7 +194,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_explode_record_request( + _request = build_routes_client_query_parameters_query_continuation_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py index 11996d9287..bbbe84a24a 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import QueryParametersQueryContinuationExplodeOperations -from ..standard.operations._operations import QueryParametersQueryContinuationStandardOperations +from ..explode.operations._operations import RoutesClientQueryParametersQueryContinuationExplodeOperations +from ..standard.operations._operations import RoutesClientQueryParametersQueryContinuationStandardOperations -class QueryParametersQueryContinuationOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_continuation` attribute. + :attr:`routes_client_query_parameters_query_continuation` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryContinuationStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_standard = ( + RoutesClientQueryParametersQueryContinuationStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryContinuationExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_continuation_explode = ( + RoutesClientQueryParametersQueryContinuationExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py index 9108de6edb..32c56e558c 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_continuation_standard_array_request, - build_query_parameters_query_continuation_standard_primitive_request, - build_query_parameters_query_continuation_standard_record_request, + build_routes_client_query_parameters_query_continuation_standard_array_request, + build_routes_client_query_parameters_query_continuation_standard_primitive_request, + build_routes_client_query_parameters_query_continuation_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_continuation_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_array_request( + _request = build_routes_client_query_parameters_query_continuation_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_record_request( + _request = build_routes_client_query_parameters_query_continuation_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py index a3374e1193..dd2ac90e79 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/querycontinuation/standard/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_continuation_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -39,7 +39,7 @@ def build_query_parameters_query_continuation_standard_primitive_request( # pyl return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -53,7 +53,7 @@ def build_query_parameters_query_continuation_standard_array_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_continuation_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_continuation_standard_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -67,14 +67,14 @@ def build_query_parameters_query_continuation_standard_record_request( # pylint return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryContinuationStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_continuation_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +106,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_primitive_request( + _request = build_routes_client_query_parameters_query_continuation_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -150,7 +150,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_array_request( + _request = build_routes_client_query_parameters_query_continuation_standard_array_request( param=param, headers=_headers, params=_params, @@ -194,7 +194,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_continuation_standard_record_request( + _request = build_routes_client_query_parameters_query_continuation_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py index 9bad903379..61a3d8df28 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/aio/operations/_operations.py @@ -3,18 +3,18 @@ from ....._utils.serialization import Deserializer, Serializer from .....aio._configuration import RoutesClientConfiguration -from ...explode.aio.operations._operations import QueryParametersQueryExpansionExplodeOperations -from ...standard.aio.operations._operations import QueryParametersQueryExpansionStandardOperations +from ...explode.aio.operations._operations import RoutesClientQueryParametersQueryExpansionExplodeOperations +from ...standard.aio.operations._operations import RoutesClientQueryParametersQueryExpansionStandardOperations -class QueryParametersQueryExpansionOperations: +class RoutesClientQueryParametersQueryExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`query_expansion` attribute. + :attr:`routes_client_query_parameters_query_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_standard = ( + RoutesClientQueryParametersQueryExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_explode = ( + RoutesClientQueryParametersQueryExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py index e4f940f2f9..623471b36b 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_expansion_explode_array_request, - build_query_parameters_query_expansion_explode_primitive_request, - build_query_parameters_query_expansion_explode_record_request, + build_routes_client_query_parameters_query_expansion_explode_array_request, + build_routes_client_query_parameters_query_expansion_explode_primitive_request, + build_routes_client_query_parameters_query_expansion_explode_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_array_request( + _request = build_routes_client_query_parameters_query_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_record_request( + _request = build_routes_client_query_parameters_query_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py index f47781a5f0..727fc8cefe 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/explode/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_expansion_explode_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -39,7 +39,7 @@ def build_query_parameters_query_expansion_explode_primitive_request( # pylint: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_explode_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -53,7 +53,7 @@ def build_query_parameters_query_expansion_explode_array_request( # pylint: dis return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_explode_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_explode_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -67,14 +67,14 @@ def build_query_parameters_query_expansion_explode_record_request( # pylint: di return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionExplodeOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`explode` attribute. + :attr:`routes_client_query_parameters_query_expansion_explode` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +106,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_explode_primitive_request( param=param, headers=_headers, params=_params, @@ -150,7 +150,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_array_request( + _request = build_routes_client_query_parameters_query_expansion_explode_array_request( param=param, headers=_headers, params=_params, @@ -194,7 +194,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_explode_record_request( + _request = build_routes_client_query_parameters_query_expansion_explode_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py index 2a6a86e95c..161b2d5b0d 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/operations/_operations.py @@ -3,18 +3,18 @@ from ...._configuration import RoutesClientConfiguration from ...._utils.serialization import Deserializer, Serializer -from ..explode.operations._operations import QueryParametersQueryExpansionExplodeOperations -from ..standard.operations._operations import QueryParametersQueryExpansionStandardOperations +from ..explode.operations._operations import RoutesClientQueryParametersQueryExpansionExplodeOperations +from ..standard.operations._operations import RoutesClientQueryParametersQueryExpansionStandardOperations -class QueryParametersQueryExpansionOperations: +class RoutesClientQueryParametersQueryExpansionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`query_expansion` attribute. + :attr:`routes_client_query_parameters_query_expansion` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -24,9 +24,13 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.standard = QueryParametersQueryExpansionStandardOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_standard = ( + RoutesClientQueryParametersQueryExpansionStandardOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.explode = QueryParametersQueryExpansionExplodeOperations( - self._client, self._config, self._serialize, self._deserialize + self.routes_client_query_parameters_query_expansion_explode = ( + RoutesClientQueryParametersQueryExpansionExplodeOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py index 1bddfbedfd..0f25b52ec1 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/aio/operations/_operations.py @@ -17,23 +17,23 @@ from ......_utils.serialization import Deserializer, Serializer from ......aio._configuration import RoutesClientConfiguration from ...operations._operations import ( - build_query_parameters_query_expansion_standard_array_request, - build_query_parameters_query_expansion_standard_primitive_request, - build_query_parameters_query_expansion_standard_record_request, + build_routes_client_query_parameters_query_expansion_standard_array_request, + build_routes_client_query_parameters_query_expansion_standard_primitive_request, + build_routes_client_query_parameters_query_expansion_standard_record_request, ) T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class QueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.aio.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -65,7 +65,7 @@ async def primitive(self, *, param: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -109,7 +109,7 @@ async def array(self, *, param: list[str], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_array_request( + _request = build_routes_client_query_parameters_query_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -153,7 +153,7 @@ async def record(self, *, param: dict[str, int], **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_record_request( + _request = build_routes_client_query_parameters_query_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py index c9cd90b113..9e09515780 100644 --- a/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/routes/routes/queryparameters/queryexpansion/standard/operations/_operations.py @@ -25,7 +25,7 @@ _SERIALIZER.client_side_validation = False -def build_query_parameters_query_expansion_standard_primitive_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_primitive_request( # pylint: disable=name-too-long *, param: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -39,7 +39,7 @@ def build_query_parameters_query_expansion_standard_primitive_request( # pylint return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_standard_array_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_array_request( # pylint: disable=name-too-long *, param: list[str], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -53,7 +53,7 @@ def build_query_parameters_query_expansion_standard_array_request( # pylint: di return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_query_parameters_query_expansion_standard_record_request( # pylint: disable=name-too-long +def build_routes_client_query_parameters_query_expansion_standard_record_request( # pylint: disable=name-too-long *, param: dict[str, int], **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -67,14 +67,14 @@ def build_query_parameters_query_expansion_standard_record_request( # pylint: d return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class QueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long +class RoutesClientQueryParametersQueryExpansionStandardOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~routes.RoutesClient`'s - :attr:`standard` attribute. + :attr:`routes_client_query_parameters_query_expansion_standard` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -106,7 +106,7 @@ def primitive(self, *, param: str, **kwargs: Any) -> None: # pylint: disable=in cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_primitive_request( + _request = build_routes_client_query_parameters_query_expansion_standard_primitive_request( param=param, headers=_headers, params=_params, @@ -150,7 +150,7 @@ def array(self, *, param: list[str], **kwargs: Any) -> None: # pylint: disable= cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_array_request( + _request = build_routes_client_query_parameters_query_expansion_standard_array_request( param=param, headers=_headers, params=_params, @@ -194,7 +194,7 @@ def record(self, *, param: dict[str, int], **kwargs: Any) -> None: # pylint: di cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_query_parameters_query_expansion_standard_record_request( + _request = build_routes_client_query_parameters_query_expansion_standard_record_request( param=param, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py index 4aff34de05..f0d8b9112a 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/_client.py @@ -9,14 +9,15 @@ from ._configuration import JsonClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .property.operations import PropertyOperations +from .property.operations import JsonClientPropertyOperations class JsonClient: # pylint: disable=client-accepts-api-version-keyword """Encoded names. - :ivar property: PropertyOperations operations - :vartype property: serialization.encodedname.json.operations.PropertyOperations + :ivar json_client_property: JsonClientPropertyOperations operations + :vartype json_client_property: + serialization.encodedname.json.operations.JsonClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.json_client_property = JsonClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py index 3c73b23acb..52e3e610c0 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/aio/_client.py @@ -8,15 +8,16 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..property.aio.operations import PropertyOperations +from ..property.aio.operations import JsonClientPropertyOperations from ._configuration import JsonClientConfiguration class JsonClient: # pylint: disable=client-accepts-api-version-keyword """Encoded names. - :ivar property: PropertyOperations operations - :vartype property: serialization.encodedname.json.aio.operations.PropertyOperations + :ivar json_client_property: JsonClientPropertyOperations operations + :vartype json_client_property: + serialization.encodedname.json.aio.operations.JsonClientPropertyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.property = PropertyOperations(self._client, self._config, self._serialize, self._deserialize) + self.json_client_property = JsonClientPropertyOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/__init__.py index 02fe504541..3e6d8dcda5 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import JsonClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "JsonClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/_operations.py index 1e692205ff..58f6f1abe3 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/aio/operations/_operations.py @@ -23,21 +23,21 @@ from ...._utils.model_base import SdkJSONEncoder, _deserialize from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import JsonClientConfiguration -from ...operations._operations import build_property_get_request, build_property_send_request +from ...operations._operations import build_json_client_property_get_request, build_json_client_property_send_request JSON = MutableMapping[str, Any] T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class PropertyOperations: +class JsonClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~serialization.encodedname.json.aio.JsonClient`'s - :attr:`property` attribute. + :attr:`json_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -122,7 +122,7 @@ async def send(self, body: Union[_models2.JsonEncodedNameModel, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_send_request( + _request = build_json_client_property_send_request( content_type=content_type, content=_content, headers=_headers, @@ -165,7 +165,7 @@ async def get(self, **kwargs: Any) -> _models2.JsonEncodedNameModel: cls: ClsType[_models2.JsonEncodedNameModel] = kwargs.pop("cls", None) - _request = build_property_get_request( + _request = build_json_client_property_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/__init__.py index 02fe504541..3e6d8dcda5 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import PropertyOperations # type: ignore +from ._operations import JsonClientPropertyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "PropertyOperations", + "JsonClientPropertyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/_operations.py index 51466962d6..91b985ce0d 100644 --- a/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/serialization-encoded-name-json/serialization/encodedname/json/property/operations/_operations.py @@ -32,7 +32,7 @@ _SERIALIZER.client_side_validation = False -def build_property_send_request(**kwargs: Any) -> HttpRequest: +def build_json_client_property_send_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -46,7 +46,7 @@ def build_property_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_property_get_request(**kwargs: Any) -> HttpRequest: +def build_json_client_property_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -60,14 +60,14 @@ def build_property_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class PropertyOperations: +class JsonClientPropertyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~serialization.encodedname.json.JsonClient`'s - :attr:`property` attribute. + :attr:`json_client_property` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -154,7 +154,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_property_send_request( + _request = build_json_client_property_send_request( content_type=content_type, content=_content, headers=_headers, @@ -197,7 +197,7 @@ def get(self, **kwargs: Any) -> _models1.JsonEncodedNameModel: cls: ClsType[_models1.JsonEncodedNameModel] = kwargs.pop("cls", None) - _request = build_property_get_request( + _request = build_json_client_property_get_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py index 8332d62bfe..1e5cee6ac6 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/_client.py @@ -9,9 +9,9 @@ from ._configuration import SpecialWordsClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .modelproperties.operations import ModelPropertiesOperations -from .models.operations import ModelsOperations -from .operations import Operations, ParametersOperations +from .modelproperties.operations import SpecialWordsClientModelPropertiesOperations +from .models.operations import SpecialWordsClientModelsOperations +from .operations import SpecialWordsClientOperationsOperations, SpecialWordsClientParametersOperations class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword @@ -57,14 +57,19 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword with yield. - :ivar models: ModelsOperations operations - :vartype models: specialwords.operations.ModelsOperations - :ivar model_properties: ModelPropertiesOperations operations - :vartype model_properties: specialwords.operations.ModelPropertiesOperations - :ivar operations: Operations operations - :vartype operations: specialwords.operations.Operations - :ivar parameters: ParametersOperations operations - :vartype parameters: specialwords.operations.ParametersOperations + :ivar special_words_client_models: SpecialWordsClientModelsOperations operations + :vartype special_words_client_models: + specialwords.operations.SpecialWordsClientModelsOperations + :ivar special_words_client_model_properties: SpecialWordsClientModelPropertiesOperations + operations + :vartype special_words_client_model_properties: + specialwords.operations.SpecialWordsClientModelPropertiesOperations + :ivar special_words_client_operations: SpecialWordsClientOperationsOperations operations + :vartype special_words_client_operations: + specialwords.operations.SpecialWordsClientOperationsOperations + :ivar special_words_client_parameters: SpecialWordsClientParametersOperations operations + :vartype special_words_client_parameters: + specialwords.operations.SpecialWordsClientParametersOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -91,12 +96,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_properties = ModelPropertiesOperations( + self.special_words_client_models = SpecialWordsClientModelsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_model_properties = SpecialWordsClientModelPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_operations = SpecialWordsClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_parameters = SpecialWordsClientParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.parameters = ParametersOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py index 15a6079914..6e4a5b4700 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/_client.py @@ -8,10 +8,10 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..modelproperties.aio.operations import ModelPropertiesOperations -from ..models.aio.operations import ModelsOperations +from ..modelproperties.aio.operations import SpecialWordsClientModelPropertiesOperations +from ..models.aio.operations import SpecialWordsClientModelsOperations from ._configuration import SpecialWordsClientConfiguration -from .operations import Operations, ParametersOperations +from .operations import SpecialWordsClientOperationsOperations, SpecialWordsClientParametersOperations class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword @@ -57,14 +57,19 @@ class SpecialWordsClient: # pylint: disable=client-accepts-api-version-keyword with yield. - :ivar models: ModelsOperations operations - :vartype models: specialwords.aio.operations.ModelsOperations - :ivar model_properties: ModelPropertiesOperations operations - :vartype model_properties: specialwords.aio.operations.ModelPropertiesOperations - :ivar operations: Operations operations - :vartype operations: specialwords.aio.operations.Operations - :ivar parameters: ParametersOperations operations - :vartype parameters: specialwords.aio.operations.ParametersOperations + :ivar special_words_client_models: SpecialWordsClientModelsOperations operations + :vartype special_words_client_models: + specialwords.aio.operations.SpecialWordsClientModelsOperations + :ivar special_words_client_model_properties: SpecialWordsClientModelPropertiesOperations + operations + :vartype special_words_client_model_properties: + specialwords.aio.operations.SpecialWordsClientModelPropertiesOperations + :ivar special_words_client_operations: SpecialWordsClientOperationsOperations operations + :vartype special_words_client_operations: + specialwords.aio.operations.SpecialWordsClientOperationsOperations + :ivar special_words_client_parameters: SpecialWordsClientParametersOperations operations + :vartype special_words_client_parameters: + specialwords.aio.operations.SpecialWordsClientParametersOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -91,12 +96,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_properties = ModelPropertiesOperations( + self.special_words_client_models = SpecialWordsClientModelsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_model_properties = SpecialWordsClientModelPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_operations = SpecialWordsClientOperationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.special_words_client_parameters = SpecialWordsClientParametersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.parameters = ParametersOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/__init__.py index e9144ea8af..40d285d847 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Operations # type: ignore -from ._operations import ParametersOperations # type: ignore +from ._operations import SpecialWordsClientOperationsOperations # type: ignore +from ._operations import SpecialWordsClientParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "ParametersOperations", + "SpecialWordsClientOperationsOperations", + "SpecialWordsClientParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py index 67e0c125f8..1e7c1d24d6 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/aio/operations/_operations.py @@ -17,73 +17,73 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_operations_and_method_request, - build_operations_as_method_request, - build_operations_assert_method_request, - build_operations_async_method_request, - build_operations_await_method_request, - build_operations_break_method_request, - build_operations_class_method_request, - build_operations_constructor_request, - build_operations_continue_method_request, - build_operations_def_method_request, - build_operations_del_method_request, - build_operations_elif_method_request, - build_operations_else_method_request, - build_operations_except_method_request, - build_operations_exec_method_request, - build_operations_finally_method_request, - build_operations_for_method_request, - build_operations_from_method_request, - build_operations_global_method_request, - build_operations_if_method_request, - build_operations_import_method_request, - build_operations_in_method_request, - build_operations_is_method_request, - build_operations_lambda_method_request, - build_operations_not_method_request, - build_operations_or_method_request, - build_operations_pass_method_request, - build_operations_raise_method_request, - build_operations_return_method_request, - build_operations_try_method_request, - build_operations_while_method_request, - build_operations_with_method_request, - build_operations_yield_method_request, - build_parameters_with_and_request, - build_parameters_with_as_request, - build_parameters_with_assert_request, - build_parameters_with_async_request, - build_parameters_with_await_request, - build_parameters_with_break_request, - build_parameters_with_cancellation_token_request, - build_parameters_with_class_request, - build_parameters_with_constructor_request, - build_parameters_with_continue_request, - build_parameters_with_def_request, - build_parameters_with_del_request, - build_parameters_with_elif_request, - build_parameters_with_else_request, - build_parameters_with_except_request, - build_parameters_with_exec_request, - build_parameters_with_finally_request, - build_parameters_with_for_request, - build_parameters_with_from_request, - build_parameters_with_global_request, - build_parameters_with_if_request, - build_parameters_with_import_request, - build_parameters_with_in_request, - build_parameters_with_is_request, - build_parameters_with_lambda_request, - build_parameters_with_not_request, - build_parameters_with_or_request, - build_parameters_with_pass_request, - build_parameters_with_raise_request, - build_parameters_with_return_request, - build_parameters_with_try_request, - build_parameters_with_while_request, - build_parameters_with_with_request, - build_parameters_with_yield_request, + build_special_words_client_operations_and_method_request, + build_special_words_client_operations_as_method_request, + build_special_words_client_operations_assert_method_request, + build_special_words_client_operations_async_method_request, + build_special_words_client_operations_await_method_request, + build_special_words_client_operations_break_method_request, + build_special_words_client_operations_class_method_request, + build_special_words_client_operations_constructor_request, + build_special_words_client_operations_continue_method_request, + build_special_words_client_operations_def_method_request, + build_special_words_client_operations_del_method_request, + build_special_words_client_operations_elif_method_request, + build_special_words_client_operations_else_method_request, + build_special_words_client_operations_except_method_request, + build_special_words_client_operations_exec_method_request, + build_special_words_client_operations_finally_method_request, + build_special_words_client_operations_for_method_request, + build_special_words_client_operations_from_method_request, + build_special_words_client_operations_global_method_request, + build_special_words_client_operations_if_method_request, + build_special_words_client_operations_import_method_request, + build_special_words_client_operations_in_method_request, + build_special_words_client_operations_is_method_request, + build_special_words_client_operations_lambda_method_request, + build_special_words_client_operations_not_method_request, + build_special_words_client_operations_or_method_request, + build_special_words_client_operations_pass_method_request, + build_special_words_client_operations_raise_method_request, + build_special_words_client_operations_return_method_request, + build_special_words_client_operations_try_method_request, + build_special_words_client_operations_while_method_request, + build_special_words_client_operations_with_method_request, + build_special_words_client_operations_yield_method_request, + build_special_words_client_parameters_with_and_request, + build_special_words_client_parameters_with_as_request, + build_special_words_client_parameters_with_assert_request, + build_special_words_client_parameters_with_async_request, + build_special_words_client_parameters_with_await_request, + build_special_words_client_parameters_with_break_request, + build_special_words_client_parameters_with_cancellation_token_request, + build_special_words_client_parameters_with_class_request, + build_special_words_client_parameters_with_constructor_request, + build_special_words_client_parameters_with_continue_request, + build_special_words_client_parameters_with_def_request, + build_special_words_client_parameters_with_del_request, + build_special_words_client_parameters_with_elif_request, + build_special_words_client_parameters_with_else_request, + build_special_words_client_parameters_with_except_request, + build_special_words_client_parameters_with_exec_request, + build_special_words_client_parameters_with_finally_request, + build_special_words_client_parameters_with_for_request, + build_special_words_client_parameters_with_from_request, + build_special_words_client_parameters_with_global_request, + build_special_words_client_parameters_with_if_request, + build_special_words_client_parameters_with_import_request, + build_special_words_client_parameters_with_in_request, + build_special_words_client_parameters_with_is_request, + build_special_words_client_parameters_with_lambda_request, + build_special_words_client_parameters_with_not_request, + build_special_words_client_parameters_with_or_request, + build_special_words_client_parameters_with_pass_request, + build_special_words_client_parameters_with_raise_request, + build_special_words_client_parameters_with_return_request, + build_special_words_client_parameters_with_try_request, + build_special_words_client_parameters_with_while_request, + build_special_words_client_parameters_with_with_request, + build_special_words_client_parameters_with_yield_request, ) from .._configuration import SpecialWordsClientConfiguration @@ -91,14 +91,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class Operations: # pylint: disable=too-many-public-methods +class SpecialWordsClientOperationsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`operations` attribute. + :attr:`special_words_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -128,7 +128,7 @@ async def and_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_and_method_request( + _request = build_special_words_client_operations_and_method_request( headers=_headers, params=_params, ) @@ -169,7 +169,7 @@ async def as_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_as_method_request( + _request = build_special_words_client_operations_as_method_request( headers=_headers, params=_params, ) @@ -210,7 +210,7 @@ async def assert_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_assert_method_request( + _request = build_special_words_client_operations_assert_method_request( headers=_headers, params=_params, ) @@ -251,7 +251,7 @@ async def async_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_async_method_request( + _request = build_special_words_client_operations_async_method_request( headers=_headers, params=_params, ) @@ -292,7 +292,7 @@ async def await_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_await_method_request( + _request = build_special_words_client_operations_await_method_request( headers=_headers, params=_params, ) @@ -333,7 +333,7 @@ async def break_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_break_method_request( + _request = build_special_words_client_operations_break_method_request( headers=_headers, params=_params, ) @@ -374,7 +374,7 @@ async def class_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_class_method_request( + _request = build_special_words_client_operations_class_method_request( headers=_headers, params=_params, ) @@ -415,7 +415,7 @@ async def constructor(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_constructor_request( + _request = build_special_words_client_operations_constructor_request( headers=_headers, params=_params, ) @@ -456,7 +456,7 @@ async def continue_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_continue_method_request( + _request = build_special_words_client_operations_continue_method_request( headers=_headers, params=_params, ) @@ -497,7 +497,7 @@ async def def_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_def_method_request( + _request = build_special_words_client_operations_def_method_request( headers=_headers, params=_params, ) @@ -538,7 +538,7 @@ async def del_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_del_method_request( + _request = build_special_words_client_operations_del_method_request( headers=_headers, params=_params, ) @@ -579,7 +579,7 @@ async def elif_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_elif_method_request( + _request = build_special_words_client_operations_elif_method_request( headers=_headers, params=_params, ) @@ -620,7 +620,7 @@ async def else_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_else_method_request( + _request = build_special_words_client_operations_else_method_request( headers=_headers, params=_params, ) @@ -661,7 +661,7 @@ async def except_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_except_method_request( + _request = build_special_words_client_operations_except_method_request( headers=_headers, params=_params, ) @@ -702,7 +702,7 @@ async def exec_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_exec_method_request( + _request = build_special_words_client_operations_exec_method_request( headers=_headers, params=_params, ) @@ -743,7 +743,7 @@ async def finally_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_finally_method_request( + _request = build_special_words_client_operations_finally_method_request( headers=_headers, params=_params, ) @@ -784,7 +784,7 @@ async def for_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_for_method_request( + _request = build_special_words_client_operations_for_method_request( headers=_headers, params=_params, ) @@ -825,7 +825,7 @@ async def from_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_from_method_request( + _request = build_special_words_client_operations_from_method_request( headers=_headers, params=_params, ) @@ -866,7 +866,7 @@ async def global_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_global_method_request( + _request = build_special_words_client_operations_global_method_request( headers=_headers, params=_params, ) @@ -907,7 +907,7 @@ async def if_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_if_method_request( + _request = build_special_words_client_operations_if_method_request( headers=_headers, params=_params, ) @@ -948,7 +948,7 @@ async def import_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_import_method_request( + _request = build_special_words_client_operations_import_method_request( headers=_headers, params=_params, ) @@ -989,7 +989,7 @@ async def in_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_in_method_request( + _request = build_special_words_client_operations_in_method_request( headers=_headers, params=_params, ) @@ -1030,7 +1030,7 @@ async def is_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_is_method_request( + _request = build_special_words_client_operations_is_method_request( headers=_headers, params=_params, ) @@ -1071,7 +1071,7 @@ async def lambda_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_lambda_method_request( + _request = build_special_words_client_operations_lambda_method_request( headers=_headers, params=_params, ) @@ -1112,7 +1112,7 @@ async def not_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_not_method_request( + _request = build_special_words_client_operations_not_method_request( headers=_headers, params=_params, ) @@ -1153,7 +1153,7 @@ async def or_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_or_method_request( + _request = build_special_words_client_operations_or_method_request( headers=_headers, params=_params, ) @@ -1194,7 +1194,7 @@ async def pass_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_pass_method_request( + _request = build_special_words_client_operations_pass_method_request( headers=_headers, params=_params, ) @@ -1235,7 +1235,7 @@ async def raise_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_raise_method_request( + _request = build_special_words_client_operations_raise_method_request( headers=_headers, params=_params, ) @@ -1276,7 +1276,7 @@ async def return_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_return_method_request( + _request = build_special_words_client_operations_return_method_request( headers=_headers, params=_params, ) @@ -1317,7 +1317,7 @@ async def try_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_try_method_request( + _request = build_special_words_client_operations_try_method_request( headers=_headers, params=_params, ) @@ -1358,7 +1358,7 @@ async def while_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_while_method_request( + _request = build_special_words_client_operations_while_method_request( headers=_headers, params=_params, ) @@ -1399,7 +1399,7 @@ async def with_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_with_method_request( + _request = build_special_words_client_operations_with_method_request( headers=_headers, params=_params, ) @@ -1440,7 +1440,7 @@ async def yield_method(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_yield_method_request( + _request = build_special_words_client_operations_yield_method_request( headers=_headers, params=_params, ) @@ -1462,14 +1462,14 @@ async def yield_method(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ParametersOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientParametersOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`parameters` attribute. + :attr:`special_words_client_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1501,7 +1501,7 @@ async def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_and_request( + _request = build_special_words_client_parameters_with_and_request( and_parameter=and_parameter, headers=_headers, params=_params, @@ -1545,7 +1545,7 @@ async def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_as_request( + _request = build_special_words_client_parameters_with_as_request( as_parameter=as_parameter, headers=_headers, params=_params, @@ -1589,7 +1589,7 @@ async def with_assert(self, *, assert_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_assert_request( + _request = build_special_words_client_parameters_with_assert_request( assert_parameter=assert_parameter, headers=_headers, params=_params, @@ -1633,7 +1633,7 @@ async def with_async(self, *, async_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_async_request( + _request = build_special_words_client_parameters_with_async_request( async_parameter=async_parameter, headers=_headers, params=_params, @@ -1677,7 +1677,7 @@ async def with_await(self, *, await_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_await_request( + _request = build_special_words_client_parameters_with_await_request( await_parameter=await_parameter, headers=_headers, params=_params, @@ -1721,7 +1721,7 @@ async def with_break(self, *, break_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_break_request( + _request = build_special_words_client_parameters_with_break_request( break_parameter=break_parameter, headers=_headers, params=_params, @@ -1765,7 +1765,7 @@ async def with_class(self, *, class_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_class_request( + _request = build_special_words_client_parameters_with_class_request( class_parameter=class_parameter, headers=_headers, params=_params, @@ -1809,7 +1809,7 @@ async def with_constructor(self, *, constructor: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_constructor_request( + _request = build_special_words_client_parameters_with_constructor_request( constructor=constructor, headers=_headers, params=_params, @@ -1853,7 +1853,7 @@ async def with_continue(self, *, continue_parameter: str, **kwargs: Any) -> None cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_continue_request( + _request = build_special_words_client_parameters_with_continue_request( continue_parameter=continue_parameter, headers=_headers, params=_params, @@ -1897,7 +1897,7 @@ async def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_def_request( + _request = build_special_words_client_parameters_with_def_request( def_parameter=def_parameter, headers=_headers, params=_params, @@ -1941,7 +1941,7 @@ async def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_del_request( + _request = build_special_words_client_parameters_with_del_request( del_parameter=del_parameter, headers=_headers, params=_params, @@ -1985,7 +1985,7 @@ async def with_elif(self, *, elif_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_elif_request( + _request = build_special_words_client_parameters_with_elif_request( elif_parameter=elif_parameter, headers=_headers, params=_params, @@ -2029,7 +2029,7 @@ async def with_else(self, *, else_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_else_request( + _request = build_special_words_client_parameters_with_else_request( else_parameter=else_parameter, headers=_headers, params=_params, @@ -2073,7 +2073,7 @@ async def with_except(self, *, except_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_except_request( + _request = build_special_words_client_parameters_with_except_request( except_parameter=except_parameter, headers=_headers, params=_params, @@ -2117,7 +2117,7 @@ async def with_exec(self, *, exec_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_exec_request( + _request = build_special_words_client_parameters_with_exec_request( exec_parameter=exec_parameter, headers=_headers, params=_params, @@ -2161,7 +2161,7 @@ async def with_finally(self, *, finally_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_finally_request( + _request = build_special_words_client_parameters_with_finally_request( finally_parameter=finally_parameter, headers=_headers, params=_params, @@ -2205,7 +2205,7 @@ async def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_for_request( + _request = build_special_words_client_parameters_with_for_request( for_parameter=for_parameter, headers=_headers, params=_params, @@ -2249,7 +2249,7 @@ async def with_from(self, *, from_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_from_request( + _request = build_special_words_client_parameters_with_from_request( from_parameter=from_parameter, headers=_headers, params=_params, @@ -2293,7 +2293,7 @@ async def with_global(self, *, global_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_global_request( + _request = build_special_words_client_parameters_with_global_request( global_parameter=global_parameter, headers=_headers, params=_params, @@ -2337,7 +2337,7 @@ async def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_if_request( + _request = build_special_words_client_parameters_with_if_request( if_parameter=if_parameter, headers=_headers, params=_params, @@ -2381,7 +2381,7 @@ async def with_import(self, *, import_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_import_request( + _request = build_special_words_client_parameters_with_import_request( import_parameter=import_parameter, headers=_headers, params=_params, @@ -2425,7 +2425,7 @@ async def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_in_request( + _request = build_special_words_client_parameters_with_in_request( in_parameter=in_parameter, headers=_headers, params=_params, @@ -2469,7 +2469,7 @@ async def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_is_request( + _request = build_special_words_client_parameters_with_is_request( is_parameter=is_parameter, headers=_headers, params=_params, @@ -2513,7 +2513,7 @@ async def with_lambda(self, *, lambda_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_lambda_request( + _request = build_special_words_client_parameters_with_lambda_request( lambda_parameter=lambda_parameter, headers=_headers, params=_params, @@ -2557,7 +2557,7 @@ async def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_not_request( + _request = build_special_words_client_parameters_with_not_request( not_parameter=not_parameter, headers=_headers, params=_params, @@ -2601,7 +2601,7 @@ async def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_or_request( + _request = build_special_words_client_parameters_with_or_request( or_parameter=or_parameter, headers=_headers, params=_params, @@ -2645,7 +2645,7 @@ async def with_pass(self, *, pass_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_pass_request( + _request = build_special_words_client_parameters_with_pass_request( pass_parameter=pass_parameter, headers=_headers, params=_params, @@ -2689,7 +2689,7 @@ async def with_raise(self, *, raise_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_raise_request( + _request = build_special_words_client_parameters_with_raise_request( raise_parameter=raise_parameter, headers=_headers, params=_params, @@ -2733,7 +2733,7 @@ async def with_return(self, *, return_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_return_request( + _request = build_special_words_client_parameters_with_return_request( return_parameter=return_parameter, headers=_headers, params=_params, @@ -2777,7 +2777,7 @@ async def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_try_request( + _request = build_special_words_client_parameters_with_try_request( try_parameter=try_parameter, headers=_headers, params=_params, @@ -2821,7 +2821,7 @@ async def with_while(self, *, while_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_while_request( + _request = build_special_words_client_parameters_with_while_request( while_parameter=while_parameter, headers=_headers, params=_params, @@ -2865,7 +2865,7 @@ async def with_with(self, *, with_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_with_request( + _request = build_special_words_client_parameters_with_with_request( with_parameter=with_parameter, headers=_headers, params=_params, @@ -2909,7 +2909,7 @@ async def with_yield(self, *, yield_parameter: str, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_yield_request( + _request = build_special_words_client_parameters_with_yield_request( yield_parameter=yield_parameter, headers=_headers, params=_params, @@ -2953,7 +2953,7 @@ async def with_cancellation_token(self, *, cancellation_token: str, **kwargs: An cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_cancellation_token_request( + _request = build_special_words_client_parameters_with_cancellation_token_request( cancellation_token=cancellation_token, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/__init__.py index aa3a04a3d1..12aef61059 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelPropertiesOperations # type: ignore +from ._operations import SpecialWordsClientModelPropertiesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelPropertiesOperations", + "SpecialWordsClientModelPropertiesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/_operations.py index 8c8730bfbf..f4c68faa63 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/aio/operations/_operations.py @@ -22,9 +22,9 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import SpecialWordsClientConfiguration from ...operations._operations import ( - build_model_properties_dict_methods_request, - build_model_properties_same_as_model_request, - build_model_properties_with_list_request, + build_special_words_client_model_properties_dict_methods_request, + build_special_words_client_model_properties_same_as_model_request, + build_special_words_client_model_properties_with_list_request, ) JSON = MutableMapping[str, Any] @@ -32,14 +32,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelPropertiesOperations: +class SpecialWordsClientModelPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`model_properties` attribute. + :attr:`special_words_client_model_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -123,7 +123,7 @@ async def same_as_model(self, body: Union[_models2.SameAsModel, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_same_as_model_request( + _request = build_special_words_client_model_properties_same_as_model_request( content_type=content_type, content=_content, headers=_headers, @@ -220,7 +220,7 @@ async def dict_methods(self, body: Union[_models2.DictMethods, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_dict_methods_request( + _request = build_special_words_client_model_properties_dict_methods_request( content_type=content_type, content=_content, headers=_headers, @@ -317,7 +317,7 @@ async def with_list(self, body: Union[_models2.ModelWithList, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_with_list_request( + _request = build_special_words_client_model_properties_with_list_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/__init__.py index aa3a04a3d1..12aef61059 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelPropertiesOperations # type: ignore +from ._operations import SpecialWordsClientModelPropertiesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelPropertiesOperations", + "SpecialWordsClientModelPropertiesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/_operations.py index d2e4fb6956..18670b07ca 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/modelproperties/operations/_operations.py @@ -30,7 +30,9 @@ _SERIALIZER.client_side_validation = False -def build_model_properties_same_as_model_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_special_words_client_model_properties_same_as_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -44,7 +46,9 @@ def build_model_properties_same_as_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_properties_dict_methods_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_special_words_client_model_properties_dict_methods_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -58,7 +62,9 @@ def build_model_properties_dict_methods_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_model_properties_with_list_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_model_properties_with_list_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -72,14 +78,14 @@ def build_model_properties_with_list_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class ModelPropertiesOperations: +class SpecialWordsClientModelPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`model_properties` attribute. + :attr:`special_words_client_model_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -165,7 +171,7 @@ def same_as_model( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_same_as_model_request( + _request = build_special_words_client_model_properties_same_as_model_request( content_type=content_type, content=_content, headers=_headers, @@ -264,7 +270,7 @@ def dict_methods( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_dict_methods_request( + _request = build_special_words_client_model_properties_dict_methods_request( content_type=content_type, content=_content, headers=_headers, @@ -361,7 +367,7 @@ def with_list( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_properties_with_list_request( + _request = build_special_words_client_model_properties_with_list_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/__init__.py index a479c7ff0f..4bc24d4b9b 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore +from ._operations import SpecialWordsClientModelsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", + "SpecialWordsClientModelsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/_operations.py index 8f46f72eab..6084710720 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/aio/operations/_operations.py @@ -23,39 +23,39 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import SpecialWordsClientConfiguration from ...operations._operations import ( - build_models_with_and_request, - build_models_with_as_request, - build_models_with_assert_request, - build_models_with_async_request, - build_models_with_await_request, - build_models_with_break_request, - build_models_with_class_request, - build_models_with_constructor_request, - build_models_with_continue_request, - build_models_with_def_request, - build_models_with_del_request, - build_models_with_elif_request, - build_models_with_else_request, - build_models_with_except_request, - build_models_with_exec_request, - build_models_with_finally_request, - build_models_with_for_request, - build_models_with_from_request, - build_models_with_global_request, - build_models_with_if_request, - build_models_with_import_request, - build_models_with_in_request, - build_models_with_is_request, - build_models_with_lambda_request, - build_models_with_not_request, - build_models_with_or_request, - build_models_with_pass_request, - build_models_with_raise_request, - build_models_with_return_request, - build_models_with_try_request, - build_models_with_while_request, - build_models_with_with_request, - build_models_with_yield_request, + build_special_words_client_models_with_and_request, + build_special_words_client_models_with_as_request, + build_special_words_client_models_with_assert_request, + build_special_words_client_models_with_async_request, + build_special_words_client_models_with_await_request, + build_special_words_client_models_with_break_request, + build_special_words_client_models_with_class_request, + build_special_words_client_models_with_constructor_request, + build_special_words_client_models_with_continue_request, + build_special_words_client_models_with_def_request, + build_special_words_client_models_with_del_request, + build_special_words_client_models_with_elif_request, + build_special_words_client_models_with_else_request, + build_special_words_client_models_with_except_request, + build_special_words_client_models_with_exec_request, + build_special_words_client_models_with_finally_request, + build_special_words_client_models_with_for_request, + build_special_words_client_models_with_from_request, + build_special_words_client_models_with_global_request, + build_special_words_client_models_with_if_request, + build_special_words_client_models_with_import_request, + build_special_words_client_models_with_in_request, + build_special_words_client_models_with_is_request, + build_special_words_client_models_with_lambda_request, + build_special_words_client_models_with_not_request, + build_special_words_client_models_with_or_request, + build_special_words_client_models_with_pass_request, + build_special_words_client_models_with_raise_request, + build_special_words_client_models_with_return_request, + build_special_words_client_models_with_try_request, + build_special_words_client_models_with_while_request, + build_special_words_client_models_with_with_request, + build_special_words_client_models_with_yield_request, ) JSON = MutableMapping[str, Any] @@ -63,14 +63,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ModelsOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientModelsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.aio.SpecialWordsClient`'s - :attr:`models` attribute. + :attr:`special_words_client_models` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -152,7 +152,7 @@ async def with_and(self, body: Union[_models2.AndModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_and_request( + _request = build_special_words_client_models_with_and_request( content_type=content_type, content=_content, headers=_headers, @@ -247,7 +247,7 @@ async def with_as(self, body: Union[_models2.AsModel, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_as_request( + _request = build_special_words_client_models_with_as_request( content_type=content_type, content=_content, headers=_headers, @@ -344,7 +344,7 @@ async def with_assert(self, body: Union[_models2.AssertModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_assert_request( + _request = build_special_words_client_models_with_assert_request( content_type=content_type, content=_content, headers=_headers, @@ -441,7 +441,7 @@ async def with_async(self, body: Union[_models2.AsyncModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_async_request( + _request = build_special_words_client_models_with_async_request( content_type=content_type, content=_content, headers=_headers, @@ -538,7 +538,7 @@ async def with_await(self, body: Union[_models2.AwaitModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_await_request( + _request = build_special_words_client_models_with_await_request( content_type=content_type, content=_content, headers=_headers, @@ -635,7 +635,7 @@ async def with_break(self, body: Union[_models2.BreakModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_break_request( + _request = build_special_words_client_models_with_break_request( content_type=content_type, content=_content, headers=_headers, @@ -732,7 +732,7 @@ async def with_class(self, body: Union[_models2.ClassModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_class_request( + _request = build_special_words_client_models_with_class_request( content_type=content_type, content=_content, headers=_headers, @@ -829,7 +829,7 @@ async def with_constructor(self, body: Union[_models2.Constructor, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_constructor_request( + _request = build_special_words_client_models_with_constructor_request( content_type=content_type, content=_content, headers=_headers, @@ -926,7 +926,7 @@ async def with_continue(self, body: Union[_models2.ContinueModel, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_continue_request( + _request = build_special_words_client_models_with_continue_request( content_type=content_type, content=_content, headers=_headers, @@ -1021,7 +1021,7 @@ async def with_def(self, body: Union[_models2.DefModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_def_request( + _request = build_special_words_client_models_with_def_request( content_type=content_type, content=_content, headers=_headers, @@ -1116,7 +1116,7 @@ async def with_del(self, body: Union[_models2.DelModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_del_request( + _request = build_special_words_client_models_with_del_request( content_type=content_type, content=_content, headers=_headers, @@ -1213,7 +1213,7 @@ async def with_elif(self, body: Union[_models2.ElifModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_elif_request( + _request = build_special_words_client_models_with_elif_request( content_type=content_type, content=_content, headers=_headers, @@ -1310,7 +1310,7 @@ async def with_else(self, body: Union[_models2.ElseModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_else_request( + _request = build_special_words_client_models_with_else_request( content_type=content_type, content=_content, headers=_headers, @@ -1407,7 +1407,7 @@ async def with_except(self, body: Union[_models2.ExceptModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_except_request( + _request = build_special_words_client_models_with_except_request( content_type=content_type, content=_content, headers=_headers, @@ -1504,7 +1504,7 @@ async def with_exec(self, body: Union[_models2.ExecModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_exec_request( + _request = build_special_words_client_models_with_exec_request( content_type=content_type, content=_content, headers=_headers, @@ -1601,7 +1601,7 @@ async def with_finally(self, body: Union[_models2.FinallyModel, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_finally_request( + _request = build_special_words_client_models_with_finally_request( content_type=content_type, content=_content, headers=_headers, @@ -1696,7 +1696,7 @@ async def with_for(self, body: Union[_models2.ForModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_for_request( + _request = build_special_words_client_models_with_for_request( content_type=content_type, content=_content, headers=_headers, @@ -1793,7 +1793,7 @@ async def with_from(self, body: Union[_models2.FromModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_from_request( + _request = build_special_words_client_models_with_from_request( content_type=content_type, content=_content, headers=_headers, @@ -1890,7 +1890,7 @@ async def with_global(self, body: Union[_models2.GlobalModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_global_request( + _request = build_special_words_client_models_with_global_request( content_type=content_type, content=_content, headers=_headers, @@ -1985,7 +1985,7 @@ async def with_if(self, body: Union[_models2.IfModel, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_if_request( + _request = build_special_words_client_models_with_if_request( content_type=content_type, content=_content, headers=_headers, @@ -2082,7 +2082,7 @@ async def with_import(self, body: Union[_models2.ImportModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_import_request( + _request = build_special_words_client_models_with_import_request( content_type=content_type, content=_content, headers=_headers, @@ -2177,7 +2177,7 @@ async def with_in(self, body: Union[_models2.InModel, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_in_request( + _request = build_special_words_client_models_with_in_request( content_type=content_type, content=_content, headers=_headers, @@ -2272,7 +2272,7 @@ async def with_is(self, body: Union[_models2.IsModel, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_is_request( + _request = build_special_words_client_models_with_is_request( content_type=content_type, content=_content, headers=_headers, @@ -2369,7 +2369,7 @@ async def with_lambda(self, body: Union[_models2.LambdaModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_lambda_request( + _request = build_special_words_client_models_with_lambda_request( content_type=content_type, content=_content, headers=_headers, @@ -2464,7 +2464,7 @@ async def with_not(self, body: Union[_models2.NotModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_not_request( + _request = build_special_words_client_models_with_not_request( content_type=content_type, content=_content, headers=_headers, @@ -2559,7 +2559,7 @@ async def with_or(self, body: Union[_models2.OrModel, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_or_request( + _request = build_special_words_client_models_with_or_request( content_type=content_type, content=_content, headers=_headers, @@ -2656,7 +2656,7 @@ async def with_pass(self, body: Union[_models2.PassModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_pass_request( + _request = build_special_words_client_models_with_pass_request( content_type=content_type, content=_content, headers=_headers, @@ -2753,7 +2753,7 @@ async def with_raise(self, body: Union[_models2.RaiseModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_raise_request( + _request = build_special_words_client_models_with_raise_request( content_type=content_type, content=_content, headers=_headers, @@ -2850,7 +2850,7 @@ async def with_return(self, body: Union[_models2.ReturnModel, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_return_request( + _request = build_special_words_client_models_with_return_request( content_type=content_type, content=_content, headers=_headers, @@ -2945,7 +2945,7 @@ async def with_try(self, body: Union[_models2.TryModel, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_try_request( + _request = build_special_words_client_models_with_try_request( content_type=content_type, content=_content, headers=_headers, @@ -3042,7 +3042,7 @@ async def with_while(self, body: Union[_models2.WhileModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_while_request( + _request = build_special_words_client_models_with_while_request( content_type=content_type, content=_content, headers=_headers, @@ -3139,7 +3139,7 @@ async def with_with(self, body: Union[_models2.WithModel, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_with_request( + _request = build_special_words_client_models_with_with_request( content_type=content_type, content=_content, headers=_headers, @@ -3236,7 +3236,7 @@ async def with_yield(self, body: Union[_models2.YieldModel, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_yield_request( + _request = build_special_words_client_models_with_yield_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/__init__.py index a479c7ff0f..4bc24d4b9b 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ModelsOperations # type: ignore +from ._operations import SpecialWordsClientModelsOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ModelsOperations", + "SpecialWordsClientModelsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/_operations.py index 76c90b5038..29b04f56a3 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/models/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_models_with_and_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_and_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -45,7 +45,7 @@ def build_models_with_and_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_as_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_as_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -59,7 +59,9 @@ def build_models_with_as_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_assert_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_assert_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -73,7 +75,7 @@ def build_models_with_assert_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_async_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_async_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -87,7 +89,7 @@ def build_models_with_async_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_await_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_await_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -101,7 +103,7 @@ def build_models_with_await_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_break_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_break_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -115,7 +117,7 @@ def build_models_with_break_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_class_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_class_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -129,7 +131,9 @@ def build_models_with_class_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_constructor_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_constructor_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -143,7 +147,9 @@ def build_models_with_constructor_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_continue_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_continue_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -157,7 +163,7 @@ def build_models_with_continue_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_def_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_def_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -171,7 +177,7 @@ def build_models_with_def_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_del_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_del_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -185,7 +191,7 @@ def build_models_with_del_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_elif_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_elif_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -199,7 +205,7 @@ def build_models_with_elif_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_else_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_else_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -213,7 +219,9 @@ def build_models_with_else_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_except_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_except_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -227,7 +235,7 @@ def build_models_with_except_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_exec_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_exec_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -241,7 +249,9 @@ def build_models_with_exec_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_finally_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_finally_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -255,7 +265,7 @@ def build_models_with_finally_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_for_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_for_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -269,7 +279,7 @@ def build_models_with_for_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_from_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_from_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -283,7 +293,9 @@ def build_models_with_from_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_global_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_global_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -297,7 +309,7 @@ def build_models_with_global_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_if_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_if_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -311,7 +323,9 @@ def build_models_with_if_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_import_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_import_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -325,7 +339,7 @@ def build_models_with_import_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_in_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_in_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -339,7 +353,7 @@ def build_models_with_in_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_is_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_is_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -353,7 +367,9 @@ def build_models_with_is_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_lambda_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_lambda_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -367,7 +383,7 @@ def build_models_with_lambda_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_not_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_not_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -381,7 +397,7 @@ def build_models_with_not_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_or_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_or_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -395,7 +411,7 @@ def build_models_with_or_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_pass_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_pass_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -409,7 +425,7 @@ def build_models_with_pass_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_raise_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_raise_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -423,7 +439,9 @@ def build_models_with_raise_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_return_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_return_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -437,7 +455,7 @@ def build_models_with_return_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_try_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_try_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -451,7 +469,7 @@ def build_models_with_try_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_while_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_while_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -465,7 +483,7 @@ def build_models_with_while_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_with_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_with_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -479,7 +497,7 @@ def build_models_with_with_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_with_yield_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_models_with_yield_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -493,14 +511,14 @@ def build_models_with_yield_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class ModelsOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientModelsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`models` attribute. + :attr:`special_words_client_models` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -584,7 +602,7 @@ def with_and( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_and_request( + _request = build_special_words_client_models_with_and_request( content_type=content_type, content=_content, headers=_headers, @@ -681,7 +699,7 @@ def with_as( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_as_request( + _request = build_special_words_client_models_with_as_request( content_type=content_type, content=_content, headers=_headers, @@ -778,7 +796,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_assert_request( + _request = build_special_words_client_models_with_assert_request( content_type=content_type, content=_content, headers=_headers, @@ -875,7 +893,7 @@ def with_async( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_async_request( + _request = build_special_words_client_models_with_async_request( content_type=content_type, content=_content, headers=_headers, @@ -972,7 +990,7 @@ def with_await( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_await_request( + _request = build_special_words_client_models_with_await_request( content_type=content_type, content=_content, headers=_headers, @@ -1069,7 +1087,7 @@ def with_break( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_break_request( + _request = build_special_words_client_models_with_break_request( content_type=content_type, content=_content, headers=_headers, @@ -1166,7 +1184,7 @@ def with_class( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_class_request( + _request = build_special_words_client_models_with_class_request( content_type=content_type, content=_content, headers=_headers, @@ -1265,7 +1283,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_constructor_request( + _request = build_special_words_client_models_with_constructor_request( content_type=content_type, content=_content, headers=_headers, @@ -1364,7 +1382,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_continue_request( + _request = build_special_words_client_models_with_continue_request( content_type=content_type, content=_content, headers=_headers, @@ -1461,7 +1479,7 @@ def with_def( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_def_request( + _request = build_special_words_client_models_with_def_request( content_type=content_type, content=_content, headers=_headers, @@ -1558,7 +1576,7 @@ def with_del( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_del_request( + _request = build_special_words_client_models_with_del_request( content_type=content_type, content=_content, headers=_headers, @@ -1655,7 +1673,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_elif_request( + _request = build_special_words_client_models_with_elif_request( content_type=content_type, content=_content, headers=_headers, @@ -1752,7 +1770,7 @@ def with_else( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_else_request( + _request = build_special_words_client_models_with_else_request( content_type=content_type, content=_content, headers=_headers, @@ -1849,7 +1867,7 @@ def with_except( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_except_request( + _request = build_special_words_client_models_with_except_request( content_type=content_type, content=_content, headers=_headers, @@ -1946,7 +1964,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_exec_request( + _request = build_special_words_client_models_with_exec_request( content_type=content_type, content=_content, headers=_headers, @@ -2045,7 +2063,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_finally_request( + _request = build_special_words_client_models_with_finally_request( content_type=content_type, content=_content, headers=_headers, @@ -2142,7 +2160,7 @@ def with_for( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_for_request( + _request = build_special_words_client_models_with_for_request( content_type=content_type, content=_content, headers=_headers, @@ -2239,7 +2257,7 @@ def with_from( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_from_request( + _request = build_special_words_client_models_with_from_request( content_type=content_type, content=_content, headers=_headers, @@ -2336,7 +2354,7 @@ def with_global( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_global_request( + _request = build_special_words_client_models_with_global_request( content_type=content_type, content=_content, headers=_headers, @@ -2433,7 +2451,7 @@ def with_if( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_if_request( + _request = build_special_words_client_models_with_if_request( content_type=content_type, content=_content, headers=_headers, @@ -2530,7 +2548,7 @@ def with_import( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_import_request( + _request = build_special_words_client_models_with_import_request( content_type=content_type, content=_content, headers=_headers, @@ -2627,7 +2645,7 @@ def with_in( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_in_request( + _request = build_special_words_client_models_with_in_request( content_type=content_type, content=_content, headers=_headers, @@ -2724,7 +2742,7 @@ def with_is( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_is_request( + _request = build_special_words_client_models_with_is_request( content_type=content_type, content=_content, headers=_headers, @@ -2821,7 +2839,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_lambda_request( + _request = build_special_words_client_models_with_lambda_request( content_type=content_type, content=_content, headers=_headers, @@ -2918,7 +2936,7 @@ def with_not( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_not_request( + _request = build_special_words_client_models_with_not_request( content_type=content_type, content=_content, headers=_headers, @@ -3015,7 +3033,7 @@ def with_or( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_or_request( + _request = build_special_words_client_models_with_or_request( content_type=content_type, content=_content, headers=_headers, @@ -3112,7 +3130,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_pass_request( + _request = build_special_words_client_models_with_pass_request( content_type=content_type, content=_content, headers=_headers, @@ -3209,7 +3227,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_raise_request( + _request = build_special_words_client_models_with_raise_request( content_type=content_type, content=_content, headers=_headers, @@ -3306,7 +3324,7 @@ def with_return( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_return_request( + _request = build_special_words_client_models_with_return_request( content_type=content_type, content=_content, headers=_headers, @@ -3403,7 +3421,7 @@ def with_try( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_try_request( + _request = build_special_words_client_models_with_try_request( content_type=content_type, content=_content, headers=_headers, @@ -3500,7 +3518,7 @@ def with_while( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_while_request( + _request = build_special_words_client_models_with_while_request( content_type=content_type, content=_content, headers=_headers, @@ -3597,7 +3615,7 @@ def with_with( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_with_request( + _request = build_special_words_client_models_with_with_request( content_type=content_type, content=_content, headers=_headers, @@ -3694,7 +3712,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_with_yield_request( + _request = build_special_words_client_models_with_yield_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/__init__.py index e9144ea8af..40d285d847 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Operations # type: ignore -from ._operations import ParametersOperations # type: ignore +from ._operations import SpecialWordsClientOperationsOperations # type: ignore +from ._operations import SpecialWordsClientParametersOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Operations", - "ParametersOperations", + "SpecialWordsClientOperationsOperations", + "SpecialWordsClientParametersOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py index 234949807c..2f9dfba785 100644 --- a/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/special-words/specialwords/operations/_operations.py @@ -26,238 +26,306 @@ _SERIALIZER.client_side_validation = False -def build_operations_and_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_and_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/and" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_as_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_as_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/as" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_assert_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_assert_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/assert" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_async_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_async_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/async" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_await_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_await_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/await" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_break_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_break_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/break" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_class_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_class_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/class" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_constructor_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_constructor_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/constructor" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_continue_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_continue_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/continue" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_def_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_def_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/def" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_del_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_del_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/del" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_elif_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_elif_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/elif" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_else_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_else_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/else" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_except_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_except_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/except" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_exec_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_exec_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/exec" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_finally_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_finally_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/finally" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_for_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_for_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/for" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_from_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_from_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/from" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_global_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_global_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/global" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_if_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_if_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/if" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_import_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_import_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/import" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_in_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_in_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/in" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_is_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_is_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/is" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_lambda_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_lambda_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/lambda" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_not_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_not_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/not" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_or_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_or_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/or" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_pass_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_pass_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/pass" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_raise_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_raise_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/raise" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_return_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_return_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/return" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_try_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_try_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/try" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_while_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_while_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/while" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_with_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_with_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/with" return HttpRequest(method="GET", url=_url, **kwargs) -def build_operations_yield_method_request(**kwargs: Any) -> HttpRequest: +def build_special_words_client_operations_yield_method_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/special-words/operations/yield" return HttpRequest(method="GET", url=_url, **kwargs) -def build_parameters_with_and_request(*, and_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_and_request( # pylint: disable=name-too-long + *, and_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -269,7 +337,9 @@ def build_parameters_with_and_request(*, and_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_as_request(*, as_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_as_request( # pylint: disable=name-too-long + *, as_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -281,7 +351,9 @@ def build_parameters_with_as_request(*, as_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_assert_request(*, assert_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_assert_request( # pylint: disable=name-too-long + *, assert_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -293,7 +365,9 @@ def build_parameters_with_assert_request(*, assert_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_async_request(*, async_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_async_request( # pylint: disable=name-too-long + *, async_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -305,7 +379,9 @@ def build_parameters_with_async_request(*, async_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_await_request(*, await_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_await_request( # pylint: disable=name-too-long + *, await_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -317,7 +393,9 @@ def build_parameters_with_await_request(*, await_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_break_request(*, break_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_break_request( # pylint: disable=name-too-long + *, break_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -329,7 +407,9 @@ def build_parameters_with_break_request(*, break_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_class_request(*, class_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_class_request( # pylint: disable=name-too-long + *, class_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -341,7 +421,7 @@ def build_parameters_with_class_request(*, class_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_constructor_request( # pylint: disable=name-too-long +def build_special_words_client_parameters_with_constructor_request( # pylint: disable=name-too-long *, constructor: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -355,7 +435,9 @@ def build_parameters_with_constructor_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_continue_request(*, continue_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_continue_request( # pylint: disable=name-too-long + *, continue_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -367,7 +449,9 @@ def build_parameters_with_continue_request(*, continue_parameter: str, **kwargs: return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_def_request(*, def_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_def_request( # pylint: disable=name-too-long + *, def_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -379,7 +463,9 @@ def build_parameters_with_def_request(*, def_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_del_request(*, del_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_del_request( # pylint: disable=name-too-long + *, del_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -391,7 +477,9 @@ def build_parameters_with_del_request(*, del_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_elif_request(*, elif_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_elif_request( # pylint: disable=name-too-long + *, elif_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -403,7 +491,9 @@ def build_parameters_with_elif_request(*, elif_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_else_request(*, else_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_else_request( # pylint: disable=name-too-long + *, else_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -415,7 +505,9 @@ def build_parameters_with_else_request(*, else_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_except_request(*, except_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_except_request( # pylint: disable=name-too-long + *, except_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -427,7 +519,9 @@ def build_parameters_with_except_request(*, except_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_exec_request(*, exec_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_exec_request( # pylint: disable=name-too-long + *, exec_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -439,7 +533,9 @@ def build_parameters_with_exec_request(*, exec_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_finally_request(*, finally_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_finally_request( # pylint: disable=name-too-long + *, finally_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -451,7 +547,9 @@ def build_parameters_with_finally_request(*, finally_parameter: str, **kwargs: A return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_for_request(*, for_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_for_request( # pylint: disable=name-too-long + *, for_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -463,7 +561,9 @@ def build_parameters_with_for_request(*, for_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_from_request(*, from_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_from_request( # pylint: disable=name-too-long + *, from_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -475,7 +575,9 @@ def build_parameters_with_from_request(*, from_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_global_request(*, global_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_global_request( # pylint: disable=name-too-long + *, global_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -487,7 +589,9 @@ def build_parameters_with_global_request(*, global_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_if_request(*, if_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_if_request( # pylint: disable=name-too-long + *, if_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -499,7 +603,9 @@ def build_parameters_with_if_request(*, if_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_import_request(*, import_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_import_request( # pylint: disable=name-too-long + *, import_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -511,7 +617,9 @@ def build_parameters_with_import_request(*, import_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_in_request(*, in_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_in_request( # pylint: disable=name-too-long + *, in_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -523,7 +631,9 @@ def build_parameters_with_in_request(*, in_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_is_request(*, is_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_is_request( # pylint: disable=name-too-long + *, is_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -535,7 +645,9 @@ def build_parameters_with_is_request(*, is_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_lambda_request(*, lambda_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_lambda_request( # pylint: disable=name-too-long + *, lambda_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -547,7 +659,9 @@ def build_parameters_with_lambda_request(*, lambda_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_not_request(*, not_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_not_request( # pylint: disable=name-too-long + *, not_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -559,7 +673,9 @@ def build_parameters_with_not_request(*, not_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_or_request(*, or_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_or_request( # pylint: disable=name-too-long + *, or_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -571,7 +687,9 @@ def build_parameters_with_or_request(*, or_parameter: str, **kwargs: Any) -> Htt return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_pass_request(*, pass_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_pass_request( # pylint: disable=name-too-long + *, pass_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -583,7 +701,9 @@ def build_parameters_with_pass_request(*, pass_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_raise_request(*, raise_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_raise_request( # pylint: disable=name-too-long + *, raise_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -595,7 +715,9 @@ def build_parameters_with_raise_request(*, raise_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_return_request(*, return_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_return_request( # pylint: disable=name-too-long + *, return_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -607,7 +729,9 @@ def build_parameters_with_return_request(*, return_parameter: str, **kwargs: Any return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_try_request(*, try_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_try_request( # pylint: disable=name-too-long + *, try_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -619,7 +743,9 @@ def build_parameters_with_try_request(*, try_parameter: str, **kwargs: Any) -> H return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_while_request(*, while_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_while_request( # pylint: disable=name-too-long + *, while_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -631,7 +757,9 @@ def build_parameters_with_while_request(*, while_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_with_request(*, with_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_with_request( # pylint: disable=name-too-long + *, with_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -643,7 +771,9 @@ def build_parameters_with_with_request(*, with_parameter: str, **kwargs: Any) -> return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_yield_request(*, yield_parameter: str, **kwargs: Any) -> HttpRequest: +def build_special_words_client_parameters_with_yield_request( # pylint: disable=name-too-long + *, yield_parameter: str, **kwargs: Any +) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) # Construct URL @@ -655,7 +785,7 @@ def build_parameters_with_yield_request(*, yield_parameter: str, **kwargs: Any) return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_parameters_with_cancellation_token_request( # pylint: disable=name-too-long +def build_special_words_client_parameters_with_cancellation_token_request( # pylint: disable=name-too-long *, cancellation_token: str, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -669,14 +799,14 @@ def build_parameters_with_cancellation_token_request( # pylint: disable=name-to return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -class Operations: # pylint: disable=too-many-public-methods +class SpecialWordsClientOperationsOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`operations` attribute. + :attr:`special_words_client_operations` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -706,7 +836,7 @@ def and_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_and_method_request( + _request = build_special_words_client_operations_and_method_request( headers=_headers, params=_params, ) @@ -747,7 +877,7 @@ def as_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_as_method_request( + _request = build_special_words_client_operations_as_method_request( headers=_headers, params=_params, ) @@ -788,7 +918,7 @@ def assert_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_assert_method_request( + _request = build_special_words_client_operations_assert_method_request( headers=_headers, params=_params, ) @@ -829,7 +959,7 @@ def async_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_async_method_request( + _request = build_special_words_client_operations_async_method_request( headers=_headers, params=_params, ) @@ -870,7 +1000,7 @@ def await_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_await_method_request( + _request = build_special_words_client_operations_await_method_request( headers=_headers, params=_params, ) @@ -911,7 +1041,7 @@ def break_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_break_method_request( + _request = build_special_words_client_operations_break_method_request( headers=_headers, params=_params, ) @@ -952,7 +1082,7 @@ def class_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_class_method_request( + _request = build_special_words_client_operations_class_method_request( headers=_headers, params=_params, ) @@ -993,7 +1123,7 @@ def constructor(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_constructor_request( + _request = build_special_words_client_operations_constructor_request( headers=_headers, params=_params, ) @@ -1034,7 +1164,7 @@ def continue_method(self, **kwargs: Any) -> None: # pylint: disable=inconsisten cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_continue_method_request( + _request = build_special_words_client_operations_continue_method_request( headers=_headers, params=_params, ) @@ -1075,7 +1205,7 @@ def def_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_def_method_request( + _request = build_special_words_client_operations_def_method_request( headers=_headers, params=_params, ) @@ -1116,7 +1246,7 @@ def del_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_del_method_request( + _request = build_special_words_client_operations_del_method_request( headers=_headers, params=_params, ) @@ -1157,7 +1287,7 @@ def elif_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_elif_method_request( + _request = build_special_words_client_operations_elif_method_request( headers=_headers, params=_params, ) @@ -1198,7 +1328,7 @@ def else_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_else_method_request( + _request = build_special_words_client_operations_else_method_request( headers=_headers, params=_params, ) @@ -1239,7 +1369,7 @@ def except_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_except_method_request( + _request = build_special_words_client_operations_except_method_request( headers=_headers, params=_params, ) @@ -1280,7 +1410,7 @@ def exec_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_exec_method_request( + _request = build_special_words_client_operations_exec_method_request( headers=_headers, params=_params, ) @@ -1321,7 +1451,7 @@ def finally_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_finally_method_request( + _request = build_special_words_client_operations_finally_method_request( headers=_headers, params=_params, ) @@ -1362,7 +1492,7 @@ def for_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_for_method_request( + _request = build_special_words_client_operations_for_method_request( headers=_headers, params=_params, ) @@ -1403,7 +1533,7 @@ def from_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_from_method_request( + _request = build_special_words_client_operations_from_method_request( headers=_headers, params=_params, ) @@ -1444,7 +1574,7 @@ def global_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_global_method_request( + _request = build_special_words_client_operations_global_method_request( headers=_headers, params=_params, ) @@ -1485,7 +1615,7 @@ def if_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_if_method_request( + _request = build_special_words_client_operations_if_method_request( headers=_headers, params=_params, ) @@ -1526,7 +1656,7 @@ def import_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_import_method_request( + _request = build_special_words_client_operations_import_method_request( headers=_headers, params=_params, ) @@ -1567,7 +1697,7 @@ def in_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_in_method_request( + _request = build_special_words_client_operations_in_method_request( headers=_headers, params=_params, ) @@ -1608,7 +1738,7 @@ def is_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_is_method_request( + _request = build_special_words_client_operations_is_method_request( headers=_headers, params=_params, ) @@ -1649,7 +1779,7 @@ def lambda_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_lambda_method_request( + _request = build_special_words_client_operations_lambda_method_request( headers=_headers, params=_params, ) @@ -1690,7 +1820,7 @@ def not_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_not_method_request( + _request = build_special_words_client_operations_not_method_request( headers=_headers, params=_params, ) @@ -1731,7 +1861,7 @@ def or_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_or_method_request( + _request = build_special_words_client_operations_or_method_request( headers=_headers, params=_params, ) @@ -1772,7 +1902,7 @@ def pass_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_pass_method_request( + _request = build_special_words_client_operations_pass_method_request( headers=_headers, params=_params, ) @@ -1813,7 +1943,7 @@ def raise_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_raise_method_request( + _request = build_special_words_client_operations_raise_method_request( headers=_headers, params=_params, ) @@ -1854,7 +1984,7 @@ def return_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent- cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_return_method_request( + _request = build_special_words_client_operations_return_method_request( headers=_headers, params=_params, ) @@ -1895,7 +2025,7 @@ def try_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_try_method_request( + _request = build_special_words_client_operations_try_method_request( headers=_headers, params=_params, ) @@ -1936,7 +2066,7 @@ def while_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_while_method_request( + _request = build_special_words_client_operations_while_method_request( headers=_headers, params=_params, ) @@ -1977,7 +2107,7 @@ def with_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_with_method_request( + _request = build_special_words_client_operations_with_method_request( headers=_headers, params=_params, ) @@ -2018,7 +2148,7 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_operations_yield_method_request( + _request = build_special_words_client_operations_yield_method_request( headers=_headers, params=_params, ) @@ -2040,14 +2170,14 @@ def yield_method(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r return cls(pipeline_response, None, {}) # type: ignore -class ParametersOperations: # pylint: disable=too-many-public-methods +class SpecialWordsClientParametersOperations: # pylint: disable=too-many-public-methods """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specialwords.SpecialWordsClient`'s - :attr:`parameters` attribute. + :attr:`special_words_client_parameters` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2079,7 +2209,7 @@ def with_and(self, *, and_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_and_request( + _request = build_special_words_client_parameters_with_and_request( and_parameter=and_parameter, headers=_headers, params=_params, @@ -2123,7 +2253,7 @@ def with_as(self, *, as_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_as_request( + _request = build_special_words_client_parameters_with_as_request( as_parameter=as_parameter, headers=_headers, params=_params, @@ -2169,7 +2299,7 @@ def with_assert( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_assert_request( + _request = build_special_words_client_parameters_with_assert_request( assert_parameter=assert_parameter, headers=_headers, params=_params, @@ -2215,7 +2345,7 @@ def with_async( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_async_request( + _request = build_special_words_client_parameters_with_async_request( async_parameter=async_parameter, headers=_headers, params=_params, @@ -2261,7 +2391,7 @@ def with_await( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_await_request( + _request = build_special_words_client_parameters_with_await_request( await_parameter=await_parameter, headers=_headers, params=_params, @@ -2307,7 +2437,7 @@ def with_break( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_break_request( + _request = build_special_words_client_parameters_with_break_request( break_parameter=break_parameter, headers=_headers, params=_params, @@ -2353,7 +2483,7 @@ def with_class( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_class_request( + _request = build_special_words_client_parameters_with_class_request( class_parameter=class_parameter, headers=_headers, params=_params, @@ -2399,7 +2529,7 @@ def with_constructor( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_constructor_request( + _request = build_special_words_client_parameters_with_constructor_request( constructor=constructor, headers=_headers, params=_params, @@ -2445,7 +2575,7 @@ def with_continue( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_continue_request( + _request = build_special_words_client_parameters_with_continue_request( continue_parameter=continue_parameter, headers=_headers, params=_params, @@ -2489,7 +2619,7 @@ def with_def(self, *, def_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_def_request( + _request = build_special_words_client_parameters_with_def_request( def_parameter=def_parameter, headers=_headers, params=_params, @@ -2533,7 +2663,7 @@ def with_del(self, *, del_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_del_request( + _request = build_special_words_client_parameters_with_del_request( del_parameter=del_parameter, headers=_headers, params=_params, @@ -2579,7 +2709,7 @@ def with_elif( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_elif_request( + _request = build_special_words_client_parameters_with_elif_request( elif_parameter=elif_parameter, headers=_headers, params=_params, @@ -2625,7 +2755,7 @@ def with_else( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_else_request( + _request = build_special_words_client_parameters_with_else_request( else_parameter=else_parameter, headers=_headers, params=_params, @@ -2671,7 +2801,7 @@ def with_except( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_except_request( + _request = build_special_words_client_parameters_with_except_request( except_parameter=except_parameter, headers=_headers, params=_params, @@ -2717,7 +2847,7 @@ def with_exec( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_exec_request( + _request = build_special_words_client_parameters_with_exec_request( exec_parameter=exec_parameter, headers=_headers, params=_params, @@ -2763,7 +2893,7 @@ def with_finally( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_finally_request( + _request = build_special_words_client_parameters_with_finally_request( finally_parameter=finally_parameter, headers=_headers, params=_params, @@ -2807,7 +2937,7 @@ def with_for(self, *, for_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_for_request( + _request = build_special_words_client_parameters_with_for_request( for_parameter=for_parameter, headers=_headers, params=_params, @@ -2853,7 +2983,7 @@ def with_from( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_from_request( + _request = build_special_words_client_parameters_with_from_request( from_parameter=from_parameter, headers=_headers, params=_params, @@ -2899,7 +3029,7 @@ def with_global( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_global_request( + _request = build_special_words_client_parameters_with_global_request( global_parameter=global_parameter, headers=_headers, params=_params, @@ -2943,7 +3073,7 @@ def with_if(self, *, if_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_if_request( + _request = build_special_words_client_parameters_with_if_request( if_parameter=if_parameter, headers=_headers, params=_params, @@ -2989,7 +3119,7 @@ def with_import( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_import_request( + _request = build_special_words_client_parameters_with_import_request( import_parameter=import_parameter, headers=_headers, params=_params, @@ -3033,7 +3163,7 @@ def with_in(self, *, in_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_in_request( + _request = build_special_words_client_parameters_with_in_request( in_parameter=in_parameter, headers=_headers, params=_params, @@ -3077,7 +3207,7 @@ def with_is(self, *, is_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_is_request( + _request = build_special_words_client_parameters_with_is_request( is_parameter=is_parameter, headers=_headers, params=_params, @@ -3123,7 +3253,7 @@ def with_lambda( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_lambda_request( + _request = build_special_words_client_parameters_with_lambda_request( lambda_parameter=lambda_parameter, headers=_headers, params=_params, @@ -3167,7 +3297,7 @@ def with_not(self, *, not_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_not_request( + _request = build_special_words_client_parameters_with_not_request( not_parameter=not_parameter, headers=_headers, params=_params, @@ -3211,7 +3341,7 @@ def with_or(self, *, or_parameter: str, **kwargs: Any) -> None: # pylint: disab cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_or_request( + _request = build_special_words_client_parameters_with_or_request( or_parameter=or_parameter, headers=_headers, params=_params, @@ -3257,7 +3387,7 @@ def with_pass( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_pass_request( + _request = build_special_words_client_parameters_with_pass_request( pass_parameter=pass_parameter, headers=_headers, params=_params, @@ -3303,7 +3433,7 @@ def with_raise( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_raise_request( + _request = build_special_words_client_parameters_with_raise_request( raise_parameter=raise_parameter, headers=_headers, params=_params, @@ -3349,7 +3479,7 @@ def with_return( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_return_request( + _request = build_special_words_client_parameters_with_return_request( return_parameter=return_parameter, headers=_headers, params=_params, @@ -3393,7 +3523,7 @@ def with_try(self, *, try_parameter: str, **kwargs: Any) -> None: # pylint: dis cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_try_request( + _request = build_special_words_client_parameters_with_try_request( try_parameter=try_parameter, headers=_headers, params=_params, @@ -3439,7 +3569,7 @@ def with_while( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_while_request( + _request = build_special_words_client_parameters_with_while_request( while_parameter=while_parameter, headers=_headers, params=_params, @@ -3485,7 +3615,7 @@ def with_with( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_with_request( + _request = build_special_words_client_parameters_with_with_request( with_parameter=with_parameter, headers=_headers, params=_params, @@ -3531,7 +3661,7 @@ def with_yield( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_yield_request( + _request = build_special_words_client_parameters_with_yield_request( yield_parameter=yield_parameter, headers=_headers, params=_params, @@ -3577,7 +3707,7 @@ def with_cancellation_token( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_parameters_with_cancellation_token_request( + _request = build_special_words_client_parameters_with_cancellation_token_request( cancellation_token=cancellation_token, headers=_headers, params=_params, diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/_client.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/_client.py index b1e72ea577..785eaa4655 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/_client.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/_client.py @@ -9,16 +9,19 @@ from ._configuration import DocumentationClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import ListsOperations, TextFormattingOperations +from .operations import DocumentationClientListsOperations, DocumentationClientTextFormattingOperations class DocumentationClient: # pylint: disable=client-accepts-api-version-keyword """Illustrates documentation generation and formatting features. - :ivar lists: ListsOperations operations - :vartype lists: specs.documentation.operations.ListsOperations - :ivar text_formatting: TextFormattingOperations operations - :vartype text_formatting: specs.documentation.operations.TextFormattingOperations + :ivar documentation_client_lists: DocumentationClientListsOperations operations + :vartype documentation_client_lists: + specs.documentation.operations.DocumentationClientListsOperations + :ivar documentation_client_text_formatting: DocumentationClientTextFormattingOperations + operations + :vartype documentation_client_text_formatting: + specs.documentation.operations.DocumentationClientTextFormattingOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -45,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.lists = ListsOperations(self._client, self._config, self._serialize, self._deserialize) - self.text_formatting = TextFormattingOperations(self._client, self._config, self._serialize, self._deserialize) + self.documentation_client_lists = DocumentationClientListsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.documentation_client_text_formatting = DocumentationClientTextFormattingOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/_client.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/_client.py index 3670430e95..e3d4daf749 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/_client.py @@ -9,16 +9,19 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DocumentationClientConfiguration -from .operations import ListsOperations, TextFormattingOperations +from .operations import DocumentationClientListsOperations, DocumentationClientTextFormattingOperations class DocumentationClient: # pylint: disable=client-accepts-api-version-keyword """Illustrates documentation generation and formatting features. - :ivar lists: ListsOperations operations - :vartype lists: specs.documentation.aio.operations.ListsOperations - :ivar text_formatting: TextFormattingOperations operations - :vartype text_formatting: specs.documentation.aio.operations.TextFormattingOperations + :ivar documentation_client_lists: DocumentationClientListsOperations operations + :vartype documentation_client_lists: + specs.documentation.aio.operations.DocumentationClientListsOperations + :ivar documentation_client_text_formatting: DocumentationClientTextFormattingOperations + operations + :vartype documentation_client_text_formatting: + specs.documentation.aio.operations.DocumentationClientTextFormattingOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -45,8 +48,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.lists = ListsOperations(self._client, self._config, self._serialize, self._deserialize) - self.text_formatting = TextFormattingOperations(self._client, self._config, self._serialize, self._deserialize) + self.documentation_client_lists = DocumentationClientListsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.documentation_client_text_formatting = DocumentationClientTextFormattingOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/__init__.py index 0005c6e03a..b7b748aaeb 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ListsOperations # type: ignore -from ._operations import TextFormattingOperations # type: ignore +from ._operations import DocumentationClientListsOperations # type: ignore +from ._operations import DocumentationClientTextFormattingOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ListsOperations", - "TextFormattingOperations", + "DocumentationClientListsOperations", + "DocumentationClientTextFormattingOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/_operations.py index f6bffb6bd7..9fa36c60df 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/aio/operations/_operations.py @@ -21,12 +21,12 @@ from ..._utils.model_base import SdkJSONEncoder from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_lists_bullet_points_model_request, - build_lists_bullet_points_op_request, - build_lists_numbered_request, - build_text_formatting_bold_text_request, - build_text_formatting_combined_formatting_request, - build_text_formatting_italic_text_request, + build_documentation_client_lists_bullet_points_model_request, + build_documentation_client_lists_bullet_points_op_request, + build_documentation_client_lists_numbered_request, + build_documentation_client_text_formatting_bold_text_request, + build_documentation_client_text_formatting_combined_formatting_request, + build_documentation_client_text_formatting_italic_text_request, ) from .._configuration import DocumentationClientConfiguration @@ -36,14 +36,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ListsOperations: +class DocumentationClientListsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.aio.DocumentationClient`'s - :attr:`lists` attribute. + :attr:`documentation_client_lists` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -89,7 +89,7 @@ async def bullet_points_op(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_bullet_points_op_request( + _request = build_documentation_client_lists_bullet_points_op_request( headers=_headers, params=_params, ) @@ -195,7 +195,7 @@ async def bullet_points_model( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lists_bullet_points_model_request( + _request = build_documentation_client_lists_bullet_points_model_request( content_type=content_type, content=_content, headers=_headers, @@ -243,7 +243,7 @@ async def numbered(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_numbered_request( + _request = build_documentation_client_lists_numbered_request( headers=_headers, params=_params, ) @@ -265,14 +265,14 @@ async def numbered(self, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class TextFormattingOperations: +class DocumentationClientTextFormattingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.aio.DocumentationClient`'s - :attr:`text_formatting` attribute. + :attr:`documentation_client_text_formatting` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -303,7 +303,7 @@ async def bold_text(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_bold_text_request( + _request = build_documentation_client_text_formatting_bold_text_request( headers=_headers, params=_params, ) @@ -345,7 +345,7 @@ async def italic_text(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_italic_text_request( + _request = build_documentation_client_text_formatting_italic_text_request( headers=_headers, params=_params, ) @@ -388,7 +388,7 @@ async def combined_formatting(self, **kwargs: Any) -> None: cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_combined_formatting_request( + _request = build_documentation_client_text_formatting_combined_formatting_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/__init__.py index 0005c6e03a..b7b748aaeb 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ListsOperations # type: ignore -from ._operations import TextFormattingOperations # type: ignore +from ._operations import DocumentationClientListsOperations # type: ignore +from ._operations import DocumentationClientTextFormattingOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ListsOperations", - "TextFormattingOperations", + "DocumentationClientListsOperations", + "DocumentationClientTextFormattingOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/_operations.py index a514afc00d..883a69f764 100644 --- a/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/specs-documentation/specs/documentation/operations/_operations.py @@ -31,14 +31,18 @@ _SERIALIZER.client_side_validation = False -def build_lists_bullet_points_op_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_bullet_points_op_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/lists/bullet-points/op" return HttpRequest(method="GET", url=_url, **kwargs) -def build_lists_bullet_points_model_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_bullet_points_model_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -52,42 +56,48 @@ def build_lists_bullet_points_model_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_lists_numbered_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_lists_numbered_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long # Construct URL _url = "/documentation/lists/numbered" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_bold_text_request(**kwargs: Any) -> HttpRequest: +def build_documentation_client_text_formatting_bold_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/bold" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_italic_text_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_documentation_client_text_formatting_italic_text_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/italic" return HttpRequest(method="GET", url=_url, **kwargs) -def build_text_formatting_combined_formatting_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_documentation_client_text_formatting_combined_formatting_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: # Construct URL _url = "/documentation/text-formatting/combined" return HttpRequest(method="GET", url=_url, **kwargs) -class ListsOperations: +class DocumentationClientListsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.DocumentationClient`'s - :attr:`lists` attribute. + :attr:`documentation_client_lists` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +143,7 @@ def bullet_points_op(self, **kwargs: Any) -> None: # pylint: disable=inconsiste cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_bullet_points_op_request( + _request = build_documentation_client_lists_bullet_points_op_request( headers=_headers, params=_params, ) @@ -237,7 +247,7 @@ def bullet_points_model( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_lists_bullet_points_model_request( + _request = build_documentation_client_lists_bullet_points_model_request( content_type=content_type, content=_content, headers=_headers, @@ -285,7 +295,7 @@ def numbered(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_lists_numbered_request( + _request = build_documentation_client_lists_numbered_request( headers=_headers, params=_params, ) @@ -307,14 +317,14 @@ def numbered(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur return cls(pipeline_response, None, {}) # type: ignore -class TextFormattingOperations: +class DocumentationClientTextFormattingOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~specs.documentation.DocumentationClient`'s - :attr:`text_formatting` attribute. + :attr:`documentation_client_text_formatting` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -345,7 +355,7 @@ def bold_text(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_bold_text_request( + _request = build_documentation_client_text_formatting_bold_text_request( headers=_headers, params=_params, ) @@ -387,7 +397,7 @@ def italic_text(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-re cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_italic_text_request( + _request = build_documentation_client_text_formatting_italic_text_request( headers=_headers, params=_params, ) @@ -430,7 +440,7 @@ def combined_formatting(self, **kwargs: Any) -> None: # pylint: disable=inconsi cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_text_formatting_combined_formatting_request( + _request = build_documentation_client_text_formatting_combined_formatting_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/_client.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/_client.py index feb3d65ac5..1ab79a4139 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/_client.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/_client.py @@ -9,14 +9,14 @@ from ._configuration import JsonlClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .basic.operations import BasicOperations +from .basic.operations import JsonlClientBasicOperations class JsonlClient: # pylint: disable=client-accepts-api-version-keyword """Test of jsonl streaming. - :ivar basic: BasicOperations operations - :vartype basic: streaming.jsonl.operations.BasicOperations + :ivar jsonl_client_basic: JsonlClientBasicOperations operations + :vartype jsonl_client_basic: streaming.jsonl.operations.JsonlClientBasicOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.basic = BasicOperations(self._client, self._config, self._serialize, self._deserialize) + self.jsonl_client_basic = JsonlClientBasicOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/aio/_client.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/aio/_client.py index f0123acbc4..ce6126a3ef 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/aio/_client.py @@ -8,15 +8,15 @@ from corehttp.runtime import AsyncPipelineClient, policies from .._utils.serialization import Deserializer, Serializer -from ..basic.aio.operations import BasicOperations +from ..basic.aio.operations import JsonlClientBasicOperations from ._configuration import JsonlClientConfiguration class JsonlClient: # pylint: disable=client-accepts-api-version-keyword """Test of jsonl streaming. - :ivar basic: BasicOperations operations - :vartype basic: streaming.jsonl.aio.operations.BasicOperations + :ivar jsonl_client_basic: JsonlClientBasicOperations operations + :vartype jsonl_client_basic: streaming.jsonl.aio.operations.JsonlClientBasicOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.basic = BasicOperations(self._client, self._config, self._serialize, self._deserialize) + self.jsonl_client_basic = JsonlClientBasicOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py index 9408ca230a..b60acb5f30 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BasicOperations # type: ignore +from ._operations import JsonlClientBasicOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BasicOperations", + "JsonlClientBasicOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py index 8a3d13c46c..f365875ee6 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/aio/operations/_operations.py @@ -19,20 +19,20 @@ from ...._utils.serialization import Deserializer, Serializer from ....aio._configuration import JsonlClientConfiguration -from ...operations._operations import build_basic_receive_request, build_basic_send_request +from ...operations._operations import build_jsonl_client_basic_receive_request, build_jsonl_client_basic_send_request T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BasicOperations: +class JsonlClientBasicOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~streaming.jsonl.aio.JsonlClient`'s - :attr:`basic` attribute. + :attr:`jsonl_client_basic` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -67,7 +67,7 @@ async def send(self, body: bytes, **kwargs: Any) -> None: _content = body - _request = build_basic_send_request( + _request = build_jsonl_client_basic_send_request( content_type=content_type, content=_content, headers=_headers, @@ -110,7 +110,7 @@ async def receive(self, **kwargs: Any) -> AsyncIterator[bytes]: cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_basic_receive_request( + _request = build_jsonl_client_basic_receive_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py index 9408ca230a..b60acb5f30 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BasicOperations # type: ignore +from ._operations import JsonlClientBasicOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BasicOperations", + "JsonlClientBasicOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py index 76770102ef..ce82fa73b9 100644 --- a/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/streaming-jsonl/streaming/jsonl/basic/operations/_operations.py @@ -27,7 +27,7 @@ _SERIALIZER.client_side_validation = False -def build_basic_send_request(**kwargs: Any) -> HttpRequest: +def build_jsonl_client_basic_send_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -40,7 +40,7 @@ def build_basic_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_basic_receive_request(**kwargs: Any) -> HttpRequest: +def build_jsonl_client_basic_receive_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/jsonl") @@ -54,14 +54,14 @@ def build_basic_receive_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -class BasicOperations: +class JsonlClientBasicOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~streaming.jsonl.JsonlClient`'s - :attr:`basic` attribute. + :attr:`jsonl_client_basic` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -96,7 +96,7 @@ def send(self, body: bytes, **kwargs: Any) -> None: # pylint: disable=inconsist _content = body - _request = build_basic_send_request( + _request = build_jsonl_client_basic_send_request( content_type=content_type, content=_content, headers=_headers, @@ -139,7 +139,7 @@ def receive(self, **kwargs: Any) -> Iterator[bytes]: cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_basic_receive_request( + _request = build_jsonl_client_basic_receive_request( headers=_headers, params=_params, ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_client.py index 08e71e15c1..412f173c6d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/_client.py @@ -10,54 +10,64 @@ from ._configuration import ArrayClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableBooleanValueOperations, - NullableFloatValueOperations, - NullableInt32ValueOperations, - NullableModelValueOperations, - NullableStringValueOperations, - StringValueOperations, - UnknownValueOperations, + ArrayClientBooleanValueOperations, + ArrayClientDatetimeValueOperations, + ArrayClientDurationValueOperations, + ArrayClientFloat32ValueOperations, + ArrayClientInt32ValueOperations, + ArrayClientInt64ValueOperations, + ArrayClientModelValueOperations, + ArrayClientNullableBooleanValueOperations, + ArrayClientNullableFloatValueOperations, + ArrayClientNullableInt32ValueOperations, + ArrayClientNullableModelValueOperations, + ArrayClientNullableStringValueOperations, + ArrayClientStringValueOperations, + ArrayClientUnknownValueOperations, ) class ArrayClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various types of arrays. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.array.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.array.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.array.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.array.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.array.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.array.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.array.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.array.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.array.operations.ModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.array.operations.NullableFloatValueOperations - :ivar nullable_int32_value: NullableInt32ValueOperations operations - :vartype nullable_int32_value: typetest.array.operations.NullableInt32ValueOperations - :ivar nullable_boolean_value: NullableBooleanValueOperations operations - :vartype nullable_boolean_value: typetest.array.operations.NullableBooleanValueOperations - :ivar nullable_string_value: NullableStringValueOperations operations - :vartype nullable_string_value: typetest.array.operations.NullableStringValueOperations - :ivar nullable_model_value: NullableModelValueOperations operations - :vartype nullable_model_value: typetest.array.operations.NullableModelValueOperations + :ivar array_client_int32_value: ArrayClientInt32ValueOperations operations + :vartype array_client_int32_value: typetest.array.operations.ArrayClientInt32ValueOperations + :ivar array_client_int64_value: ArrayClientInt64ValueOperations operations + :vartype array_client_int64_value: typetest.array.operations.ArrayClientInt64ValueOperations + :ivar array_client_boolean_value: ArrayClientBooleanValueOperations operations + :vartype array_client_boolean_value: + typetest.array.operations.ArrayClientBooleanValueOperations + :ivar array_client_string_value: ArrayClientStringValueOperations operations + :vartype array_client_string_value: typetest.array.operations.ArrayClientStringValueOperations + :ivar array_client_float32_value: ArrayClientFloat32ValueOperations operations + :vartype array_client_float32_value: + typetest.array.operations.ArrayClientFloat32ValueOperations + :ivar array_client_datetime_value: ArrayClientDatetimeValueOperations operations + :vartype array_client_datetime_value: + typetest.array.operations.ArrayClientDatetimeValueOperations + :ivar array_client_duration_value: ArrayClientDurationValueOperations operations + :vartype array_client_duration_value: + typetest.array.operations.ArrayClientDurationValueOperations + :ivar array_client_unknown_value: ArrayClientUnknownValueOperations operations + :vartype array_client_unknown_value: + typetest.array.operations.ArrayClientUnknownValueOperations + :ivar array_client_model_value: ArrayClientModelValueOperations operations + :vartype array_client_model_value: typetest.array.operations.ArrayClientModelValueOperations + :ivar array_client_nullable_float_value: ArrayClientNullableFloatValueOperations operations + :vartype array_client_nullable_float_value: + typetest.array.operations.ArrayClientNullableFloatValueOperations + :ivar array_client_nullable_int32_value: ArrayClientNullableInt32ValueOperations operations + :vartype array_client_nullable_int32_value: + typetest.array.operations.ArrayClientNullableInt32ValueOperations + :ivar array_client_nullable_boolean_value: ArrayClientNullableBooleanValueOperations operations + :vartype array_client_nullable_boolean_value: + typetest.array.operations.ArrayClientNullableBooleanValueOperations + :ivar array_client_nullable_string_value: ArrayClientNullableStringValueOperations operations + :vartype array_client_nullable_string_value: + typetest.array.operations.ArrayClientNullableStringValueOperations + :ivar array_client_nullable_model_value: ArrayClientNullableModelValueOperations operations + :vartype array_client_nullable_model_value: + typetest.array.operations.ArrayClientNullableModelValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -84,28 +94,46 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.nullable_float_value = NullableFloatValueOperations( + self.array_client_int32_value = ArrayClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_int32_value = NullableInt32ValueOperations( + self.array_client_int64_value = ArrayClientInt64ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_boolean_value = NullableBooleanValueOperations( + self.array_client_boolean_value = ArrayClientBooleanValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_string_value = NullableStringValueOperations( + self.array_client_string_value = ArrayClientStringValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_model_value = NullableModelValueOperations( + self.array_client_float32_value = ArrayClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_datetime_value = ArrayClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_duration_value = ArrayClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_unknown_value = ArrayClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_model_value = ArrayClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_float_value = ArrayClientNullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_int32_value = ArrayClientNullableInt32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_boolean_value = ArrayClientNullableBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_string_value = ArrayClientNullableStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_model_value = ArrayClientNullableModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/_client.py index 19c24fc645..00974158c8 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/_client.py @@ -10,54 +10,68 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ArrayClientConfiguration from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableBooleanValueOperations, - NullableFloatValueOperations, - NullableInt32ValueOperations, - NullableModelValueOperations, - NullableStringValueOperations, - StringValueOperations, - UnknownValueOperations, + ArrayClientBooleanValueOperations, + ArrayClientDatetimeValueOperations, + ArrayClientDurationValueOperations, + ArrayClientFloat32ValueOperations, + ArrayClientInt32ValueOperations, + ArrayClientInt64ValueOperations, + ArrayClientModelValueOperations, + ArrayClientNullableBooleanValueOperations, + ArrayClientNullableFloatValueOperations, + ArrayClientNullableInt32ValueOperations, + ArrayClientNullableModelValueOperations, + ArrayClientNullableStringValueOperations, + ArrayClientStringValueOperations, + ArrayClientUnknownValueOperations, ) class ArrayClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various types of arrays. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.array.aio.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.array.aio.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.array.aio.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.array.aio.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.array.aio.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.array.aio.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.array.aio.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.array.aio.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.array.aio.operations.ModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.array.aio.operations.NullableFloatValueOperations - :ivar nullable_int32_value: NullableInt32ValueOperations operations - :vartype nullable_int32_value: typetest.array.aio.operations.NullableInt32ValueOperations - :ivar nullable_boolean_value: NullableBooleanValueOperations operations - :vartype nullable_boolean_value: typetest.array.aio.operations.NullableBooleanValueOperations - :ivar nullable_string_value: NullableStringValueOperations operations - :vartype nullable_string_value: typetest.array.aio.operations.NullableStringValueOperations - :ivar nullable_model_value: NullableModelValueOperations operations - :vartype nullable_model_value: typetest.array.aio.operations.NullableModelValueOperations + :ivar array_client_int32_value: ArrayClientInt32ValueOperations operations + :vartype array_client_int32_value: + typetest.array.aio.operations.ArrayClientInt32ValueOperations + :ivar array_client_int64_value: ArrayClientInt64ValueOperations operations + :vartype array_client_int64_value: + typetest.array.aio.operations.ArrayClientInt64ValueOperations + :ivar array_client_boolean_value: ArrayClientBooleanValueOperations operations + :vartype array_client_boolean_value: + typetest.array.aio.operations.ArrayClientBooleanValueOperations + :ivar array_client_string_value: ArrayClientStringValueOperations operations + :vartype array_client_string_value: + typetest.array.aio.operations.ArrayClientStringValueOperations + :ivar array_client_float32_value: ArrayClientFloat32ValueOperations operations + :vartype array_client_float32_value: + typetest.array.aio.operations.ArrayClientFloat32ValueOperations + :ivar array_client_datetime_value: ArrayClientDatetimeValueOperations operations + :vartype array_client_datetime_value: + typetest.array.aio.operations.ArrayClientDatetimeValueOperations + :ivar array_client_duration_value: ArrayClientDurationValueOperations operations + :vartype array_client_duration_value: + typetest.array.aio.operations.ArrayClientDurationValueOperations + :ivar array_client_unknown_value: ArrayClientUnknownValueOperations operations + :vartype array_client_unknown_value: + typetest.array.aio.operations.ArrayClientUnknownValueOperations + :ivar array_client_model_value: ArrayClientModelValueOperations operations + :vartype array_client_model_value: + typetest.array.aio.operations.ArrayClientModelValueOperations + :ivar array_client_nullable_float_value: ArrayClientNullableFloatValueOperations operations + :vartype array_client_nullable_float_value: + typetest.array.aio.operations.ArrayClientNullableFloatValueOperations + :ivar array_client_nullable_int32_value: ArrayClientNullableInt32ValueOperations operations + :vartype array_client_nullable_int32_value: + typetest.array.aio.operations.ArrayClientNullableInt32ValueOperations + :ivar array_client_nullable_boolean_value: ArrayClientNullableBooleanValueOperations operations + :vartype array_client_nullable_boolean_value: + typetest.array.aio.operations.ArrayClientNullableBooleanValueOperations + :ivar array_client_nullable_string_value: ArrayClientNullableStringValueOperations operations + :vartype array_client_nullable_string_value: + typetest.array.aio.operations.ArrayClientNullableStringValueOperations + :ivar array_client_nullable_model_value: ArrayClientNullableModelValueOperations operations + :vartype array_client_nullable_model_value: + typetest.array.aio.operations.ArrayClientNullableModelValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -84,28 +98,46 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.nullable_float_value = NullableFloatValueOperations( + self.array_client_int32_value = ArrayClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_int32_value = NullableInt32ValueOperations( + self.array_client_int64_value = ArrayClientInt64ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_boolean_value = NullableBooleanValueOperations( + self.array_client_boolean_value = ArrayClientBooleanValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_string_value = NullableStringValueOperations( + self.array_client_string_value = ArrayClientStringValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_model_value = NullableModelValueOperations( + self.array_client_float32_value = ArrayClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_datetime_value = ArrayClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_duration_value = ArrayClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_unknown_value = ArrayClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_model_value = ArrayClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_float_value = ArrayClientNullableFloatValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_int32_value = ArrayClientNullableInt32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_boolean_value = ArrayClientNullableBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_string_value = ArrayClientNullableStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.array_client_nullable_model_value = ArrayClientNullableModelValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/__init__.py index cfe67f416e..1e8a5622d2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/__init__.py @@ -6,40 +6,40 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore -from ._operations import NullableInt32ValueOperations # type: ignore -from ._operations import NullableBooleanValueOperations # type: ignore -from ._operations import NullableStringValueOperations # type: ignore -from ._operations import NullableModelValueOperations # type: ignore +from ._operations import ArrayClientInt32ValueOperations # type: ignore +from ._operations import ArrayClientInt64ValueOperations # type: ignore +from ._operations import ArrayClientBooleanValueOperations # type: ignore +from ._operations import ArrayClientStringValueOperations # type: ignore +from ._operations import ArrayClientFloat32ValueOperations # type: ignore +from ._operations import ArrayClientDatetimeValueOperations # type: ignore +from ._operations import ArrayClientDurationValueOperations # type: ignore +from ._operations import ArrayClientUnknownValueOperations # type: ignore +from ._operations import ArrayClientModelValueOperations # type: ignore +from ._operations import ArrayClientNullableFloatValueOperations # type: ignore +from ._operations import ArrayClientNullableInt32ValueOperations # type: ignore +from ._operations import ArrayClientNullableBooleanValueOperations # type: ignore +from ._operations import ArrayClientNullableStringValueOperations # type: ignore +from ._operations import ArrayClientNullableModelValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "NullableFloatValueOperations", - "NullableInt32ValueOperations", - "NullableBooleanValueOperations", - "NullableStringValueOperations", - "NullableModelValueOperations", + "ArrayClientInt32ValueOperations", + "ArrayClientInt64ValueOperations", + "ArrayClientBooleanValueOperations", + "ArrayClientStringValueOperations", + "ArrayClientFloat32ValueOperations", + "ArrayClientDatetimeValueOperations", + "ArrayClientDurationValueOperations", + "ArrayClientUnknownValueOperations", + "ArrayClientModelValueOperations", + "ArrayClientNullableFloatValueOperations", + "ArrayClientNullableInt32ValueOperations", + "ArrayClientNullableBooleanValueOperations", + "ArrayClientNullableStringValueOperations", + "ArrayClientNullableModelValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py index 1f196444fb..77efa41bc5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/aio/operations/_operations.py @@ -25,34 +25,34 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_value_get_request, - build_boolean_value_put_request, - build_datetime_value_get_request, - build_datetime_value_put_request, - build_duration_value_get_request, - build_duration_value_put_request, - build_float32_value_get_request, - build_float32_value_put_request, - build_int32_value_get_request, - build_int32_value_put_request, - build_int64_value_get_request, - build_int64_value_put_request, - build_model_value_get_request, - build_model_value_put_request, - build_nullable_boolean_value_get_request, - build_nullable_boolean_value_put_request, - build_nullable_float_value_get_request, - build_nullable_float_value_put_request, - build_nullable_int32_value_get_request, - build_nullable_int32_value_put_request, - build_nullable_model_value_get_request, - build_nullable_model_value_put_request, - build_nullable_string_value_get_request, - build_nullable_string_value_put_request, - build_string_value_get_request, - build_string_value_put_request, - build_unknown_value_get_request, - build_unknown_value_put_request, + build_array_client_boolean_value_get_request, + build_array_client_boolean_value_put_request, + build_array_client_datetime_value_get_request, + build_array_client_datetime_value_put_request, + build_array_client_duration_value_get_request, + build_array_client_duration_value_put_request, + build_array_client_float32_value_get_request, + build_array_client_float32_value_put_request, + build_array_client_int32_value_get_request, + build_array_client_int32_value_put_request, + build_array_client_int64_value_get_request, + build_array_client_int64_value_put_request, + build_array_client_model_value_get_request, + build_array_client_model_value_put_request, + build_array_client_nullable_boolean_value_get_request, + build_array_client_nullable_boolean_value_put_request, + build_array_client_nullable_float_value_get_request, + build_array_client_nullable_float_value_put_request, + build_array_client_nullable_int32_value_get_request, + build_array_client_nullable_int32_value_put_request, + build_array_client_nullable_model_value_get_request, + build_array_client_nullable_model_value_put_request, + build_array_client_nullable_string_value_get_request, + build_array_client_nullable_string_value_put_request, + build_array_client_string_value_get_request, + build_array_client_string_value_put_request, + build_array_client_unknown_value_get_request, + build_array_client_unknown_value_put_request, ) from .._configuration import ArrayClientConfiguration @@ -61,14 +61,14 @@ JSON = MutableMapping[str, Any] -class Int32ValueOperations: +class ArrayClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`int32_value` attribute. + :attr:`array_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -98,7 +98,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_array_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -189,7 +189,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_array_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -213,14 +213,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class ArrayClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`int64_value` attribute. + :attr:`array_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -250,7 +250,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_array_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -341,7 +341,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_array_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -365,14 +365,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class ArrayClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`boolean_value` attribute. + :attr:`array_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -402,7 +402,7 @@ async def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_array_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -493,7 +493,7 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_array_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -517,14 +517,14 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class ArrayClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`string_value` attribute. + :attr:`array_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -554,7 +554,7 @@ async def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_array_client_string_value_get_request( headers=_headers, params=_params, ) @@ -645,7 +645,7 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_array_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -669,14 +669,14 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class ArrayClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`float32_value` attribute. + :attr:`array_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -706,7 +706,7 @@ async def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_array_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -797,7 +797,7 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_array_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -821,14 +821,14 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class ArrayClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`datetime_value` attribute. + :attr:`array_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -858,7 +858,7 @@ async def get(self, **kwargs: Any) -> list[datetime.datetime]: cls: ClsType[list[datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_array_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -951,7 +951,7 @@ async def put(self, body: Union[list[datetime.datetime], IO[bytes]], **kwargs: A else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_array_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -975,14 +975,14 @@ async def put(self, body: Union[list[datetime.datetime], IO[bytes]], **kwargs: A return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class ArrayClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`duration_value` attribute. + :attr:`array_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1012,7 +1012,7 @@ async def get(self, **kwargs: Any) -> list[datetime.timedelta]: cls: ClsType[list[datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_array_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1105,7 +1105,7 @@ async def put(self, body: Union[list[datetime.timedelta], IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_array_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1129,14 +1129,14 @@ async def put(self, body: Union[list[datetime.timedelta], IO[bytes]], **kwargs: return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class ArrayClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`unknown_value` attribute. + :attr:`array_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1166,7 +1166,7 @@ async def get(self, **kwargs: Any) -> list[Any]: cls: ClsType[list[Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_array_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1257,7 +1257,7 @@ async def put(self, body: Union[list[Any], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_array_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1281,14 +1281,14 @@ async def put(self, body: Union[list[Any], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class ArrayClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`model_value` attribute. + :attr:`array_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1318,7 +1318,7 @@ async def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_array_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1425,7 +1425,7 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_array_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1449,14 +1449,14 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class ArrayClientNullableFloatValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_float_value` attribute. + :attr:`array_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1486,7 +1486,7 @@ async def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_array_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -1577,7 +1577,7 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_array_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1601,14 +1601,14 @@ async def put(self, body: Union[list[float], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableInt32ValueOperations: +class ArrayClientNullableInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_int32_value` attribute. + :attr:`array_client_nullable_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1638,7 +1638,7 @@ async def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_nullable_int32_value_get_request( + _request = build_array_client_nullable_int32_value_get_request( headers=_headers, params=_params, ) @@ -1729,7 +1729,7 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_int32_value_put_request( + _request = build_array_client_nullable_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1753,14 +1753,14 @@ async def put(self, body: Union[list[int], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableBooleanValueOperations: +class ArrayClientNullableBooleanValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_boolean_value` attribute. + :attr:`array_client_nullable_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1790,7 +1790,7 @@ async def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_nullable_boolean_value_get_request( + _request = build_array_client_nullable_boolean_value_get_request( headers=_headers, params=_params, ) @@ -1881,7 +1881,7 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_boolean_value_put_request( + _request = build_array_client_nullable_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1905,14 +1905,14 @@ async def put(self, body: Union[list[bool], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableStringValueOperations: +class ArrayClientNullableStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_string_value` attribute. + :attr:`array_client_nullable_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1942,7 +1942,7 @@ async def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_nullable_string_value_get_request( + _request = build_array_client_nullable_string_value_get_request( headers=_headers, params=_params, ) @@ -2033,7 +2033,7 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_string_value_put_request( + _request = build_array_client_nullable_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2057,14 +2057,14 @@ async def put(self, body: Union[list[str], IO[bytes]], **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class NullableModelValueOperations: +class ArrayClientNullableModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.aio.ArrayClient`'s - :attr:`nullable_model_value` attribute. + :attr:`array_client_nullable_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2094,7 +2094,7 @@ async def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_nullable_model_value_get_request( + _request = build_array_client_nullable_model_value_get_request( headers=_headers, params=_params, ) @@ -2201,7 +2201,7 @@ async def put(self, body: Union[list[_models.InnerModel], list[JSON], IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_model_value_put_request( + _request = build_array_client_nullable_model_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/__init__.py index cfe67f416e..1e8a5622d2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/__init__.py @@ -6,40 +6,40 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore -from ._operations import NullableInt32ValueOperations # type: ignore -from ._operations import NullableBooleanValueOperations # type: ignore -from ._operations import NullableStringValueOperations # type: ignore -from ._operations import NullableModelValueOperations # type: ignore +from ._operations import ArrayClientInt32ValueOperations # type: ignore +from ._operations import ArrayClientInt64ValueOperations # type: ignore +from ._operations import ArrayClientBooleanValueOperations # type: ignore +from ._operations import ArrayClientStringValueOperations # type: ignore +from ._operations import ArrayClientFloat32ValueOperations # type: ignore +from ._operations import ArrayClientDatetimeValueOperations # type: ignore +from ._operations import ArrayClientDurationValueOperations # type: ignore +from ._operations import ArrayClientUnknownValueOperations # type: ignore +from ._operations import ArrayClientModelValueOperations # type: ignore +from ._operations import ArrayClientNullableFloatValueOperations # type: ignore +from ._operations import ArrayClientNullableInt32ValueOperations # type: ignore +from ._operations import ArrayClientNullableBooleanValueOperations # type: ignore +from ._operations import ArrayClientNullableStringValueOperations # type: ignore +from ._operations import ArrayClientNullableModelValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "NullableFloatValueOperations", - "NullableInt32ValueOperations", - "NullableBooleanValueOperations", - "NullableStringValueOperations", - "NullableModelValueOperations", + "ArrayClientInt32ValueOperations", + "ArrayClientInt64ValueOperations", + "ArrayClientBooleanValueOperations", + "ArrayClientStringValueOperations", + "ArrayClientFloat32ValueOperations", + "ArrayClientDatetimeValueOperations", + "ArrayClientDurationValueOperations", + "ArrayClientUnknownValueOperations", + "ArrayClientModelValueOperations", + "ArrayClientNullableFloatValueOperations", + "ArrayClientNullableInt32ValueOperations", + "ArrayClientNullableBooleanValueOperations", + "ArrayClientNullableStringValueOperations", + "ArrayClientNullableModelValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py index 4e8d0985ab..7e1db9cf83 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-array/typetest/array/operations/_operations.py @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -48,7 +48,7 @@ def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -62,7 +62,7 @@ def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int64_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -76,7 +76,7 @@ def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_int64_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +90,7 @@ def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_boolean_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -104,7 +104,7 @@ def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_boolean_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -118,7 +118,7 @@ def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -132,7 +132,7 @@ def build_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -146,7 +146,7 @@ def build_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_float32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -160,7 +160,7 @@ def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_float32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -174,7 +174,7 @@ def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -188,7 +188,7 @@ def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -202,7 +202,7 @@ def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_duration_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -216,7 +216,7 @@ def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_duration_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -230,7 +230,7 @@ def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_unknown_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -244,7 +244,7 @@ def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_unknown_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -258,7 +258,7 @@ def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -272,7 +272,7 @@ def build_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -286,7 +286,7 @@ def build_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -300,7 +300,7 @@ def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -314,7 +314,7 @@ def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -328,7 +328,7 @@ def build_nullable_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -342,7 +342,9 @@ def build_nullable_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_boolean_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -356,7 +358,9 @@ def build_nullable_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_boolean_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -370,7 +374,7 @@ def build_nullable_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -384,7 +388,7 @@ def build_nullable_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -398,7 +402,7 @@ def build_nullable_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -412,7 +416,7 @@ def build_nullable_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_array_client_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -426,14 +430,14 @@ def build_nullable_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class Int32ValueOperations: +class ArrayClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`int32_value` attribute. + :attr:`array_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -463,7 +467,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_array_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -556,7 +560,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_array_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -580,14 +584,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class ArrayClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`int64_value` attribute. + :attr:`array_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -617,7 +621,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_array_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -710,7 +714,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_array_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -734,14 +738,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class ArrayClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`boolean_value` attribute. + :attr:`array_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -771,7 +775,7 @@ def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_array_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -864,7 +868,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_array_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -888,14 +892,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class ArrayClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`string_value` attribute. + :attr:`array_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -925,7 +929,7 @@ def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_array_client_string_value_get_request( headers=_headers, params=_params, ) @@ -1018,7 +1022,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_array_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1042,14 +1046,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class ArrayClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`float32_value` attribute. + :attr:`array_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1079,7 +1083,7 @@ def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_array_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -1172,7 +1176,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_array_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1196,14 +1200,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class ArrayClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`datetime_value` attribute. + :attr:`array_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1233,7 +1237,7 @@ def get(self, **kwargs: Any) -> list[datetime.datetime]: cls: ClsType[list[datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_array_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -1326,7 +1330,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_array_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1350,14 +1354,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class ArrayClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`duration_value` attribute. + :attr:`array_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1387,7 +1391,7 @@ def get(self, **kwargs: Any) -> list[datetime.timedelta]: cls: ClsType[list[datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_array_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1480,7 +1484,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_array_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1504,14 +1508,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class ArrayClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`unknown_value` attribute. + :attr:`array_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1541,7 +1545,7 @@ def get(self, **kwargs: Any) -> list[Any]: cls: ClsType[list[Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_array_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1634,7 +1638,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_array_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1658,14 +1662,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class ArrayClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`model_value` attribute. + :attr:`array_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1695,7 +1699,7 @@ def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_array_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1802,7 +1806,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_array_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1826,14 +1830,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class ArrayClientNullableFloatValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_float_value` attribute. + :attr:`array_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1863,7 +1867,7 @@ def get(self, **kwargs: Any) -> list[float]: cls: ClsType[list[float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_array_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -1956,7 +1960,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_array_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1980,14 +1984,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableInt32ValueOperations: +class ArrayClientNullableInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_int32_value` attribute. + :attr:`array_client_nullable_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2017,7 +2021,7 @@ def get(self, **kwargs: Any) -> list[int]: cls: ClsType[list[int]] = kwargs.pop("cls", None) - _request = build_nullable_int32_value_get_request( + _request = build_array_client_nullable_int32_value_get_request( headers=_headers, params=_params, ) @@ -2110,7 +2114,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_int32_value_put_request( + _request = build_array_client_nullable_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2134,14 +2138,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableBooleanValueOperations: +class ArrayClientNullableBooleanValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_boolean_value` attribute. + :attr:`array_client_nullable_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2171,7 +2175,7 @@ def get(self, **kwargs: Any) -> list[bool]: cls: ClsType[list[bool]] = kwargs.pop("cls", None) - _request = build_nullable_boolean_value_get_request( + _request = build_array_client_nullable_boolean_value_get_request( headers=_headers, params=_params, ) @@ -2264,7 +2268,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_boolean_value_put_request( + _request = build_array_client_nullable_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2288,14 +2292,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableStringValueOperations: +class ArrayClientNullableStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_string_value` attribute. + :attr:`array_client_nullable_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2325,7 +2329,7 @@ def get(self, **kwargs: Any) -> list[str]: cls: ClsType[list[str]] = kwargs.pop("cls", None) - _request = build_nullable_string_value_get_request( + _request = build_array_client_nullable_string_value_get_request( headers=_headers, params=_params, ) @@ -2418,7 +2422,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_string_value_put_request( + _request = build_array_client_nullable_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2442,14 +2446,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableModelValueOperations: +class ArrayClientNullableModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.array.ArrayClient`'s - :attr:`nullable_model_value` attribute. + :attr:`array_client_nullable_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2479,7 +2483,7 @@ def get(self, **kwargs: Any) -> list[_models.InnerModel]: cls: ClsType[list[_models.InnerModel]] = kwargs.pop("cls", None) - _request = build_nullable_model_value_get_request( + _request = build_array_client_nullable_model_value_get_request( headers=_headers, params=_params, ) @@ -2586,7 +2590,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_model_value_put_request( + _request = build_array_client_nullable_model_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_client.py index 5fad49ebd0..1f61e75ee1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/_client.py @@ -10,45 +10,58 @@ from ._configuration import DictionaryClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, + DictionaryClientBooleanValueOperations, + DictionaryClientDatetimeValueOperations, + DictionaryClientDurationValueOperations, + DictionaryClientFloat32ValueOperations, + DictionaryClientInt32ValueOperations, + DictionaryClientInt64ValueOperations, + DictionaryClientModelValueOperations, + DictionaryClientNullableFloatValueOperations, + DictionaryClientRecursiveModelValueOperations, + DictionaryClientStringValueOperations, + DictionaryClientUnknownValueOperations, ) class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various of dictionaries. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: typetest.dictionary.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.operations.NullableFloatValueOperations + :ivar dictionary_client_int32_value: DictionaryClientInt32ValueOperations operations + :vartype dictionary_client_int32_value: + typetest.dictionary.operations.DictionaryClientInt32ValueOperations + :ivar dictionary_client_int64_value: DictionaryClientInt64ValueOperations operations + :vartype dictionary_client_int64_value: + typetest.dictionary.operations.DictionaryClientInt64ValueOperations + :ivar dictionary_client_boolean_value: DictionaryClientBooleanValueOperations operations + :vartype dictionary_client_boolean_value: + typetest.dictionary.operations.DictionaryClientBooleanValueOperations + :ivar dictionary_client_string_value: DictionaryClientStringValueOperations operations + :vartype dictionary_client_string_value: + typetest.dictionary.operations.DictionaryClientStringValueOperations + :ivar dictionary_client_float32_value: DictionaryClientFloat32ValueOperations operations + :vartype dictionary_client_float32_value: + typetest.dictionary.operations.DictionaryClientFloat32ValueOperations + :ivar dictionary_client_datetime_value: DictionaryClientDatetimeValueOperations operations + :vartype dictionary_client_datetime_value: + typetest.dictionary.operations.DictionaryClientDatetimeValueOperations + :ivar dictionary_client_duration_value: DictionaryClientDurationValueOperations operations + :vartype dictionary_client_duration_value: + typetest.dictionary.operations.DictionaryClientDurationValueOperations + :ivar dictionary_client_unknown_value: DictionaryClientUnknownValueOperations operations + :vartype dictionary_client_unknown_value: + typetest.dictionary.operations.DictionaryClientUnknownValueOperations + :ivar dictionary_client_model_value: DictionaryClientModelValueOperations operations + :vartype dictionary_client_model_value: + typetest.dictionary.operations.DictionaryClientModelValueOperations + :ivar dictionary_client_recursive_model_value: DictionaryClientRecursiveModelValueOperations + operations + :vartype dictionary_client_recursive_model_value: + typetest.dictionary.operations.DictionaryClientRecursiveModelValueOperations + :ivar dictionary_client_nullable_float_value: DictionaryClientNullableFloatValueOperations + operations + :vartype dictionary_client_nullable_float_value: + typetest.dictionary.operations.DictionaryClientNullableFloatValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -75,19 +88,37 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( + self.dictionary_client_int32_value = DictionaryClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_float_value = NullableFloatValueOperations( + self.dictionary_client_int64_value = DictionaryClientInt64ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_boolean_value = DictionaryClientBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_string_value = DictionaryClientStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_float32_value = DictionaryClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_datetime_value = DictionaryClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_duration_value = DictionaryClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_unknown_value = DictionaryClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_model_value = DictionaryClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_recursive_model_value = DictionaryClientRecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_nullable_float_value = DictionaryClientNullableFloatValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_client.py index a01df3d4f6..ce2af2e492 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/_client.py @@ -10,46 +10,58 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DictionaryClientConfiguration from .operations import ( - BooleanValueOperations, - DatetimeValueOperations, - DurationValueOperations, - Float32ValueOperations, - Int32ValueOperations, - Int64ValueOperations, - ModelValueOperations, - NullableFloatValueOperations, - RecursiveModelValueOperations, - StringValueOperations, - UnknownValueOperations, + DictionaryClientBooleanValueOperations, + DictionaryClientDatetimeValueOperations, + DictionaryClientDurationValueOperations, + DictionaryClientFloat32ValueOperations, + DictionaryClientInt32ValueOperations, + DictionaryClientInt64ValueOperations, + DictionaryClientModelValueOperations, + DictionaryClientNullableFloatValueOperations, + DictionaryClientRecursiveModelValueOperations, + DictionaryClientStringValueOperations, + DictionaryClientUnknownValueOperations, ) class DictionaryClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various of dictionaries. - :ivar int32_value: Int32ValueOperations operations - :vartype int32_value: typetest.dictionary.aio.operations.Int32ValueOperations - :ivar int64_value: Int64ValueOperations operations - :vartype int64_value: typetest.dictionary.aio.operations.Int64ValueOperations - :ivar boolean_value: BooleanValueOperations operations - :vartype boolean_value: typetest.dictionary.aio.operations.BooleanValueOperations - :ivar string_value: StringValueOperations operations - :vartype string_value: typetest.dictionary.aio.operations.StringValueOperations - :ivar float32_value: Float32ValueOperations operations - :vartype float32_value: typetest.dictionary.aio.operations.Float32ValueOperations - :ivar datetime_value: DatetimeValueOperations operations - :vartype datetime_value: typetest.dictionary.aio.operations.DatetimeValueOperations - :ivar duration_value: DurationValueOperations operations - :vartype duration_value: typetest.dictionary.aio.operations.DurationValueOperations - :ivar unknown_value: UnknownValueOperations operations - :vartype unknown_value: typetest.dictionary.aio.operations.UnknownValueOperations - :ivar model_value: ModelValueOperations operations - :vartype model_value: typetest.dictionary.aio.operations.ModelValueOperations - :ivar recursive_model_value: RecursiveModelValueOperations operations - :vartype recursive_model_value: - typetest.dictionary.aio.operations.RecursiveModelValueOperations - :ivar nullable_float_value: NullableFloatValueOperations operations - :vartype nullable_float_value: typetest.dictionary.aio.operations.NullableFloatValueOperations + :ivar dictionary_client_int32_value: DictionaryClientInt32ValueOperations operations + :vartype dictionary_client_int32_value: + typetest.dictionary.aio.operations.DictionaryClientInt32ValueOperations + :ivar dictionary_client_int64_value: DictionaryClientInt64ValueOperations operations + :vartype dictionary_client_int64_value: + typetest.dictionary.aio.operations.DictionaryClientInt64ValueOperations + :ivar dictionary_client_boolean_value: DictionaryClientBooleanValueOperations operations + :vartype dictionary_client_boolean_value: + typetest.dictionary.aio.operations.DictionaryClientBooleanValueOperations + :ivar dictionary_client_string_value: DictionaryClientStringValueOperations operations + :vartype dictionary_client_string_value: + typetest.dictionary.aio.operations.DictionaryClientStringValueOperations + :ivar dictionary_client_float32_value: DictionaryClientFloat32ValueOperations operations + :vartype dictionary_client_float32_value: + typetest.dictionary.aio.operations.DictionaryClientFloat32ValueOperations + :ivar dictionary_client_datetime_value: DictionaryClientDatetimeValueOperations operations + :vartype dictionary_client_datetime_value: + typetest.dictionary.aio.operations.DictionaryClientDatetimeValueOperations + :ivar dictionary_client_duration_value: DictionaryClientDurationValueOperations operations + :vartype dictionary_client_duration_value: + typetest.dictionary.aio.operations.DictionaryClientDurationValueOperations + :ivar dictionary_client_unknown_value: DictionaryClientUnknownValueOperations operations + :vartype dictionary_client_unknown_value: + typetest.dictionary.aio.operations.DictionaryClientUnknownValueOperations + :ivar dictionary_client_model_value: DictionaryClientModelValueOperations operations + :vartype dictionary_client_model_value: + typetest.dictionary.aio.operations.DictionaryClientModelValueOperations + :ivar dictionary_client_recursive_model_value: DictionaryClientRecursiveModelValueOperations + operations + :vartype dictionary_client_recursive_model_value: + typetest.dictionary.aio.operations.DictionaryClientRecursiveModelValueOperations + :ivar dictionary_client_nullable_float_value: DictionaryClientNullableFloatValueOperations + operations + :vartype dictionary_client_nullable_float_value: + typetest.dictionary.aio.operations.DictionaryClientNullableFloatValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -76,19 +88,37 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.int32_value = Int32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.int64_value = Int64ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_value = BooleanValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_value = StringValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.float32_value = Float32ValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime_value = DatetimeValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration_value = DurationValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_value = UnknownValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.model_value = ModelValueOperations(self._client, self._config, self._serialize, self._deserialize) - self.recursive_model_value = RecursiveModelValueOperations( + self.dictionary_client_int32_value = DictionaryClientInt32ValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.nullable_float_value = NullableFloatValueOperations( + self.dictionary_client_int64_value = DictionaryClientInt64ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_boolean_value = DictionaryClientBooleanValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_string_value = DictionaryClientStringValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_float32_value = DictionaryClientFloat32ValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_datetime_value = DictionaryClientDatetimeValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_duration_value = DictionaryClientDurationValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_unknown_value = DictionaryClientUnknownValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_model_value = DictionaryClientModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_recursive_model_value = DictionaryClientRecursiveModelValueOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.dictionary_client_nullable_float_value = DictionaryClientNullableFloatValueOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py index 5200c73559..4b9c3f300b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/__init__.py @@ -6,34 +6,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore +from ._operations import DictionaryClientInt32ValueOperations # type: ignore +from ._operations import DictionaryClientInt64ValueOperations # type: ignore +from ._operations import DictionaryClientBooleanValueOperations # type: ignore +from ._operations import DictionaryClientStringValueOperations # type: ignore +from ._operations import DictionaryClientFloat32ValueOperations # type: ignore +from ._operations import DictionaryClientDatetimeValueOperations # type: ignore +from ._operations import DictionaryClientDurationValueOperations # type: ignore +from ._operations import DictionaryClientUnknownValueOperations # type: ignore +from ._operations import DictionaryClientModelValueOperations # type: ignore +from ._operations import DictionaryClientRecursiveModelValueOperations # type: ignore +from ._operations import DictionaryClientNullableFloatValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", + "DictionaryClientInt32ValueOperations", + "DictionaryClientInt64ValueOperations", + "DictionaryClientBooleanValueOperations", + "DictionaryClientStringValueOperations", + "DictionaryClientFloat32ValueOperations", + "DictionaryClientDatetimeValueOperations", + "DictionaryClientDurationValueOperations", + "DictionaryClientUnknownValueOperations", + "DictionaryClientModelValueOperations", + "DictionaryClientRecursiveModelValueOperations", + "DictionaryClientNullableFloatValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py index f38efcc856..554705321f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/aio/operations/_operations.py @@ -25,28 +25,28 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_value_get_request, - build_boolean_value_put_request, - build_datetime_value_get_request, - build_datetime_value_put_request, - build_duration_value_get_request, - build_duration_value_put_request, - build_float32_value_get_request, - build_float32_value_put_request, - build_int32_value_get_request, - build_int32_value_put_request, - build_int64_value_get_request, - build_int64_value_put_request, - build_model_value_get_request, - build_model_value_put_request, - build_nullable_float_value_get_request, - build_nullable_float_value_put_request, - build_recursive_model_value_get_request, - build_recursive_model_value_put_request, - build_string_value_get_request, - build_string_value_put_request, - build_unknown_value_get_request, - build_unknown_value_put_request, + build_dictionary_client_boolean_value_get_request, + build_dictionary_client_boolean_value_put_request, + build_dictionary_client_datetime_value_get_request, + build_dictionary_client_datetime_value_put_request, + build_dictionary_client_duration_value_get_request, + build_dictionary_client_duration_value_put_request, + build_dictionary_client_float32_value_get_request, + build_dictionary_client_float32_value_put_request, + build_dictionary_client_int32_value_get_request, + build_dictionary_client_int32_value_put_request, + build_dictionary_client_int64_value_get_request, + build_dictionary_client_int64_value_put_request, + build_dictionary_client_model_value_get_request, + build_dictionary_client_model_value_put_request, + build_dictionary_client_nullable_float_value_get_request, + build_dictionary_client_nullable_float_value_put_request, + build_dictionary_client_recursive_model_value_get_request, + build_dictionary_client_recursive_model_value_put_request, + build_dictionary_client_string_value_get_request, + build_dictionary_client_string_value_put_request, + build_dictionary_client_unknown_value_get_request, + build_dictionary_client_unknown_value_put_request, ) from .._configuration import DictionaryClientConfiguration @@ -55,14 +55,14 @@ JSON = MutableMapping[str, Any] -class Int32ValueOperations: +class DictionaryClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int32_value` attribute. + :attr:`dictionary_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -92,7 +92,7 @@ async def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_dictionary_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -183,7 +183,7 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_dictionary_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -207,14 +207,14 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class DictionaryClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`int64_value` attribute. + :attr:`dictionary_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -244,7 +244,7 @@ async def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_dictionary_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -335,7 +335,7 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_dictionary_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -359,14 +359,14 @@ async def put(self, body: Union[dict[str, int], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class DictionaryClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`boolean_value` attribute. + :attr:`dictionary_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -396,7 +396,7 @@ async def get(self, **kwargs: Any) -> dict[str, bool]: cls: ClsType[dict[str, bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_dictionary_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -487,7 +487,7 @@ async def put(self, body: Union[dict[str, bool], IO[bytes]], **kwargs: Any) -> N else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_dictionary_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -511,14 +511,14 @@ async def put(self, body: Union[dict[str, bool], IO[bytes]], **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class DictionaryClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`string_value` attribute. + :attr:`dictionary_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -548,7 +548,7 @@ async def get(self, **kwargs: Any) -> dict[str, str]: cls: ClsType[dict[str, str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_dictionary_client_string_value_get_request( headers=_headers, params=_params, ) @@ -639,7 +639,7 @@ async def put(self, body: Union[dict[str, str], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_dictionary_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -663,14 +663,14 @@ async def put(self, body: Union[dict[str, str], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class DictionaryClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`float32_value` attribute. + :attr:`dictionary_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -700,7 +700,7 @@ async def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_dictionary_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -791,7 +791,7 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_dictionary_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -815,14 +815,14 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class DictionaryClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`datetime_value` attribute. + :attr:`dictionary_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -852,7 +852,7 @@ async def get(self, **kwargs: Any) -> dict[str, datetime.datetime]: cls: ClsType[dict[str, datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_dictionary_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -945,7 +945,7 @@ async def put(self, body: Union[dict[str, datetime.datetime], IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_dictionary_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -969,14 +969,14 @@ async def put(self, body: Union[dict[str, datetime.datetime], IO[bytes]], **kwar return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class DictionaryClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`duration_value` attribute. + :attr:`dictionary_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1006,7 +1006,7 @@ async def get(self, **kwargs: Any) -> dict[str, datetime.timedelta]: cls: ClsType[dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_dictionary_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1099,7 +1099,7 @@ async def put(self, body: Union[dict[str, datetime.timedelta], IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_dictionary_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1123,14 +1123,14 @@ async def put(self, body: Union[dict[str, datetime.timedelta], IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class DictionaryClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`unknown_value` attribute. + :attr:`dictionary_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1160,7 +1160,7 @@ async def get(self, **kwargs: Any) -> dict[str, Any]: cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_dictionary_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1251,7 +1251,7 @@ async def put(self, body: Union[dict[str, Any], IO[bytes]], **kwargs: Any) -> No else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_dictionary_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1275,14 +1275,14 @@ async def put(self, body: Union[dict[str, Any], IO[bytes]], **kwargs: Any) -> No return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class DictionaryClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`model_value` attribute. + :attr:`dictionary_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1312,7 +1312,7 @@ async def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_dictionary_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1419,7 +1419,7 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_dictionary_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1443,14 +1443,14 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], return cls(pipeline_response, None, {}) # type: ignore -class RecursiveModelValueOperations: +class DictionaryClientRecursiveModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`recursive_model_value` attribute. + :attr:`dictionary_client_recursive_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1480,7 +1480,7 @@ async def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_recursive_model_value_get_request( + _request = build_dictionary_client_recursive_model_value_get_request( headers=_headers, params=_params, ) @@ -1587,7 +1587,7 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_recursive_model_value_put_request( + _request = build_dictionary_client_recursive_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1611,14 +1611,14 @@ async def put(self, body: Union[dict[str, _models.InnerModel], dict[str, JSON], return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class DictionaryClientNullableFloatValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.aio.DictionaryClient`'s - :attr:`nullable_float_value` attribute. + :attr:`dictionary_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1648,7 +1648,7 @@ async def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_dictionary_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -1739,7 +1739,7 @@ async def put(self, body: Union[dict[str, float], IO[bytes]], **kwargs: Any) -> else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_dictionary_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py index 5200c73559..4b9c3f300b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/__init__.py @@ -6,34 +6,34 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import Int32ValueOperations # type: ignore -from ._operations import Int64ValueOperations # type: ignore -from ._operations import BooleanValueOperations # type: ignore -from ._operations import StringValueOperations # type: ignore -from ._operations import Float32ValueOperations # type: ignore -from ._operations import DatetimeValueOperations # type: ignore -from ._operations import DurationValueOperations # type: ignore -from ._operations import UnknownValueOperations # type: ignore -from ._operations import ModelValueOperations # type: ignore -from ._operations import RecursiveModelValueOperations # type: ignore -from ._operations import NullableFloatValueOperations # type: ignore +from ._operations import DictionaryClientInt32ValueOperations # type: ignore +from ._operations import DictionaryClientInt64ValueOperations # type: ignore +from ._operations import DictionaryClientBooleanValueOperations # type: ignore +from ._operations import DictionaryClientStringValueOperations # type: ignore +from ._operations import DictionaryClientFloat32ValueOperations # type: ignore +from ._operations import DictionaryClientDatetimeValueOperations # type: ignore +from ._operations import DictionaryClientDurationValueOperations # type: ignore +from ._operations import DictionaryClientUnknownValueOperations # type: ignore +from ._operations import DictionaryClientModelValueOperations # type: ignore +from ._operations import DictionaryClientRecursiveModelValueOperations # type: ignore +from ._operations import DictionaryClientNullableFloatValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "Int32ValueOperations", - "Int64ValueOperations", - "BooleanValueOperations", - "StringValueOperations", - "Float32ValueOperations", - "DatetimeValueOperations", - "DurationValueOperations", - "UnknownValueOperations", - "ModelValueOperations", - "RecursiveModelValueOperations", - "NullableFloatValueOperations", + "DictionaryClientInt32ValueOperations", + "DictionaryClientInt64ValueOperations", + "DictionaryClientBooleanValueOperations", + "DictionaryClientStringValueOperations", + "DictionaryClientFloat32ValueOperations", + "DictionaryClientDatetimeValueOperations", + "DictionaryClientDurationValueOperations", + "DictionaryClientUnknownValueOperations", + "DictionaryClientModelValueOperations", + "DictionaryClientRecursiveModelValueOperations", + "DictionaryClientNullableFloatValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py index a62d1f30ea..c0a9214adb 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-dictionary/typetest/dictionary/operations/_operations.py @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -48,7 +48,7 @@ def build_int32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -62,7 +62,7 @@ def build_int32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int64_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -76,7 +76,7 @@ def build_int64_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_int64_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +90,7 @@ def build_int64_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_boolean_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -104,7 +104,7 @@ def build_boolean_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_boolean_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -118,7 +118,7 @@ def build_boolean_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_string_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -132,7 +132,7 @@ def build_string_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_string_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -146,7 +146,7 @@ def build_string_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_float32_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -160,7 +160,7 @@ def build_float32_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_float32_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -174,7 +174,7 @@ def build_float32_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_datetime_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -188,7 +188,7 @@ def build_datetime_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_datetime_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -202,7 +202,7 @@ def build_datetime_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_duration_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -216,7 +216,7 @@ def build_duration_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_duration_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -230,7 +230,7 @@ def build_duration_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_unknown_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -244,7 +244,7 @@ def build_unknown_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_unknown_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -258,7 +258,7 @@ def build_unknown_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_model_value_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -272,7 +272,7 @@ def build_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_model_value_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -286,7 +286,9 @@ def build_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_recursive_model_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -300,7 +302,9 @@ def build_recursive_model_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_recursive_model_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -314,7 +318,9 @@ def build_recursive_model_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_nullable_float_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -328,7 +334,9 @@ def build_nullable_float_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: +def build_dictionary_client_nullable_float_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -342,14 +350,14 @@ def build_nullable_float_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class Int32ValueOperations: +class DictionaryClientInt32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int32_value` attribute. + :attr:`dictionary_client_int32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -379,7 +387,7 @@ def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int32_value_get_request( + _request = build_dictionary_client_int32_value_get_request( headers=_headers, params=_params, ) @@ -472,7 +480,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int32_value_put_request( + _request = build_dictionary_client_int32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -496,14 +504,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Int64ValueOperations: +class DictionaryClientInt64ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`int64_value` attribute. + :attr:`dictionary_client_int64_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -533,7 +541,7 @@ def get(self, **kwargs: Any) -> dict[str, int]: cls: ClsType[dict[str, int]] = kwargs.pop("cls", None) - _request = build_int64_value_get_request( + _request = build_dictionary_client_int64_value_get_request( headers=_headers, params=_params, ) @@ -626,7 +634,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int64_value_put_request( + _request = build_dictionary_client_int64_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -650,14 +658,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanValueOperations: +class DictionaryClientBooleanValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`boolean_value` attribute. + :attr:`dictionary_client_boolean_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -687,7 +695,7 @@ def get(self, **kwargs: Any) -> dict[str, bool]: cls: ClsType[dict[str, bool]] = kwargs.pop("cls", None) - _request = build_boolean_value_get_request( + _request = build_dictionary_client_boolean_value_get_request( headers=_headers, params=_params, ) @@ -780,7 +788,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_value_put_request( + _request = build_dictionary_client_boolean_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -804,14 +812,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringValueOperations: +class DictionaryClientStringValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`string_value` attribute. + :attr:`dictionary_client_string_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -841,7 +849,7 @@ def get(self, **kwargs: Any) -> dict[str, str]: cls: ClsType[dict[str, str]] = kwargs.pop("cls", None) - _request = build_string_value_get_request( + _request = build_dictionary_client_string_value_get_request( headers=_headers, params=_params, ) @@ -934,7 +942,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_value_put_request( + _request = build_dictionary_client_string_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -958,14 +966,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Float32ValueOperations: +class DictionaryClientFloat32ValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`float32_value` attribute. + :attr:`dictionary_client_float32_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -995,7 +1003,7 @@ def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_float32_value_get_request( + _request = build_dictionary_client_float32_value_get_request( headers=_headers, params=_params, ) @@ -1088,7 +1096,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float32_value_put_request( + _request = build_dictionary_client_float32_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1112,14 +1120,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeValueOperations: +class DictionaryClientDatetimeValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`datetime_value` attribute. + :attr:`dictionary_client_datetime_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1149,7 +1157,7 @@ def get(self, **kwargs: Any) -> dict[str, datetime.datetime]: cls: ClsType[dict[str, datetime.datetime]] = kwargs.pop("cls", None) - _request = build_datetime_value_get_request( + _request = build_dictionary_client_datetime_value_get_request( headers=_headers, params=_params, ) @@ -1242,7 +1250,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True, format="rfc3339") # type: ignore - _request = build_datetime_value_put_request( + _request = build_dictionary_client_datetime_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1266,14 +1274,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationValueOperations: +class DictionaryClientDurationValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`duration_value` attribute. + :attr:`dictionary_client_duration_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1303,7 +1311,7 @@ def get(self, **kwargs: Any) -> dict[str, datetime.timedelta]: cls: ClsType[dict[str, datetime.timedelta]] = kwargs.pop("cls", None) - _request = build_duration_value_get_request( + _request = build_dictionary_client_duration_value_get_request( headers=_headers, params=_params, ) @@ -1398,7 +1406,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_value_put_request( + _request = build_dictionary_client_duration_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1422,14 +1430,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownValueOperations: +class DictionaryClientUnknownValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`unknown_value` attribute. + :attr:`dictionary_client_unknown_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1459,7 +1467,7 @@ def get(self, **kwargs: Any) -> dict[str, Any]: cls: ClsType[dict[str, Any]] = kwargs.pop("cls", None) - _request = build_unknown_value_get_request( + _request = build_dictionary_client_unknown_value_get_request( headers=_headers, params=_params, ) @@ -1552,7 +1560,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_value_put_request( + _request = build_dictionary_client_unknown_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1576,14 +1584,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelValueOperations: +class DictionaryClientModelValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`model_value` attribute. + :attr:`dictionary_client_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1613,7 +1621,7 @@ def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_model_value_get_request( + _request = build_dictionary_client_model_value_get_request( headers=_headers, params=_params, ) @@ -1722,7 +1730,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_value_put_request( + _request = build_dictionary_client_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1746,14 +1754,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RecursiveModelValueOperations: +class DictionaryClientRecursiveModelValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`recursive_model_value` attribute. + :attr:`dictionary_client_recursive_model_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1783,7 +1791,7 @@ def get(self, **kwargs: Any) -> dict[str, _models.InnerModel]: cls: ClsType[dict[str, _models.InnerModel]] = kwargs.pop("cls", None) - _request = build_recursive_model_value_get_request( + _request = build_dictionary_client_recursive_model_value_get_request( headers=_headers, params=_params, ) @@ -1892,7 +1900,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_recursive_model_value_put_request( + _request = build_dictionary_client_recursive_model_value_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1916,14 +1924,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NullableFloatValueOperations: +class DictionaryClientNullableFloatValueOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.dictionary.DictionaryClient`'s - :attr:`nullable_float_value` attribute. + :attr:`dictionary_client_nullable_float_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1953,7 +1961,7 @@ def get(self, **kwargs: Any) -> dict[str, float]: cls: ClsType[dict[str, float]] = kwargs.pop("cls", None) - _request = build_nullable_float_value_get_request( + _request = build_dictionary_client_nullable_float_value_get_request( headers=_headers, params=_params, ) @@ -2046,7 +2054,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_nullable_float_value_put_request( + _request = build_dictionary_client_nullable_float_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py index 8e553bd635..b6adca5cc4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/_client.py @@ -9,16 +9,18 @@ from ._configuration import DiscriminatedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import EnvelopeOperations, NoEnvelopeOperations +from .operations import DiscriminatedClientEnvelopeOperations, DiscriminatedClientNoEnvelopeOperations class DiscriminatedClient: # pylint: disable=client-accepts-api-version-keyword """Describe scenarios for discriminated unions. - :ivar envelope: EnvelopeOperations operations - :vartype envelope: typetest.discriminatedunion.operations.EnvelopeOperations - :ivar no_envelope: NoEnvelopeOperations operations - :vartype no_envelope: typetest.discriminatedunion.operations.NoEnvelopeOperations + :ivar discriminated_client_envelope: DiscriminatedClientEnvelopeOperations operations + :vartype discriminated_client_envelope: + typetest.discriminatedunion.operations.DiscriminatedClientEnvelopeOperations + :ivar discriminated_client_no_envelope: DiscriminatedClientNoEnvelopeOperations operations + :vartype discriminated_client_no_envelope: + typetest.discriminatedunion.operations.DiscriminatedClientNoEnvelopeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -45,8 +47,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.envelope = EnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) - self.no_envelope = NoEnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope = DiscriminatedClientEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.discriminated_client_no_envelope = DiscriminatedClientNoEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py index 542cf464f6..bd8f490b39 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/_client.py @@ -9,16 +9,18 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import DiscriminatedClientConfiguration -from .operations import EnvelopeOperations, NoEnvelopeOperations +from .operations import DiscriminatedClientEnvelopeOperations, DiscriminatedClientNoEnvelopeOperations class DiscriminatedClient: # pylint: disable=client-accepts-api-version-keyword """Describe scenarios for discriminated unions. - :ivar envelope: EnvelopeOperations operations - :vartype envelope: typetest.discriminatedunion.aio.operations.EnvelopeOperations - :ivar no_envelope: NoEnvelopeOperations operations - :vartype no_envelope: typetest.discriminatedunion.aio.operations.NoEnvelopeOperations + :ivar discriminated_client_envelope: DiscriminatedClientEnvelopeOperations operations + :vartype discriminated_client_envelope: + typetest.discriminatedunion.aio.operations.DiscriminatedClientEnvelopeOperations + :ivar discriminated_client_no_envelope: DiscriminatedClientNoEnvelopeOperations operations + :vartype discriminated_client_no_envelope: + typetest.discriminatedunion.aio.operations.DiscriminatedClientNoEnvelopeOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -45,8 +47,12 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.envelope = EnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) - self.no_envelope = NoEnvelopeOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope = DiscriminatedClientEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.discriminated_client_no_envelope = DiscriminatedClientNoEnvelopeOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py index c52c2a3591..a07642add7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import EnvelopeOperations # type: ignore -from ._operations import NoEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientNoEnvelopeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "EnvelopeOperations", - "NoEnvelopeOperations", + "DiscriminatedClientEnvelopeOperations", + "DiscriminatedClientNoEnvelopeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py index 798b142241..6c8ad49fcd 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/aio/operations/_operations.py @@ -22,14 +22,14 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_envelope_object_custom_properties_get_request, - build_envelope_object_custom_properties_put_request, - build_envelope_object_default_get_request, - build_envelope_object_default_put_request, - build_no_envelope_custom_discriminator_get_request, - build_no_envelope_custom_discriminator_put_request, - build_no_envelope_default_get_request, - build_no_envelope_default_put_request, + build_discriminated_client_envelope_object_custom_properties_get_request, + build_discriminated_client_envelope_object_custom_properties_put_request, + build_discriminated_client_envelope_object_default_get_request, + build_discriminated_client_envelope_object_default_put_request, + build_discriminated_client_no_envelope_custom_discriminator_get_request, + build_discriminated_client_no_envelope_custom_discriminator_put_request, + build_discriminated_client_no_envelope_default_get_request, + build_discriminated_client_no_envelope_default_put_request, ) from .._configuration import DiscriminatedClientConfiguration @@ -39,14 +39,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class EnvelopeOperations: +class DiscriminatedClientEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`envelope` attribute. + :attr:`discriminated_client_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -56,17 +56,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.object = EnvelopeObjectOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope_object = DiscriminatedClientEnvelopeObjectOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class NoEnvelopeOperations: +class DiscriminatedClientNoEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`no_envelope` attribute. + :attr:`discriminated_client_no_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -76,20 +78,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = NoEnvelopeDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_discriminator = NoEnvelopeCustomDiscriminatorOperations( + self.discriminated_client_no_envelope_default = DiscriminatedClientNoEnvelopeDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_no_envelope_custom_discriminator = ( + DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class EnvelopeObjectOperations: +class DiscriminatedClientEnvelopeObjectOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`object` attribute. + :attr:`discriminated_client_envelope_object` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -99,20 +105,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = EnvelopeObjectDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_properties = EnvelopeObjectCustomPropertiesOperations( + self.discriminated_client_envelope_object_default = DiscriminatedClientEnvelopeObjectDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_envelope_object_custom_properties = ( + DiscriminatedClientEnvelopeObjectCustomPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class NoEnvelopeDefaultOperations: +class DiscriminatedClientNoEnvelopeDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_no_envelope_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -144,7 +154,7 @@ async def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetInline"] = kwargs.pop("cls", None) - _request = build_no_envelope_default_get_request( + _request = build_discriminated_client_no_envelope_default_get_request( kind=kind, headers=_headers, params=_params, @@ -236,7 +246,7 @@ async def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInli content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_default_put_request( + _request = build_discriminated_client_no_envelope_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -272,14 +282,14 @@ async def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInli return deserialized # type: ignore -class NoEnvelopeCustomDiscriminatorOperations: +class DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`custom_discriminator` attribute. + :attr:`discriminated_client_no_envelope_custom_discriminator` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -311,7 +321,7 @@ async def get(self, *, type: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetInlineWithCustomDiscriminator"] = kwargs.pop("cls", None) - _request = build_no_envelope_custom_discriminator_get_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_get_request( type=type, headers=_headers, params=_params, @@ -405,7 +415,7 @@ async def put( content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_custom_discriminator_put_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_put_request( content_type=content_type, content=_content, headers=_headers, @@ -441,14 +451,14 @@ async def put( return deserialized # type: ignore -class EnvelopeObjectDefaultOperations: +class DiscriminatedClientEnvelopeObjectDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_envelope_object_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -480,7 +490,7 @@ async def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.Pet cls: ClsType["_types.PetWithEnvelope"] = kwargs.pop("cls", None) - _request = build_envelope_object_default_get_request( + _request = build_discriminated_client_envelope_object_default_get_request( kind=kind, headers=_headers, params=_params, @@ -572,7 +582,7 @@ async def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.P content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_default_put_request( + _request = build_discriminated_client_envelope_object_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -608,14 +618,14 @@ async def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.P return deserialized # type: ignore -class EnvelopeObjectCustomPropertiesOperations: +class DiscriminatedClientEnvelopeObjectCustomPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.aio.DiscriminatedClient`'s - :attr:`custom_properties` attribute. + :attr:`discriminated_client_envelope_object_custom_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -647,7 +657,7 @@ async def get(self, *, pet_type: Optional[str] = None, **kwargs: Any) -> "_types cls: ClsType["_types.PetWithCustomNames"] = kwargs.pop("cls", None) - _request = build_envelope_object_custom_properties_get_request( + _request = build_discriminated_client_envelope_object_custom_properties_get_request( pet_type=pet_type, headers=_headers, params=_params, @@ -739,7 +749,7 @@ async def put(self, input: "_types.PetWithCustomNames", **kwargs: Any) -> "_type content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_custom_properties_put_request( + _request = build_discriminated_client_envelope_object_custom_properties_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py index c52c2a3591..a07642add7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/__init__.py @@ -6,16 +6,16 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import EnvelopeOperations # type: ignore -from ._operations import NoEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientEnvelopeOperations # type: ignore +from ._operations import DiscriminatedClientNoEnvelopeOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "EnvelopeOperations", - "NoEnvelopeOperations", + "DiscriminatedClientEnvelopeOperations", + "DiscriminatedClientNoEnvelopeOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py index cb22b71607..b638be74a2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-discriminatedunion/typetest/discriminatedunion/operations/_operations.py @@ -32,7 +32,9 @@ _SERIALIZER.client_side_validation = False -def build_no_envelope_default_get_request(*, kind: Optional[str] = None, **kwargs: Any) -> HttpRequest: +def build_discriminated_client_no_envelope_default_get_request( # pylint: disable=name-too-long + *, kind: Optional[str] = None, **kwargs: Any +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -51,7 +53,9 @@ def build_no_envelope_default_get_request(*, kind: Optional[str] = None, **kwarg return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_no_envelope_default_put_request(**kwargs: Any) -> HttpRequest: +def build_discriminated_client_no_envelope_default_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -68,7 +72,7 @@ def build_no_envelope_default_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_no_envelope_custom_discriminator_get_request( # pylint: disable=name-too-long +def build_discriminated_client_no_envelope_custom_discriminator_get_request( # pylint: disable=name-too-long *, type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -89,7 +93,9 @@ def build_no_envelope_custom_discriminator_get_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_no_envelope_custom_discriminator_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_no_envelope_custom_discriminator_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -106,7 +112,7 @@ def build_no_envelope_custom_discriminator_put_request(**kwargs: Any) -> HttpReq return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_envelope_object_default_get_request( # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_default_get_request( # pylint: disable=name-too-long *, kind: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -127,7 +133,9 @@ def build_envelope_object_default_get_request( # pylint: disable=name-too-long return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_envelope_object_default_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_default_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -144,7 +152,7 @@ def build_envelope_object_default_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_envelope_object_custom_properties_get_request( # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_custom_properties_get_request( # pylint: disable=name-too-long *, pet_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -165,7 +173,9 @@ def build_envelope_object_custom_properties_get_request( # pylint: disable=name return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_envelope_object_custom_properties_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_discriminated_client_envelope_object_custom_properties_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -182,14 +192,14 @@ def build_envelope_object_custom_properties_put_request(**kwargs: Any) -> HttpRe return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class EnvelopeOperations: +class DiscriminatedClientEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`envelope` attribute. + :attr:`discriminated_client_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -199,17 +209,19 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.object = EnvelopeObjectOperations(self._client, self._config, self._serialize, self._deserialize) + self.discriminated_client_envelope_object = DiscriminatedClientEnvelopeObjectOperations( + self._client, self._config, self._serialize, self._deserialize + ) -class NoEnvelopeOperations: +class DiscriminatedClientNoEnvelopeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`no_envelope` attribute. + :attr:`discriminated_client_no_envelope` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -219,20 +231,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = NoEnvelopeDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_discriminator = NoEnvelopeCustomDiscriminatorOperations( + self.discriminated_client_no_envelope_default = DiscriminatedClientNoEnvelopeDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_no_envelope_custom_discriminator = ( + DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class EnvelopeObjectOperations: +class DiscriminatedClientEnvelopeObjectOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`object` attribute. + :attr:`discriminated_client_envelope_object` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -242,20 +258,24 @@ def __init__(self, *args, **kwargs) -> None: self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - self.default = EnvelopeObjectDefaultOperations(self._client, self._config, self._serialize, self._deserialize) - self.custom_properties = EnvelopeObjectCustomPropertiesOperations( + self.discriminated_client_envelope_object_default = DiscriminatedClientEnvelopeObjectDefaultOperations( self._client, self._config, self._serialize, self._deserialize ) + self.discriminated_client_envelope_object_custom_properties = ( + DiscriminatedClientEnvelopeObjectCustomPropertiesOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) -class NoEnvelopeDefaultOperations: +class DiscriminatedClientNoEnvelopeDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_no_envelope_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -287,7 +307,7 @@ def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.PetInline cls: ClsType["_types.PetInline"] = kwargs.pop("cls", None) - _request = build_no_envelope_default_get_request( + _request = build_discriminated_client_no_envelope_default_get_request( kind=kind, headers=_headers, params=_params, @@ -375,7 +395,7 @@ def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInline": content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_default_put_request( + _request = build_discriminated_client_no_envelope_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -411,14 +431,14 @@ def put(self, input: "_types.PetInline", **kwargs: Any) -> "_types.PetInline": return deserialized # type: ignore -class NoEnvelopeCustomDiscriminatorOperations: +class DiscriminatedClientNoEnvelopeCustomDiscriminatorOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`custom_discriminator` attribute. + :attr:`discriminated_client_no_envelope_custom_discriminator` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -450,7 +470,7 @@ def get(self, *, type: Optional[str] = None, **kwargs: Any) -> "_types.PetInline cls: ClsType["_types.PetInlineWithCustomDiscriminator"] = kwargs.pop("cls", None) - _request = build_no_envelope_custom_discriminator_get_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_get_request( type=type, headers=_headers, params=_params, @@ -544,7 +564,7 @@ def put( content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_no_envelope_custom_discriminator_put_request( + _request = build_discriminated_client_no_envelope_custom_discriminator_put_request( content_type=content_type, content=_content, headers=_headers, @@ -580,14 +600,14 @@ def put( return deserialized # type: ignore -class EnvelopeObjectDefaultOperations: +class DiscriminatedClientEnvelopeObjectDefaultOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`default` attribute. + :attr:`discriminated_client_envelope_object_default` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -619,7 +639,7 @@ def get(self, *, kind: Optional[str] = None, **kwargs: Any) -> "_types.PetWithEn cls: ClsType["_types.PetWithEnvelope"] = kwargs.pop("cls", None) - _request = build_envelope_object_default_get_request( + _request = build_discriminated_client_envelope_object_default_get_request( kind=kind, headers=_headers, params=_params, @@ -711,7 +731,7 @@ def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.PetWith content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_default_put_request( + _request = build_discriminated_client_envelope_object_default_put_request( content_type=content_type, content=_content, headers=_headers, @@ -747,14 +767,14 @@ def put(self, input: "_types.PetWithEnvelope", **kwargs: Any) -> "_types.PetWith return deserialized # type: ignore -class EnvelopeObjectCustomPropertiesOperations: +class DiscriminatedClientEnvelopeObjectCustomPropertiesOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.discriminatedunion.DiscriminatedClient`'s - :attr:`custom_properties` attribute. + :attr:`discriminated_client_envelope_object_custom_properties` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -786,7 +806,7 @@ def get(self, *, pet_type: Optional[str] = None, **kwargs: Any) -> "_types.PetWi cls: ClsType["_types.PetWithCustomNames"] = kwargs.pop("cls", None) - _request = build_envelope_object_custom_properties_get_request( + _request = build_discriminated_client_envelope_object_custom_properties_get_request( pet_type=pet_type, headers=_headers, params=_params, @@ -878,7 +898,7 @@ def put(self, input: "_types.PetWithCustomNames", **kwargs: Any) -> "_types.PetW content_type = content_type or "application/json" _content = json.dumps(input, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_envelope_object_custom_properties_put_request( + _request = build_discriminated_client_envelope_object_custom_properties_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py index 41ba859312..82c3ae153b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/_client.py @@ -9,14 +9,15 @@ from ._configuration import ExtensibleClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import StringOperations +from .operations import ExtensibleClientStringOperations class ExtensibleClient: # pylint: disable=client-accepts-api-version-keyword """ExtensibleClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.extensible.operations.StringOperations + :ivar extensible_client_string: ExtensibleClientStringOperations operations + :vartype extensible_client_string: + typetest.enum.extensible.operations.ExtensibleClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensible_client_string = ExtensibleClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py index 9fb7f42219..f645640fa9 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/_client.py @@ -9,14 +9,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ExtensibleClientConfiguration -from .operations import StringOperations +from .operations import ExtensibleClientStringOperations class ExtensibleClient: # pylint: disable=client-accepts-api-version-keyword """ExtensibleClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.extensible.aio.operations.StringOperations + :ivar extensible_client_string: ExtensibleClientStringOperations operations + :vartype extensible_client_string: + typetest.enum.extensible.aio.operations.ExtensibleClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +44,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.extensible_client_string = ExtensibleClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py index 43d60d6b4f..6f9cd4a30d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import ExtensibleClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "ExtensibleClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py index 05afaac4d2..23a3c4eea4 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/aio/operations/_operations.py @@ -22,10 +22,10 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_string_get_known_value_request, - build_string_get_unknown_value_request, - build_string_put_known_value_request, - build_string_put_unknown_value_request, + build_extensible_client_string_get_known_value_request, + build_extensible_client_string_get_unknown_value_request, + build_extensible_client_string_put_known_value_request, + build_extensible_client_string_put_unknown_value_request, ) from .._configuration import ExtensibleClientConfiguration @@ -33,14 +33,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class ExtensibleClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.extensible.aio.ExtensibleClient`'s - :attr:`string` attribute. + :attr:`extensible_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -70,7 +70,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_extensible_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -126,7 +126,7 @@ async def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWee cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_unknown_value_request( + _request = build_extensible_client_string_get_unknown_value_request( headers=_headers, params=_params, ) @@ -188,7 +188,7 @@ async def put_known_value(self, body: Union[str, _models.DaysOfWeekExtensibleEnu _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_extensible_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -237,7 +237,7 @@ async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekExtensibleE _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_extensible_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py index 43d60d6b4f..6f9cd4a30d 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import ExtensibleClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "ExtensibleClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py index 6bc21d7e58..0670c2bb2b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-extensible/typetest/enum/extensible/operations/_operations.py @@ -30,7 +30,9 @@ _SERIALIZER.client_side_validation = False -def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_get_known_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -44,7 +46,9 @@ def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_get_unknown_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -58,7 +62,9 @@ def build_string_get_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_put_known_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -71,7 +77,9 @@ def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_extensible_client_string_put_unknown_value_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -84,14 +92,14 @@ def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class ExtensibleClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.extensible.ExtensibleClient`'s - :attr:`string` attribute. + :attr:`extensible_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -121,7 +129,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExtensi cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_extensible_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -177,7 +185,7 @@ def get_unknown_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekExten cls: ClsType[Union[str, _models.DaysOfWeekExtensibleEnum]] = kwargs.pop("cls", None) - _request = build_string_get_unknown_value_request( + _request = build_extensible_client_string_get_unknown_value_request( headers=_headers, params=_params, ) @@ -241,7 +249,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_extensible_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -292,7 +300,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_extensible_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py index 9796efb373..9d68dc4c83 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/_client.py @@ -9,14 +9,14 @@ from ._configuration import FixedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import StringOperations +from .operations import FixedClientStringOperations class FixedClient: # pylint: disable=client-accepts-api-version-keyword """FixedClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.fixed.operations.StringOperations + :ivar fixed_client_string: FixedClientStringOperations operations + :vartype fixed_client_string: typetest.enum.fixed.operations.FixedClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.fixed_client_string = FixedClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py index b816e9c312..73f10242a1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/_client.py @@ -9,14 +9,14 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import FixedClientConfiguration -from .operations import StringOperations +from .operations import FixedClientStringOperations class FixedClient: # pylint: disable=client-accepts-api-version-keyword """FixedClient. - :ivar string: StringOperations operations - :vartype string: typetest.enum.fixed.aio.operations.StringOperations + :ivar fixed_client_string: FixedClientStringOperations operations + :vartype fixed_client_string: typetest.enum.fixed.aio.operations.FixedClientStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -43,7 +43,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) + self.fixed_client_string = FixedClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py index 43d60d6b4f..a3f3003ce2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import FixedClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "FixedClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py index 6d7765d5c7..3ffdbf2bc0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/aio/operations/_operations.py @@ -22,9 +22,9 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_string_get_known_value_request, - build_string_put_known_value_request, - build_string_put_unknown_value_request, + build_fixed_client_string_get_known_value_request, + build_fixed_client_string_put_known_value_request, + build_fixed_client_string_put_unknown_value_request, ) from .._configuration import FixedClientConfiguration @@ -32,14 +32,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class FixedClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.fixed.aio.FixedClient`'s - :attr:`string` attribute. + :attr:`fixed_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -69,7 +69,7 @@ async def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekE cls: ClsType[Union[str, _models.DaysOfWeekEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_fixed_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -131,7 +131,7 @@ async def put_known_value(self, body: Union[str, _models.DaysOfWeekEnum], **kwar _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_fixed_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -180,7 +180,7 @@ async def put_unknown_value(self, body: Union[str, _models.DaysOfWeekEnum], **kw _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_fixed_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py index 43d60d6b4f..a3f3003ce2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/__init__.py @@ -6,14 +6,14 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore +from ._operations import FixedClientStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", + "FixedClientStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py index 33a5962ddc..98334c79eb 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-enum-fixed/typetest/enum/fixed/operations/_operations.py @@ -30,7 +30,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_get_known_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -44,7 +44,7 @@ def build_string_get_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_put_known_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -57,7 +57,7 @@ def build_string_put_known_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: +def build_fixed_client_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -70,14 +70,14 @@ def build_string_put_unknown_value_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class FixedClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.enum.fixed.FixedClient`'s - :attr:`string` attribute. + :attr:`fixed_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -107,7 +107,7 @@ def get_known_value(self, **kwargs: Any) -> Union[str, _models.DaysOfWeekEnum]: cls: ClsType[Union[str, _models.DaysOfWeekEnum]] = kwargs.pop("cls", None) - _request = build_string_get_known_value_request( + _request = build_fixed_client_string_get_known_value_request( headers=_headers, params=_params, ) @@ -171,7 +171,7 @@ def put_known_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_known_value_request( + _request = build_fixed_client_string_put_known_value_request( content_type=content_type, content=_content, headers=_headers, @@ -222,7 +222,7 @@ def put_unknown_value( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_unknown_value_request( + _request = build_fixed_client_string_put_unknown_value_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py index 3c9588ace3..fa4462451f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 from copy import deepcopy @@ -10,134 +11,167 @@ from ._configuration import AdditionalPropertiesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - ExtendsDifferentSpreadFloatOperations, - ExtendsDifferentSpreadModelArrayOperations, - ExtendsDifferentSpreadModelOperations, - ExtendsDifferentSpreadStringOperations, - ExtendsFloatOperations, - ExtendsModelArrayOperations, - ExtendsModelOperations, - ExtendsStringOperations, - ExtendsUnknownDerivedOperations, - ExtendsUnknownDiscriminatedOperations, - ExtendsUnknownOperations, - IsFloatOperations, - IsModelArrayOperations, - IsModelOperations, - IsStringOperations, - IsUnknownDerivedOperations, - IsUnknownDiscriminatedOperations, - IsUnknownOperations, - MultipleSpreadOperations, - SpreadDifferentFloatOperations, - SpreadDifferentModelArrayOperations, - SpreadDifferentModelOperations, - SpreadDifferentStringOperations, - SpreadFloatOperations, - SpreadModelArrayOperations, - SpreadModelOperations, - SpreadRecordNonDiscriminatedUnion2Operations, - SpreadRecordNonDiscriminatedUnion3Operations, - SpreadRecordNonDiscriminatedUnionOperations, - SpreadRecordUnionOperations, - SpreadStringOperations, + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations, + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations, + AdditionalPropertiesClientExtendsFloatOperations, + AdditionalPropertiesClientExtendsModelArrayOperations, + AdditionalPropertiesClientExtendsModelOperations, + AdditionalPropertiesClientExtendsStringOperations, + AdditionalPropertiesClientExtendsUnknownDerivedOperations, + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations, + AdditionalPropertiesClientExtendsUnknownOperations, + AdditionalPropertiesClientIsFloatOperations, + AdditionalPropertiesClientIsModelArrayOperations, + AdditionalPropertiesClientIsModelOperations, + AdditionalPropertiesClientIsStringOperations, + AdditionalPropertiesClientIsUnknownDerivedOperations, + AdditionalPropertiesClientIsUnknownDiscriminatedOperations, + AdditionalPropertiesClientIsUnknownOperations, + AdditionalPropertiesClientMultipleSpreadOperations, + AdditionalPropertiesClientSpreadDifferentFloatOperations, + AdditionalPropertiesClientSpreadDifferentModelArrayOperations, + AdditionalPropertiesClientSpreadDifferentModelOperations, + AdditionalPropertiesClientSpreadDifferentStringOperations, + AdditionalPropertiesClientSpreadFloatOperations, + AdditionalPropertiesClientSpreadModelArrayOperations, + AdditionalPropertiesClientSpreadModelOperations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations, + AdditionalPropertiesClientSpreadRecordUnionOperations, + AdditionalPropertiesClientSpreadStringOperations, ) class AdditionalPropertiesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Tests for additional properties of models. - :ivar extends_unknown: ExtendsUnknownOperations operations - :vartype extends_unknown: - typetest.property.additionalproperties.operations.ExtendsUnknownOperations - :ivar extends_unknown_derived: ExtendsUnknownDerivedOperations operations - :vartype extends_unknown_derived: - typetest.property.additionalproperties.operations.ExtendsUnknownDerivedOperations - :ivar extends_unknown_discriminated: ExtendsUnknownDiscriminatedOperations operations - :vartype extends_unknown_discriminated: - typetest.property.additionalproperties.operations.ExtendsUnknownDiscriminatedOperations - :ivar is_unknown: IsUnknownOperations operations - :vartype is_unknown: typetest.property.additionalproperties.operations.IsUnknownOperations - :ivar is_unknown_derived: IsUnknownDerivedOperations operations - :vartype is_unknown_derived: - typetest.property.additionalproperties.operations.IsUnknownDerivedOperations - :ivar is_unknown_discriminated: IsUnknownDiscriminatedOperations operations - :vartype is_unknown_discriminated: - typetest.property.additionalproperties.operations.IsUnknownDiscriminatedOperations - :ivar extends_string: ExtendsStringOperations operations - :vartype extends_string: - typetest.property.additionalproperties.operations.ExtendsStringOperations - :ivar is_string: IsStringOperations operations - :vartype is_string: typetest.property.additionalproperties.operations.IsStringOperations - :ivar spread_string: SpreadStringOperations operations - :vartype spread_string: - typetest.property.additionalproperties.operations.SpreadStringOperations - :ivar extends_float: ExtendsFloatOperations operations - :vartype extends_float: - typetest.property.additionalproperties.operations.ExtendsFloatOperations - :ivar is_float: IsFloatOperations operations - :vartype is_float: typetest.property.additionalproperties.operations.IsFloatOperations - :ivar spread_float: SpreadFloatOperations operations - :vartype spread_float: typetest.property.additionalproperties.operations.SpreadFloatOperations - :ivar extends_model: ExtendsModelOperations operations - :vartype extends_model: - typetest.property.additionalproperties.operations.ExtendsModelOperations - :ivar is_model: IsModelOperations operations - :vartype is_model: typetest.property.additionalproperties.operations.IsModelOperations - :ivar spread_model: SpreadModelOperations operations - :vartype spread_model: typetest.property.additionalproperties.operations.SpreadModelOperations - :ivar extends_model_array: ExtendsModelArrayOperations operations - :vartype extends_model_array: - typetest.property.additionalproperties.operations.ExtendsModelArrayOperations - :ivar is_model_array: IsModelArrayOperations operations - :vartype is_model_array: - typetest.property.additionalproperties.operations.IsModelArrayOperations - :ivar spread_model_array: SpreadModelArrayOperations operations - :vartype spread_model_array: - typetest.property.additionalproperties.operations.SpreadModelArrayOperations - :ivar spread_different_string: SpreadDifferentStringOperations operations - :vartype spread_different_string: - typetest.property.additionalproperties.operations.SpreadDifferentStringOperations - :ivar spread_different_float: SpreadDifferentFloatOperations operations - :vartype spread_different_float: - typetest.property.additionalproperties.operations.SpreadDifferentFloatOperations - :ivar spread_different_model: SpreadDifferentModelOperations operations - :vartype spread_different_model: - typetest.property.additionalproperties.operations.SpreadDifferentModelOperations - :ivar spread_different_model_array: SpreadDifferentModelArrayOperations operations - :vartype spread_different_model_array: - typetest.property.additionalproperties.operations.SpreadDifferentModelArrayOperations - :ivar extends_different_spread_string: ExtendsDifferentSpreadStringOperations operations - :vartype extends_different_spread_string: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadStringOperations - :ivar extends_different_spread_float: ExtendsDifferentSpreadFloatOperations operations - :vartype extends_different_spread_float: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadFloatOperations - :ivar extends_different_spread_model: ExtendsDifferentSpreadModelOperations operations - :vartype extends_different_spread_model: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelOperations - :ivar extends_different_spread_model_array: ExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_extends_unknown: + AdditionalPropertiesClientExtendsUnknownOperations operations + :vartype additional_properties_client_extends_unknown: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownOperations + :ivar additional_properties_client_extends_unknown_derived: + AdditionalPropertiesClientExtendsUnknownDerivedOperations operations + :vartype additional_properties_client_extends_unknown_derived: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations + :ivar additional_properties_client_extends_unknown_discriminated: + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_extends_unknown_discriminated: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations + :ivar additional_properties_client_is_unknown: AdditionalPropertiesClientIsUnknownOperations operations - :vartype extends_different_spread_model_array: - typetest.property.additionalproperties.operations.ExtendsDifferentSpreadModelArrayOperations - :ivar multiple_spread: MultipleSpreadOperations operations - :vartype multiple_spread: - typetest.property.additionalproperties.operations.MultipleSpreadOperations - :ivar spread_record_union: SpreadRecordUnionOperations operations - :vartype spread_record_union: - typetest.property.additionalproperties.operations.SpreadRecordUnionOperations - :ivar spread_record_non_discriminated_union: SpreadRecordNonDiscriminatedUnionOperations + :vartype additional_properties_client_is_unknown: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownOperations + :ivar additional_properties_client_is_unknown_derived: + AdditionalPropertiesClientIsUnknownDerivedOperations operations + :vartype additional_properties_client_is_unknown_derived: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDerivedOperations + :ivar additional_properties_client_is_unknown_discriminated: + AdditionalPropertiesClientIsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_is_unknown_discriminated: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations + :ivar additional_properties_client_extends_string: + AdditionalPropertiesClientExtendsStringOperations operations + :vartype additional_properties_client_extends_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsStringOperations + :ivar additional_properties_client_is_string: AdditionalPropertiesClientIsStringOperations operations - :vartype spread_record_non_discriminated_union: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnionOperations - :ivar spread_record_non_discriminated_union2: SpreadRecordNonDiscriminatedUnion2Operations + :vartype additional_properties_client_is_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsStringOperations + :ivar additional_properties_client_spread_string: + AdditionalPropertiesClientSpreadStringOperations operations + :vartype additional_properties_client_spread_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadStringOperations + :ivar additional_properties_client_extends_float: + AdditionalPropertiesClientExtendsFloatOperations operations + :vartype additional_properties_client_extends_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsFloatOperations + :ivar additional_properties_client_is_float: AdditionalPropertiesClientIsFloatOperations operations - :vartype spread_record_non_discriminated_union2: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion2Operations - :ivar spread_record_non_discriminated_union3: SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsFloatOperations + :ivar additional_properties_client_spread_float: + AdditionalPropertiesClientSpreadFloatOperations operations + :vartype additional_properties_client_spread_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadFloatOperations + :ivar additional_properties_client_extends_model: + AdditionalPropertiesClientExtendsModelOperations operations + :vartype additional_properties_client_extends_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelOperations + :ivar additional_properties_client_is_model: AdditionalPropertiesClientIsModelOperations operations - :vartype spread_record_non_discriminated_union3: - typetest.property.additionalproperties.operations.SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelOperations + :ivar additional_properties_client_spread_model: + AdditionalPropertiesClientSpreadModelOperations operations + :vartype additional_properties_client_spread_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelOperations + :ivar additional_properties_client_extends_model_array: + AdditionalPropertiesClientExtendsModelArrayOperations operations + :vartype additional_properties_client_extends_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsModelArrayOperations + :ivar additional_properties_client_is_model_array: + AdditionalPropertiesClientIsModelArrayOperations operations + :vartype additional_properties_client_is_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientIsModelArrayOperations + :ivar additional_properties_client_spread_model_array: + AdditionalPropertiesClientSpreadModelArrayOperations operations + :vartype additional_properties_client_spread_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadModelArrayOperations + :ivar additional_properties_client_spread_different_string: + AdditionalPropertiesClientSpreadDifferentStringOperations operations + :vartype additional_properties_client_spread_different_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentStringOperations + :ivar additional_properties_client_spread_different_float: + AdditionalPropertiesClientSpreadDifferentFloatOperations operations + :vartype additional_properties_client_spread_different_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations + :ivar additional_properties_client_spread_different_model: + AdditionalPropertiesClientSpreadDifferentModelOperations operations + :vartype additional_properties_client_spread_different_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelOperations + :ivar additional_properties_client_spread_different_model_array: + AdditionalPropertiesClientSpreadDifferentModelArrayOperations operations + :vartype additional_properties_client_spread_different_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations + :ivar additional_properties_client_extends_different_spread_string: + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations operations + :vartype additional_properties_client_extends_different_spread_string: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations + :ivar additional_properties_client_extends_different_spread_float: + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations operations + :vartype additional_properties_client_extends_different_spread_float: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations + :ivar additional_properties_client_extends_different_spread_model: + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations operations + :vartype additional_properties_client_extends_different_spread_model: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations + :ivar additional_properties_client_extends_different_spread_model_array: + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations operations + :vartype additional_properties_client_extends_different_spread_model_array: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_multiple_spread: + AdditionalPropertiesClientMultipleSpreadOperations operations + :vartype additional_properties_client_multiple_spread: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientMultipleSpreadOperations + :ivar additional_properties_client_spread_record_union: + AdditionalPropertiesClientSpreadRecordUnionOperations operations + :vartype additional_properties_client_spread_record_union: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations operations + :vartype additional_properties_client_spread_record_non_discriminated_union: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union2: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union2: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations + :ivar additional_properties_client_spread_record_non_discriminated_union3: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union3: + typetest.property.additionalproperties.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -164,73 +198,127 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.extends_unknown = ExtendsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_unknown_derived = ExtendsUnknownDerivedOperations( + self.additional_properties_client_extends_unknown = AdditionalPropertiesClientExtendsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_unknown_discriminated = ExtendsUnknownDiscriminatedOperations( - self._client, self._config, self._serialize, self._deserialize + self.additional_properties_client_extends_unknown_derived = ( + AdditionalPropertiesClientExtendsUnknownDerivedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_unknown_discriminated = ( + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.is_unknown = IsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_unknown_derived = IsUnknownDerivedOperations( + self.additional_properties_client_is_unknown = AdditionalPropertiesClientIsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_unknown_discriminated = IsUnknownDiscriminatedOperations( + self.additional_properties_client_is_unknown_derived = AdditionalPropertiesClientIsUnknownDerivedOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_string = ExtendsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_string = IsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_string = SpreadStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_float = ExtendsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_float = IsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_float = SpreadFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model = ExtendsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_model = IsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model = SpreadModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model_array = ExtendsModelArrayOperations( + self.additional_properties_client_is_unknown_discriminated = ( + AdditionalPropertiesClientIsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_string = AdditionalPropertiesClientExtendsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_model_array = IsModelArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model_array = SpreadModelArrayOperations( + self.additional_properties_client_is_string = AdditionalPropertiesClientIsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_string = SpreadDifferentStringOperations( + self.additional_properties_client_spread_string = AdditionalPropertiesClientSpreadStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_float = SpreadDifferentFloatOperations( + self.additional_properties_client_extends_float = AdditionalPropertiesClientExtendsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model = SpreadDifferentModelOperations( + self.additional_properties_client_is_float = AdditionalPropertiesClientIsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model_array = SpreadDifferentModelArrayOperations( + self.additional_properties_client_spread_float = AdditionalPropertiesClientSpreadFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_string = ExtendsDifferentSpreadStringOperations( + self.additional_properties_client_extends_model = AdditionalPropertiesClientExtendsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_float = ExtendsDifferentSpreadFloatOperations( + self.additional_properties_client_is_model = AdditionalPropertiesClientIsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model = ExtendsDifferentSpreadModelOperations( + self.additional_properties_client_spread_model = AdditionalPropertiesClientSpreadModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model_array = ExtendsDifferentSpreadModelArrayOperations( + self.additional_properties_client_extends_model_array = AdditionalPropertiesClientExtendsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.multiple_spread = MultipleSpreadOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_record_union = SpreadRecordUnionOperations( + self.additional_properties_client_is_model_array = AdditionalPropertiesClientIsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union = SpreadRecordNonDiscriminatedUnionOperations( + self.additional_properties_client_spread_model_array = AdditionalPropertiesClientSpreadModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union2 = SpreadRecordNonDiscriminatedUnion2Operations( + self.additional_properties_client_spread_different_string = ( + AdditionalPropertiesClientSpreadDifferentStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_float = ( + AdditionalPropertiesClientSpreadDifferentFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model = ( + AdditionalPropertiesClientSpreadDifferentModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model_array = ( + AdditionalPropertiesClientSpreadDifferentModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_string = ( + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_float = ( + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model_array = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_multiple_spread = AdditionalPropertiesClientMultipleSpreadOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union3 = SpreadRecordNonDiscriminatedUnion3Operations( + self.additional_properties_client_spread_record_union = AdditionalPropertiesClientSpreadRecordUnionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.additional_properties_client_spread_record_non_discriminated_union = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union2 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union3 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py index 944cc1e831..5f378f4a09 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/_client.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 from copy import deepcopy @@ -10,136 +11,167 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AdditionalPropertiesClientConfiguration from .operations import ( - ExtendsDifferentSpreadFloatOperations, - ExtendsDifferentSpreadModelArrayOperations, - ExtendsDifferentSpreadModelOperations, - ExtendsDifferentSpreadStringOperations, - ExtendsFloatOperations, - ExtendsModelArrayOperations, - ExtendsModelOperations, - ExtendsStringOperations, - ExtendsUnknownDerivedOperations, - ExtendsUnknownDiscriminatedOperations, - ExtendsUnknownOperations, - IsFloatOperations, - IsModelArrayOperations, - IsModelOperations, - IsStringOperations, - IsUnknownDerivedOperations, - IsUnknownDiscriminatedOperations, - IsUnknownOperations, - MultipleSpreadOperations, - SpreadDifferentFloatOperations, - SpreadDifferentModelArrayOperations, - SpreadDifferentModelOperations, - SpreadDifferentStringOperations, - SpreadFloatOperations, - SpreadModelArrayOperations, - SpreadModelOperations, - SpreadRecordNonDiscriminatedUnion2Operations, - SpreadRecordNonDiscriminatedUnion3Operations, - SpreadRecordNonDiscriminatedUnionOperations, - SpreadRecordUnionOperations, - SpreadStringOperations, + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations, + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations, + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations, + AdditionalPropertiesClientExtendsFloatOperations, + AdditionalPropertiesClientExtendsModelArrayOperations, + AdditionalPropertiesClientExtendsModelOperations, + AdditionalPropertiesClientExtendsStringOperations, + AdditionalPropertiesClientExtendsUnknownDerivedOperations, + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations, + AdditionalPropertiesClientExtendsUnknownOperations, + AdditionalPropertiesClientIsFloatOperations, + AdditionalPropertiesClientIsModelArrayOperations, + AdditionalPropertiesClientIsModelOperations, + AdditionalPropertiesClientIsStringOperations, + AdditionalPropertiesClientIsUnknownDerivedOperations, + AdditionalPropertiesClientIsUnknownDiscriminatedOperations, + AdditionalPropertiesClientIsUnknownOperations, + AdditionalPropertiesClientMultipleSpreadOperations, + AdditionalPropertiesClientSpreadDifferentFloatOperations, + AdditionalPropertiesClientSpreadDifferentModelArrayOperations, + AdditionalPropertiesClientSpreadDifferentModelOperations, + AdditionalPropertiesClientSpreadDifferentStringOperations, + AdditionalPropertiesClientSpreadFloatOperations, + AdditionalPropertiesClientSpreadModelArrayOperations, + AdditionalPropertiesClientSpreadModelOperations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations, + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations, + AdditionalPropertiesClientSpreadRecordUnionOperations, + AdditionalPropertiesClientSpreadStringOperations, ) class AdditionalPropertiesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Tests for additional properties of models. - :ivar extends_unknown: ExtendsUnknownOperations operations - :vartype extends_unknown: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownOperations - :ivar extends_unknown_derived: ExtendsUnknownDerivedOperations operations - :vartype extends_unknown_derived: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownDerivedOperations - :ivar extends_unknown_discriminated: ExtendsUnknownDiscriminatedOperations operations - :vartype extends_unknown_discriminated: - typetest.property.additionalproperties.aio.operations.ExtendsUnknownDiscriminatedOperations - :ivar is_unknown: IsUnknownOperations operations - :vartype is_unknown: typetest.property.additionalproperties.aio.operations.IsUnknownOperations - :ivar is_unknown_derived: IsUnknownDerivedOperations operations - :vartype is_unknown_derived: - typetest.property.additionalproperties.aio.operations.IsUnknownDerivedOperations - :ivar is_unknown_discriminated: IsUnknownDiscriminatedOperations operations - :vartype is_unknown_discriminated: - typetest.property.additionalproperties.aio.operations.IsUnknownDiscriminatedOperations - :ivar extends_string: ExtendsStringOperations operations - :vartype extends_string: - typetest.property.additionalproperties.aio.operations.ExtendsStringOperations - :ivar is_string: IsStringOperations operations - :vartype is_string: typetest.property.additionalproperties.aio.operations.IsStringOperations - :ivar spread_string: SpreadStringOperations operations - :vartype spread_string: - typetest.property.additionalproperties.aio.operations.SpreadStringOperations - :ivar extends_float: ExtendsFloatOperations operations - :vartype extends_float: - typetest.property.additionalproperties.aio.operations.ExtendsFloatOperations - :ivar is_float: IsFloatOperations operations - :vartype is_float: typetest.property.additionalproperties.aio.operations.IsFloatOperations - :ivar spread_float: SpreadFloatOperations operations - :vartype spread_float: - typetest.property.additionalproperties.aio.operations.SpreadFloatOperations - :ivar extends_model: ExtendsModelOperations operations - :vartype extends_model: - typetest.property.additionalproperties.aio.operations.ExtendsModelOperations - :ivar is_model: IsModelOperations operations - :vartype is_model: typetest.property.additionalproperties.aio.operations.IsModelOperations - :ivar spread_model: SpreadModelOperations operations - :vartype spread_model: - typetest.property.additionalproperties.aio.operations.SpreadModelOperations - :ivar extends_model_array: ExtendsModelArrayOperations operations - :vartype extends_model_array: - typetest.property.additionalproperties.aio.operations.ExtendsModelArrayOperations - :ivar is_model_array: IsModelArrayOperations operations - :vartype is_model_array: - typetest.property.additionalproperties.aio.operations.IsModelArrayOperations - :ivar spread_model_array: SpreadModelArrayOperations operations - :vartype spread_model_array: - typetest.property.additionalproperties.aio.operations.SpreadModelArrayOperations - :ivar spread_different_string: SpreadDifferentStringOperations operations - :vartype spread_different_string: - typetest.property.additionalproperties.aio.operations.SpreadDifferentStringOperations - :ivar spread_different_float: SpreadDifferentFloatOperations operations - :vartype spread_different_float: - typetest.property.additionalproperties.aio.operations.SpreadDifferentFloatOperations - :ivar spread_different_model: SpreadDifferentModelOperations operations - :vartype spread_different_model: - typetest.property.additionalproperties.aio.operations.SpreadDifferentModelOperations - :ivar spread_different_model_array: SpreadDifferentModelArrayOperations operations - :vartype spread_different_model_array: - typetest.property.additionalproperties.aio.operations.SpreadDifferentModelArrayOperations - :ivar extends_different_spread_string: ExtendsDifferentSpreadStringOperations operations - :vartype extends_different_spread_string: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadStringOperations - :ivar extends_different_spread_float: ExtendsDifferentSpreadFloatOperations operations - :vartype extends_different_spread_float: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadFloatOperations - :ivar extends_different_spread_model: ExtendsDifferentSpreadModelOperations operations - :vartype extends_different_spread_model: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelOperations - :ivar extends_different_spread_model_array: ExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_extends_unknown: + AdditionalPropertiesClientExtendsUnknownOperations operations + :vartype additional_properties_client_extends_unknown: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownOperations + :ivar additional_properties_client_extends_unknown_derived: + AdditionalPropertiesClientExtendsUnknownDerivedOperations operations + :vartype additional_properties_client_extends_unknown_derived: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDerivedOperations + :ivar additional_properties_client_extends_unknown_discriminated: + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_extends_unknown_discriminated: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations + :ivar additional_properties_client_is_unknown: AdditionalPropertiesClientIsUnknownOperations operations - :vartype extends_different_spread_model_array: - typetest.property.additionalproperties.aio.operations.ExtendsDifferentSpreadModelArrayOperations - :ivar multiple_spread: MultipleSpreadOperations operations - :vartype multiple_spread: - typetest.property.additionalproperties.aio.operations.MultipleSpreadOperations - :ivar spread_record_union: SpreadRecordUnionOperations operations - :vartype spread_record_union: - typetest.property.additionalproperties.aio.operations.SpreadRecordUnionOperations - :ivar spread_record_non_discriminated_union: SpreadRecordNonDiscriminatedUnionOperations + :vartype additional_properties_client_is_unknown: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownOperations + :ivar additional_properties_client_is_unknown_derived: + AdditionalPropertiesClientIsUnknownDerivedOperations operations + :vartype additional_properties_client_is_unknown_derived: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDerivedOperations + :ivar additional_properties_client_is_unknown_discriminated: + AdditionalPropertiesClientIsUnknownDiscriminatedOperations operations + :vartype additional_properties_client_is_unknown_discriminated: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsUnknownDiscriminatedOperations + :ivar additional_properties_client_extends_string: + AdditionalPropertiesClientExtendsStringOperations operations + :vartype additional_properties_client_extends_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsStringOperations + :ivar additional_properties_client_is_string: AdditionalPropertiesClientIsStringOperations operations - :vartype spread_record_non_discriminated_union: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnionOperations - :ivar spread_record_non_discriminated_union2: SpreadRecordNonDiscriminatedUnion2Operations + :vartype additional_properties_client_is_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsStringOperations + :ivar additional_properties_client_spread_string: + AdditionalPropertiesClientSpreadStringOperations operations + :vartype additional_properties_client_spread_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadStringOperations + :ivar additional_properties_client_extends_float: + AdditionalPropertiesClientExtendsFloatOperations operations + :vartype additional_properties_client_extends_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsFloatOperations + :ivar additional_properties_client_is_float: AdditionalPropertiesClientIsFloatOperations operations - :vartype spread_record_non_discriminated_union2: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion2Operations - :ivar spread_record_non_discriminated_union3: SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsFloatOperations + :ivar additional_properties_client_spread_float: + AdditionalPropertiesClientSpreadFloatOperations operations + :vartype additional_properties_client_spread_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadFloatOperations + :ivar additional_properties_client_extends_model: + AdditionalPropertiesClientExtendsModelOperations operations + :vartype additional_properties_client_extends_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelOperations + :ivar additional_properties_client_is_model: AdditionalPropertiesClientIsModelOperations operations - :vartype spread_record_non_discriminated_union3: - typetest.property.additionalproperties.aio.operations.SpreadRecordNonDiscriminatedUnion3Operations + :vartype additional_properties_client_is_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelOperations + :ivar additional_properties_client_spread_model: + AdditionalPropertiesClientSpreadModelOperations operations + :vartype additional_properties_client_spread_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelOperations + :ivar additional_properties_client_extends_model_array: + AdditionalPropertiesClientExtendsModelArrayOperations operations + :vartype additional_properties_client_extends_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsModelArrayOperations + :ivar additional_properties_client_is_model_array: + AdditionalPropertiesClientIsModelArrayOperations operations + :vartype additional_properties_client_is_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientIsModelArrayOperations + :ivar additional_properties_client_spread_model_array: + AdditionalPropertiesClientSpreadModelArrayOperations operations + :vartype additional_properties_client_spread_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadModelArrayOperations + :ivar additional_properties_client_spread_different_string: + AdditionalPropertiesClientSpreadDifferentStringOperations operations + :vartype additional_properties_client_spread_different_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentStringOperations + :ivar additional_properties_client_spread_different_float: + AdditionalPropertiesClientSpreadDifferentFloatOperations operations + :vartype additional_properties_client_spread_different_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentFloatOperations + :ivar additional_properties_client_spread_different_model: + AdditionalPropertiesClientSpreadDifferentModelOperations operations + :vartype additional_properties_client_spread_different_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelOperations + :ivar additional_properties_client_spread_different_model_array: + AdditionalPropertiesClientSpreadDifferentModelArrayOperations operations + :vartype additional_properties_client_spread_different_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadDifferentModelArrayOperations + :ivar additional_properties_client_extends_different_spread_string: + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations operations + :vartype additional_properties_client_extends_different_spread_string: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadStringOperations + :ivar additional_properties_client_extends_different_spread_float: + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations operations + :vartype additional_properties_client_extends_different_spread_float: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations + :ivar additional_properties_client_extends_different_spread_model: + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations operations + :vartype additional_properties_client_extends_different_spread_model: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelOperations + :ivar additional_properties_client_extends_different_spread_model_array: + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations operations + :vartype additional_properties_client_extends_different_spread_model_array: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations + :ivar additional_properties_client_multiple_spread: + AdditionalPropertiesClientMultipleSpreadOperations operations + :vartype additional_properties_client_multiple_spread: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientMultipleSpreadOperations + :ivar additional_properties_client_spread_record_union: + AdditionalPropertiesClientSpreadRecordUnionOperations operations + :vartype additional_properties_client_spread_record_union: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations operations + :vartype additional_properties_client_spread_record_non_discriminated_union: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations + :ivar additional_properties_client_spread_record_non_discriminated_union2: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union2: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations + :ivar additional_properties_client_spread_record_non_discriminated_union3: + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations operations + :vartype additional_properties_client_spread_record_non_discriminated_union3: + typetest.property.additionalproperties.aio.operations.AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -166,73 +198,127 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.extends_unknown = ExtendsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_unknown_derived = ExtendsUnknownDerivedOperations( + self.additional_properties_client_extends_unknown = AdditionalPropertiesClientExtendsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_unknown_discriminated = ExtendsUnknownDiscriminatedOperations( - self._client, self._config, self._serialize, self._deserialize + self.additional_properties_client_extends_unknown_derived = ( + AdditionalPropertiesClientExtendsUnknownDerivedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_unknown_discriminated = ( + AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) ) - self.is_unknown = IsUnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_unknown_derived = IsUnknownDerivedOperations( + self.additional_properties_client_is_unknown = AdditionalPropertiesClientIsUnknownOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_unknown_discriminated = IsUnknownDiscriminatedOperations( + self.additional_properties_client_is_unknown_derived = AdditionalPropertiesClientIsUnknownDerivedOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_string = ExtendsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_string = IsStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_string = SpreadStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_float = ExtendsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_float = IsFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_float = SpreadFloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model = ExtendsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.is_model = IsModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model = SpreadModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.extends_model_array = ExtendsModelArrayOperations( + self.additional_properties_client_is_unknown_discriminated = ( + AdditionalPropertiesClientIsUnknownDiscriminatedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_string = AdditionalPropertiesClientExtendsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.is_model_array = IsModelArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_model_array = SpreadModelArrayOperations( + self.additional_properties_client_is_string = AdditionalPropertiesClientIsStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_string = SpreadDifferentStringOperations( + self.additional_properties_client_spread_string = AdditionalPropertiesClientSpreadStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_float = SpreadDifferentFloatOperations( + self.additional_properties_client_extends_float = AdditionalPropertiesClientExtendsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model = SpreadDifferentModelOperations( + self.additional_properties_client_is_float = AdditionalPropertiesClientIsFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_different_model_array = SpreadDifferentModelArrayOperations( + self.additional_properties_client_spread_float = AdditionalPropertiesClientSpreadFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_string = ExtendsDifferentSpreadStringOperations( + self.additional_properties_client_extends_model = AdditionalPropertiesClientExtendsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_float = ExtendsDifferentSpreadFloatOperations( + self.additional_properties_client_is_model = AdditionalPropertiesClientIsModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model = ExtendsDifferentSpreadModelOperations( + self.additional_properties_client_spread_model = AdditionalPropertiesClientSpreadModelOperations( self._client, self._config, self._serialize, self._deserialize ) - self.extends_different_spread_model_array = ExtendsDifferentSpreadModelArrayOperations( + self.additional_properties_client_extends_model_array = AdditionalPropertiesClientExtendsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.multiple_spread = MultipleSpreadOperations(self._client, self._config, self._serialize, self._deserialize) - self.spread_record_union = SpreadRecordUnionOperations( + self.additional_properties_client_is_model_array = AdditionalPropertiesClientIsModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union = SpreadRecordNonDiscriminatedUnionOperations( + self.additional_properties_client_spread_model_array = AdditionalPropertiesClientSpreadModelArrayOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union2 = SpreadRecordNonDiscriminatedUnion2Operations( + self.additional_properties_client_spread_different_string = ( + AdditionalPropertiesClientSpreadDifferentStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_float = ( + AdditionalPropertiesClientSpreadDifferentFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model = ( + AdditionalPropertiesClientSpreadDifferentModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_different_model_array = ( + AdditionalPropertiesClientSpreadDifferentModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_string = ( + AdditionalPropertiesClientExtendsDifferentSpreadStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_float = ( + AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_extends_different_spread_model_array = ( + AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_multiple_spread = AdditionalPropertiesClientMultipleSpreadOperations( self._client, self._config, self._serialize, self._deserialize ) - self.spread_record_non_discriminated_union3 = SpreadRecordNonDiscriminatedUnion3Operations( + self.additional_properties_client_spread_record_union = AdditionalPropertiesClientSpreadRecordUnionOperations( self._client, self._config, self._serialize, self._deserialize ) + self.additional_properties_client_spread_record_non_discriminated_union = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union2 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) + self.additional_properties_client_spread_record_non_discriminated_union3 = ( + AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations( + self._client, self._config, self._serialize, self._deserialize + ) + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py index 9842e8086f..1d48f3fec7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/__init__.py @@ -6,74 +6,74 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExtendsUnknownOperations # type: ignore -from ._operations import ExtendsUnknownDerivedOperations # type: ignore -from ._operations import ExtendsUnknownDiscriminatedOperations # type: ignore -from ._operations import IsUnknownOperations # type: ignore -from ._operations import IsUnknownDerivedOperations # type: ignore -from ._operations import IsUnknownDiscriminatedOperations # type: ignore -from ._operations import ExtendsStringOperations # type: ignore -from ._operations import IsStringOperations # type: ignore -from ._operations import SpreadStringOperations # type: ignore -from ._operations import ExtendsFloatOperations # type: ignore -from ._operations import IsFloatOperations # type: ignore -from ._operations import SpreadFloatOperations # type: ignore -from ._operations import ExtendsModelOperations # type: ignore -from ._operations import IsModelOperations # type: ignore -from ._operations import SpreadModelOperations # type: ignore -from ._operations import ExtendsModelArrayOperations # type: ignore -from ._operations import IsModelArrayOperations # type: ignore -from ._operations import SpreadModelArrayOperations # type: ignore -from ._operations import SpreadDifferentStringOperations # type: ignore -from ._operations import SpreadDifferentFloatOperations # type: ignore -from ._operations import SpreadDifferentModelOperations # type: ignore -from ._operations import SpreadDifferentModelArrayOperations # type: ignore -from ._operations import ExtendsDifferentSpreadStringOperations # type: ignore -from ._operations import ExtendsDifferentSpreadFloatOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelArrayOperations # type: ignore -from ._operations import MultipleSpreadOperations # type: ignore -from ._operations import SpreadRecordUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion2Operations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion3Operations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientMultipleSpreadOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExtendsUnknownOperations", - "ExtendsUnknownDerivedOperations", - "ExtendsUnknownDiscriminatedOperations", - "IsUnknownOperations", - "IsUnknownDerivedOperations", - "IsUnknownDiscriminatedOperations", - "ExtendsStringOperations", - "IsStringOperations", - "SpreadStringOperations", - "ExtendsFloatOperations", - "IsFloatOperations", - "SpreadFloatOperations", - "ExtendsModelOperations", - "IsModelOperations", - "SpreadModelOperations", - "ExtendsModelArrayOperations", - "IsModelArrayOperations", - "SpreadModelArrayOperations", - "SpreadDifferentStringOperations", - "SpreadDifferentFloatOperations", - "SpreadDifferentModelOperations", - "SpreadDifferentModelArrayOperations", - "ExtendsDifferentSpreadStringOperations", - "ExtendsDifferentSpreadFloatOperations", - "ExtendsDifferentSpreadModelOperations", - "ExtendsDifferentSpreadModelArrayOperations", - "MultipleSpreadOperations", - "SpreadRecordUnionOperations", - "SpreadRecordNonDiscriminatedUnionOperations", - "SpreadRecordNonDiscriminatedUnion2Operations", - "SpreadRecordNonDiscriminatedUnion3Operations", + "AdditionalPropertiesClientExtendsUnknownOperations", + "AdditionalPropertiesClientExtendsUnknownDerivedOperations", + "AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientIsUnknownOperations", + "AdditionalPropertiesClientIsUnknownDerivedOperations", + "AdditionalPropertiesClientIsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientExtendsStringOperations", + "AdditionalPropertiesClientIsStringOperations", + "AdditionalPropertiesClientSpreadStringOperations", + "AdditionalPropertiesClientExtendsFloatOperations", + "AdditionalPropertiesClientIsFloatOperations", + "AdditionalPropertiesClientSpreadFloatOperations", + "AdditionalPropertiesClientExtendsModelOperations", + "AdditionalPropertiesClientIsModelOperations", + "AdditionalPropertiesClientSpreadModelOperations", + "AdditionalPropertiesClientExtendsModelArrayOperations", + "AdditionalPropertiesClientIsModelArrayOperations", + "AdditionalPropertiesClientSpreadModelArrayOperations", + "AdditionalPropertiesClientSpreadDifferentStringOperations", + "AdditionalPropertiesClientSpreadDifferentFloatOperations", + "AdditionalPropertiesClientSpreadDifferentModelOperations", + "AdditionalPropertiesClientSpreadDifferentModelArrayOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadStringOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations", + "AdditionalPropertiesClientMultipleSpreadOperations", + "AdditionalPropertiesClientSpreadRecordUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py index b4604e8977..f104232a28 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/aio/operations/_operations.py @@ -24,68 +24,68 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_extends_different_spread_float_get_request, - build_extends_different_spread_float_put_request, - build_extends_different_spread_model_array_get_request, - build_extends_different_spread_model_array_put_request, - build_extends_different_spread_model_get_request, - build_extends_different_spread_model_put_request, - build_extends_different_spread_string_get_request, - build_extends_different_spread_string_put_request, - build_extends_float_get_request, - build_extends_float_put_request, - build_extends_model_array_get_request, - build_extends_model_array_put_request, - build_extends_model_get_request, - build_extends_model_put_request, - build_extends_string_get_request, - build_extends_string_put_request, - build_extends_unknown_derived_get_request, - build_extends_unknown_derived_put_request, - build_extends_unknown_discriminated_get_request, - build_extends_unknown_discriminated_put_request, - build_extends_unknown_get_request, - build_extends_unknown_put_request, - build_is_float_get_request, - build_is_float_put_request, - build_is_model_array_get_request, - build_is_model_array_put_request, - build_is_model_get_request, - build_is_model_put_request, - build_is_string_get_request, - build_is_string_put_request, - build_is_unknown_derived_get_request, - build_is_unknown_derived_put_request, - build_is_unknown_discriminated_get_request, - build_is_unknown_discriminated_put_request, - build_is_unknown_get_request, - build_is_unknown_put_request, - build_multiple_spread_get_request, - build_multiple_spread_put_request, - build_spread_different_float_get_request, - build_spread_different_float_put_request, - build_spread_different_model_array_get_request, - build_spread_different_model_array_put_request, - build_spread_different_model_get_request, - build_spread_different_model_put_request, - build_spread_different_string_get_request, - build_spread_different_string_put_request, - build_spread_float_get_request, - build_spread_float_put_request, - build_spread_model_array_get_request, - build_spread_model_array_put_request, - build_spread_model_get_request, - build_spread_model_put_request, - build_spread_record_non_discriminated_union2_get_request, - build_spread_record_non_discriminated_union2_put_request, - build_spread_record_non_discriminated_union3_get_request, - build_spread_record_non_discriminated_union3_put_request, - build_spread_record_non_discriminated_union_get_request, - build_spread_record_non_discriminated_union_put_request, - build_spread_record_union_get_request, - build_spread_record_union_put_request, - build_spread_string_get_request, - build_spread_string_put_request, + build_additional_properties_client_extends_different_spread_float_get_request, + build_additional_properties_client_extends_different_spread_float_put_request, + build_additional_properties_client_extends_different_spread_model_array_get_request, + build_additional_properties_client_extends_different_spread_model_array_put_request, + build_additional_properties_client_extends_different_spread_model_get_request, + build_additional_properties_client_extends_different_spread_model_put_request, + build_additional_properties_client_extends_different_spread_string_get_request, + build_additional_properties_client_extends_different_spread_string_put_request, + build_additional_properties_client_extends_float_get_request, + build_additional_properties_client_extends_float_put_request, + build_additional_properties_client_extends_model_array_get_request, + build_additional_properties_client_extends_model_array_put_request, + build_additional_properties_client_extends_model_get_request, + build_additional_properties_client_extends_model_put_request, + build_additional_properties_client_extends_string_get_request, + build_additional_properties_client_extends_string_put_request, + build_additional_properties_client_extends_unknown_derived_get_request, + build_additional_properties_client_extends_unknown_derived_put_request, + build_additional_properties_client_extends_unknown_discriminated_get_request, + build_additional_properties_client_extends_unknown_discriminated_put_request, + build_additional_properties_client_extends_unknown_get_request, + build_additional_properties_client_extends_unknown_put_request, + build_additional_properties_client_is_float_get_request, + build_additional_properties_client_is_float_put_request, + build_additional_properties_client_is_model_array_get_request, + build_additional_properties_client_is_model_array_put_request, + build_additional_properties_client_is_model_get_request, + build_additional_properties_client_is_model_put_request, + build_additional_properties_client_is_string_get_request, + build_additional_properties_client_is_string_put_request, + build_additional_properties_client_is_unknown_derived_get_request, + build_additional_properties_client_is_unknown_derived_put_request, + build_additional_properties_client_is_unknown_discriminated_get_request, + build_additional_properties_client_is_unknown_discriminated_put_request, + build_additional_properties_client_is_unknown_get_request, + build_additional_properties_client_is_unknown_put_request, + build_additional_properties_client_multiple_spread_get_request, + build_additional_properties_client_multiple_spread_put_request, + build_additional_properties_client_spread_different_float_get_request, + build_additional_properties_client_spread_different_float_put_request, + build_additional_properties_client_spread_different_model_array_get_request, + build_additional_properties_client_spread_different_model_array_put_request, + build_additional_properties_client_spread_different_model_get_request, + build_additional_properties_client_spread_different_model_put_request, + build_additional_properties_client_spread_different_string_get_request, + build_additional_properties_client_spread_different_string_put_request, + build_additional_properties_client_spread_float_get_request, + build_additional_properties_client_spread_float_put_request, + build_additional_properties_client_spread_model_array_get_request, + build_additional_properties_client_spread_model_array_put_request, + build_additional_properties_client_spread_model_get_request, + build_additional_properties_client_spread_model_put_request, + build_additional_properties_client_spread_record_non_discriminated_union2_get_request, + build_additional_properties_client_spread_record_non_discriminated_union2_put_request, + build_additional_properties_client_spread_record_non_discriminated_union3_get_request, + build_additional_properties_client_spread_record_non_discriminated_union3_put_request, + build_additional_properties_client_spread_record_non_discriminated_union_get_request, + build_additional_properties_client_spread_record_non_discriminated_union_put_request, + build_additional_properties_client_spread_record_union_get_request, + build_additional_properties_client_spread_record_union_put_request, + build_additional_properties_client_spread_string_get_request, + build_additional_properties_client_spread_string_put_request, ) from .._configuration import AdditionalPropertiesClientConfiguration @@ -94,14 +94,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class ExtendsUnknownOperations: +class AdditionalPropertiesClientExtendsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown` attribute. + :attr:`additional_properties_client_extends_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -134,7 +134,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_unknown_get_request( + _request = build_additional_properties_client_extends_unknown_get_request( headers=_headers, params=_params, ) @@ -245,7 +245,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_put_request( + _request = build_additional_properties_client_extends_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -269,14 +269,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDerivedOperations: +class AdditionalPropertiesClientExtendsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown_derived` attribute. + :attr:`additional_properties_client_extends_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -310,7 +310,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_extends_unknown_derived_get_request( + _request = build_additional_properties_client_extends_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -427,7 +427,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_derived_put_request( + _request = build_additional_properties_client_extends_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -451,14 +451,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_unknown_discriminated` attribute. + :attr:`additional_properties_client_extends_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -492,7 +492,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_extends_unknown_discriminated_get_request( + _request = build_additional_properties_client_extends_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -609,7 +609,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_discriminated_put_request( + _request = build_additional_properties_client_extends_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -633,14 +633,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownOperations: +class AdditionalPropertiesClientIsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown` attribute. + :attr:`additional_properties_client_is_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -673,7 +673,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: cls: ClsType[_models.IsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_unknown_get_request( + _request = build_additional_properties_client_is_unknown_get_request( headers=_headers, params=_params, ) @@ -782,7 +782,7 @@ async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_put_request( + _request = build_additional_properties_client_is_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -806,14 +806,14 @@ async def put(self, body: Union[_models.IsUnknownAdditionalProperties, JSON, IO[ return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDerivedOperations: +class AdditionalPropertiesClientIsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown_derived` attribute. + :attr:`additional_properties_client_is_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -846,7 +846,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDeriv cls: ClsType[_models.IsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_is_unknown_derived_get_request( + _request = build_additional_properties_client_is_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -961,7 +961,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_derived_put_request( + _request = build_additional_properties_client_is_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -985,14 +985,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientIsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_unknown_discriminated` attribute. + :attr:`additional_properties_client_is_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1026,7 +1026,7 @@ async def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscr cls: ClsType[_models.IsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_is_unknown_discriminated_get_request( + _request = build_additional_properties_client_is_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -1143,7 +1143,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_discriminated_put_request( + _request = build_additional_properties_client_is_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1167,14 +1167,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class ExtendsStringOperations: +class AdditionalPropertiesClientExtendsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_string` attribute. + :attr:`additional_properties_client_extends_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1207,7 +1207,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: cls: ClsType[_models.ExtendsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_string_get_request( + _request = build_additional_properties_client_extends_string_get_request( headers=_headers, params=_params, ) @@ -1316,7 +1316,7 @@ async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_string_put_request( + _request = build_additional_properties_client_extends_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1340,14 +1340,14 @@ async def put(self, body: Union[_models.ExtendsStringAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsStringOperations: +class AdditionalPropertiesClientIsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_string` attribute. + :attr:`additional_properties_client_is_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1380,7 +1380,7 @@ async def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: cls: ClsType[_models.IsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_string_get_request( + _request = build_additional_properties_client_is_string_get_request( headers=_headers, params=_params, ) @@ -1489,7 +1489,7 @@ async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_string_put_request( + _request = build_additional_properties_client_is_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1513,14 +1513,14 @@ async def put(self, body: Union[_models.IsStringAdditionalProperties, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class SpreadStringOperations: +class AdditionalPropertiesClientSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_string` attribute. + :attr:`additional_properties_client_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1552,7 +1552,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadStringRecord: cls: ClsType[_models.SpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_string_get_request( + _request = build_additional_properties_client_spread_string_get_request( headers=_headers, params=_params, ) @@ -1660,7 +1660,7 @@ async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_string_put_request( + _request = build_additional_properties_client_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1684,14 +1684,14 @@ async def put(self, body: Union[_models.SpreadStringRecord, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class ExtendsFloatOperations: +class AdditionalPropertiesClientExtendsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_float` attribute. + :attr:`additional_properties_client_extends_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1724,7 +1724,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: cls: ClsType[_models.ExtendsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_float_get_request( + _request = build_additional_properties_client_extends_float_get_request( headers=_headers, params=_params, ) @@ -1833,7 +1833,7 @@ async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_float_put_request( + _request = build_additional_properties_client_extends_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1857,14 +1857,14 @@ async def put(self, body: Union[_models.ExtendsFloatAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsFloatOperations: +class AdditionalPropertiesClientIsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_float` attribute. + :attr:`additional_properties_client_is_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1897,7 +1897,7 @@ async def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: cls: ClsType[_models.IsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_float_get_request( + _request = build_additional_properties_client_is_float_get_request( headers=_headers, params=_params, ) @@ -2006,7 +2006,7 @@ async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_float_put_request( + _request = build_additional_properties_client_is_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2030,14 +2030,14 @@ async def put(self, body: Union[_models.IsFloatAdditionalProperties, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadFloatOperations: +class AdditionalPropertiesClientSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_float` attribute. + :attr:`additional_properties_client_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2069,7 +2069,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: cls: ClsType[_models.SpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_float_get_request( + _request = build_additional_properties_client_spread_float_get_request( headers=_headers, params=_params, ) @@ -2177,7 +2177,7 @@ async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_float_put_request( + _request = build_additional_properties_client_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2201,14 +2201,14 @@ async def put(self, body: Union[_models.SpreadFloatRecord, JSON, IO[bytes]], **k return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelOperations: +class AdditionalPropertiesClientExtendsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_model` attribute. + :attr:`additional_properties_client_extends_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2241,7 +2241,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: cls: ClsType[_models.ExtendsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_get_request( + _request = build_additional_properties_client_extends_model_get_request( headers=_headers, params=_params, ) @@ -2350,7 +2350,7 @@ async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_put_request( + _request = build_additional_properties_client_extends_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2374,14 +2374,14 @@ async def put(self, body: Union[_models.ExtendsModelAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class IsModelOperations: +class AdditionalPropertiesClientIsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_model` attribute. + :attr:`additional_properties_client_is_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2414,7 +2414,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: cls: ClsType[_models.IsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_get_request( + _request = build_additional_properties_client_is_model_get_request( headers=_headers, params=_params, ) @@ -2523,7 +2523,7 @@ async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_put_request( + _request = build_additional_properties_client_is_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2547,14 +2547,14 @@ async def put(self, body: Union[_models.IsModelAdditionalProperties, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelOperations: +class AdditionalPropertiesClientSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_model` attribute. + :attr:`additional_properties_client_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2586,7 +2586,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelRecord: cls: ClsType[_models.SpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_model_get_request( + _request = build_additional_properties_client_spread_model_get_request( headers=_headers, params=_params, ) @@ -2694,7 +2694,7 @@ async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_put_request( + _request = build_additional_properties_client_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2718,14 +2718,14 @@ async def put(self, body: Union[_models.SpreadModelRecord, JSON, IO[bytes]], **k return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelArrayOperations: +class AdditionalPropertiesClientExtendsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_model_array` attribute. + :attr:`additional_properties_client_extends_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2758,7 +2758,7 @@ async def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalPropert cls: ClsType[_models.ExtendsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_array_get_request( + _request = build_additional_properties_client_extends_model_array_get_request( headers=_headers, params=_params, ) @@ -2875,7 +2875,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_array_put_request( + _request = build_additional_properties_client_extends_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2899,14 +2899,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class IsModelArrayOperations: +class AdditionalPropertiesClientIsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`is_model_array` attribute. + :attr:`additional_properties_client_is_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2939,7 +2939,7 @@ async def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: cls: ClsType[_models.IsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_array_get_request( + _request = build_additional_properties_client_is_model_array_get_request( headers=_headers, params=_params, ) @@ -3048,7 +3048,7 @@ async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_array_put_request( + _request = build_additional_properties_client_is_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3072,14 +3072,14 @@ async def put(self, body: Union[_models.IsModelArrayAdditionalProperties, JSON, return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelArrayOperations: +class AdditionalPropertiesClientSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_model_array` attribute. + :attr:`additional_properties_client_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3111,7 +3111,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: cls: ClsType[_models.SpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_model_array_get_request( + _request = build_additional_properties_client_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -3220,7 +3220,7 @@ async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_array_put_request( + _request = build_additional_properties_client_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3244,14 +3244,14 @@ async def put(self, body: Union[_models.SpreadModelArrayRecord, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentStringOperations: +class AdditionalPropertiesClientSpreadDifferentStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_string` attribute. + :attr:`additional_properties_client_spread_different_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3284,7 +3284,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: cls: ClsType[_models.DifferentSpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_different_string_get_request( + _request = build_additional_properties_client_spread_different_string_get_request( headers=_headers, params=_params, ) @@ -3393,7 +3393,7 @@ async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_string_put_request( + _request = build_additional_properties_client_spread_different_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3417,14 +3417,14 @@ async def put(self, body: Union[_models.DifferentSpreadStringRecord, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentFloatOperations: +class AdditionalPropertiesClientSpreadDifferentFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_float` attribute. + :attr:`additional_properties_client_spread_different_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3457,7 +3457,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: cls: ClsType[_models.DifferentSpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_different_float_get_request( + _request = build_additional_properties_client_spread_different_float_get_request( headers=_headers, params=_params, ) @@ -3566,7 +3566,7 @@ async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_float_put_request( + _request = build_additional_properties_client_spread_different_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3590,14 +3590,14 @@ async def put(self, body: Union[_models.DifferentSpreadFloatRecord, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelOperations: +class AdditionalPropertiesClientSpreadDifferentModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_model` attribute. + :attr:`additional_properties_client_spread_different_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3630,7 +3630,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: cls: ClsType[_models.DifferentSpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_get_request( + _request = build_additional_properties_client_spread_different_model_get_request( headers=_headers, params=_params, ) @@ -3739,7 +3739,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_put_request( + _request = build_additional_properties_client_spread_different_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3763,14 +3763,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelRecord, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelArrayOperations: +class AdditionalPropertiesClientSpreadDifferentModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_different_model_array` attribute. + :attr:`additional_properties_client_spread_different_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3803,7 +3803,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: cls: ClsType[_models.DifferentSpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_array_get_request( + _request = build_additional_properties_client_spread_different_model_array_get_request( headers=_headers, params=_params, ) @@ -3912,7 +3912,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_array_put_request( + _request = build_additional_properties_client_spread_different_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3936,14 +3936,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayRecord, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadStringOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_string` attribute. + :attr:`additional_properties_client_extends_different_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3976,7 +3976,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: cls: ClsType[_models.DifferentSpreadStringDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_string_get_request( + _request = build_additional_properties_client_extends_different_spread_string_get_request( headers=_headers, params=_params, ) @@ -4085,7 +4085,7 @@ async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_string_put_request( + _request = build_additional_properties_client_extends_different_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4109,14 +4109,14 @@ async def put(self, body: Union[_models.DifferentSpreadStringDerived, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadFloatOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_float` attribute. + :attr:`additional_properties_client_extends_different_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4149,7 +4149,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: cls: ClsType[_models.DifferentSpreadFloatDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_float_get_request( + _request = build_additional_properties_client_extends_different_spread_float_get_request( headers=_headers, params=_params, ) @@ -4258,7 +4258,7 @@ async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_float_put_request( + _request = build_additional_properties_client_extends_different_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4282,14 +4282,14 @@ async def put(self, body: Union[_models.DifferentSpreadFloatDerived, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model` attribute. + :attr:`additional_properties_client_extends_different_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4322,7 +4322,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: cls: ClsType[_models.DifferentSpreadModelDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_get_request( + _request = build_additional_properties_client_extends_different_spread_model_get_request( headers=_headers, params=_params, ) @@ -4431,7 +4431,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_put_request( + _request = build_additional_properties_client_extends_different_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4455,14 +4455,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelDerived, JSON, IO[by return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model_array` attribute. + :attr:`additional_properties_client_extends_different_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4495,7 +4495,7 @@ async def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: cls: ClsType[_models.DifferentSpreadModelArrayDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_array_get_request( + _request = build_additional_properties_client_extends_different_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -4604,7 +4604,7 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_array_put_request( + _request = build_additional_properties_client_extends_different_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4628,14 +4628,14 @@ async def put(self, body: Union[_models.DifferentSpreadModelArrayDerived, JSON, return cls(pipeline_response, None, {}) # type: ignore -class MultipleSpreadOperations: +class AdditionalPropertiesClientMultipleSpreadOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`multiple_spread` attribute. + :attr:`additional_properties_client_multiple_spread` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4667,7 +4667,7 @@ async def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: cls: ClsType[_models.MultipleSpreadRecord] = kwargs.pop("cls", None) - _request = build_multiple_spread_get_request( + _request = build_additional_properties_client_multiple_spread_get_request( headers=_headers, params=_params, ) @@ -4776,7 +4776,7 @@ async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_multiple_spread_put_request( + _request = build_additional_properties_client_multiple_spread_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4800,14 +4800,14 @@ async def put(self, body: Union[_models.MultipleSpreadRecord, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordUnionOperations: +class AdditionalPropertiesClientSpreadRecordUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_union` attribute. + :attr:`additional_properties_client_spread_record_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4839,7 +4839,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: cls: ClsType[_models.SpreadRecordForUnion] = kwargs.pop("cls", None) - _request = build_spread_record_union_get_request( + _request = build_additional_properties_client_spread_record_union_get_request( headers=_headers, params=_params, ) @@ -4948,7 +4948,7 @@ async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_union_put_request( + _request = build_additional_properties_client_spread_record_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4972,14 +4972,14 @@ async def put(self, body: Union[_models.SpreadRecordForUnion, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5012,7 +5012,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_get_request( headers=_headers, params=_params, ) @@ -5127,7 +5127,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5151,14 +5151,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union2` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5191,7 +5191,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion2] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union2_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_get_request( headers=_headers, params=_params, ) @@ -5308,7 +5308,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union2_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5332,14 +5332,14 @@ async def put( return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.aio.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union3` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5372,7 +5372,7 @@ async def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUni cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion3] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union3_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_get_request( headers=_headers, params=_params, ) @@ -5489,7 +5489,7 @@ async def put( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union3_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py index 9842e8086f..1d48f3fec7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/__init__.py @@ -6,74 +6,74 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import ExtendsUnknownOperations # type: ignore -from ._operations import ExtendsUnknownDerivedOperations # type: ignore -from ._operations import ExtendsUnknownDiscriminatedOperations # type: ignore -from ._operations import IsUnknownOperations # type: ignore -from ._operations import IsUnknownDerivedOperations # type: ignore -from ._operations import IsUnknownDiscriminatedOperations # type: ignore -from ._operations import ExtendsStringOperations # type: ignore -from ._operations import IsStringOperations # type: ignore -from ._operations import SpreadStringOperations # type: ignore -from ._operations import ExtendsFloatOperations # type: ignore -from ._operations import IsFloatOperations # type: ignore -from ._operations import SpreadFloatOperations # type: ignore -from ._operations import ExtendsModelOperations # type: ignore -from ._operations import IsModelOperations # type: ignore -from ._operations import SpreadModelOperations # type: ignore -from ._operations import ExtendsModelArrayOperations # type: ignore -from ._operations import IsModelArrayOperations # type: ignore -from ._operations import SpreadModelArrayOperations # type: ignore -from ._operations import SpreadDifferentStringOperations # type: ignore -from ._operations import SpreadDifferentFloatOperations # type: ignore -from ._operations import SpreadDifferentModelOperations # type: ignore -from ._operations import SpreadDifferentModelArrayOperations # type: ignore -from ._operations import ExtendsDifferentSpreadStringOperations # type: ignore -from ._operations import ExtendsDifferentSpreadFloatOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelOperations # type: ignore -from ._operations import ExtendsDifferentSpreadModelArrayOperations # type: ignore -from ._operations import MultipleSpreadOperations # type: ignore -from ._operations import SpreadRecordUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnionOperations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion2Operations # type: ignore -from ._operations import SpreadRecordNonDiscriminatedUnion3Operations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDerivedOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsUnknownDiscriminatedOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientIsModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadDifferentModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadStringOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelOperations # type: ignore +from ._operations import AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations # type: ignore +from ._operations import AdditionalPropertiesClientMultipleSpreadOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations # type: ignore +from ._operations import AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "ExtendsUnknownOperations", - "ExtendsUnknownDerivedOperations", - "ExtendsUnknownDiscriminatedOperations", - "IsUnknownOperations", - "IsUnknownDerivedOperations", - "IsUnknownDiscriminatedOperations", - "ExtendsStringOperations", - "IsStringOperations", - "SpreadStringOperations", - "ExtendsFloatOperations", - "IsFloatOperations", - "SpreadFloatOperations", - "ExtendsModelOperations", - "IsModelOperations", - "SpreadModelOperations", - "ExtendsModelArrayOperations", - "IsModelArrayOperations", - "SpreadModelArrayOperations", - "SpreadDifferentStringOperations", - "SpreadDifferentFloatOperations", - "SpreadDifferentModelOperations", - "SpreadDifferentModelArrayOperations", - "ExtendsDifferentSpreadStringOperations", - "ExtendsDifferentSpreadFloatOperations", - "ExtendsDifferentSpreadModelOperations", - "ExtendsDifferentSpreadModelArrayOperations", - "MultipleSpreadOperations", - "SpreadRecordUnionOperations", - "SpreadRecordNonDiscriminatedUnionOperations", - "SpreadRecordNonDiscriminatedUnion2Operations", - "SpreadRecordNonDiscriminatedUnion3Operations", + "AdditionalPropertiesClientExtendsUnknownOperations", + "AdditionalPropertiesClientExtendsUnknownDerivedOperations", + "AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientIsUnknownOperations", + "AdditionalPropertiesClientIsUnknownDerivedOperations", + "AdditionalPropertiesClientIsUnknownDiscriminatedOperations", + "AdditionalPropertiesClientExtendsStringOperations", + "AdditionalPropertiesClientIsStringOperations", + "AdditionalPropertiesClientSpreadStringOperations", + "AdditionalPropertiesClientExtendsFloatOperations", + "AdditionalPropertiesClientIsFloatOperations", + "AdditionalPropertiesClientSpreadFloatOperations", + "AdditionalPropertiesClientExtendsModelOperations", + "AdditionalPropertiesClientIsModelOperations", + "AdditionalPropertiesClientSpreadModelOperations", + "AdditionalPropertiesClientExtendsModelArrayOperations", + "AdditionalPropertiesClientIsModelArrayOperations", + "AdditionalPropertiesClientSpreadModelArrayOperations", + "AdditionalPropertiesClientSpreadDifferentStringOperations", + "AdditionalPropertiesClientSpreadDifferentFloatOperations", + "AdditionalPropertiesClientSpreadDifferentModelOperations", + "AdditionalPropertiesClientSpreadDifferentModelArrayOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadStringOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelOperations", + "AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations", + "AdditionalPropertiesClientMultipleSpreadOperations", + "AdditionalPropertiesClientSpreadRecordUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations", + "AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py index a40ca321d8..9aa794662f 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-additionalproperties/typetest/property/additionalproperties/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 from collections.abc import MutableMapping from io import IOBase @@ -33,7 +33,9 @@ _SERIALIZER.client_side_validation = False -def build_extends_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_unknown_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -47,7 +49,9 @@ def build_extends_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_unknown_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -61,7 +65,9 @@ def build_extends_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_derived_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -75,7 +81,9 @@ def build_extends_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_derived_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -89,7 +97,9 @@ def build_extends_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_discriminated_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -103,7 +113,9 @@ def build_extends_unknown_discriminated_get_request(**kwargs: Any) -> HttpReques return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_unknown_discriminated_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -117,7 +129,9 @@ def build_extends_unknown_discriminated_put_request(**kwargs: Any) -> HttpReques return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -131,7 +145,9 @@ def build_is_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -145,7 +161,9 @@ def build_is_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_derived_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -159,7 +177,9 @@ def build_is_unknown_derived_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_unknown_derived_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -173,7 +193,9 @@ def build_is_unknown_derived_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_is_unknown_discriminated_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -187,7 +209,9 @@ def build_is_unknown_discriminated_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_is_unknown_discriminated_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -201,7 +225,9 @@ def build_is_unknown_discriminated_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -215,7 +241,9 @@ def build_extends_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -229,7 +257,9 @@ def build_extends_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -243,7 +273,9 @@ def build_is_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -257,7 +289,9 @@ def build_is_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_string_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -271,7 +305,9 @@ def build_spread_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_string_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -285,7 +321,9 @@ def build_spread_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -299,7 +337,9 @@ def build_extends_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -313,7 +353,9 @@ def build_extends_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -327,7 +369,9 @@ def build_is_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -341,7 +385,9 @@ def build_is_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -355,7 +401,9 @@ def build_spread_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -369,7 +417,9 @@ def build_spread_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -383,7 +433,9 @@ def build_extends_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -397,7 +449,9 @@ def build_extends_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -411,7 +465,9 @@ def build_is_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -425,7 +481,9 @@ def build_is_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -439,7 +497,9 @@ def build_spread_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -453,7 +513,9 @@ def build_spread_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -467,7 +529,9 @@ def build_extends_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_extends_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -481,7 +545,9 @@ def build_extends_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_is_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -495,7 +561,9 @@ def build_is_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_is_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_is_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -509,7 +577,9 @@ def build_is_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_model_array_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -523,7 +593,9 @@ def build_spread_model_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_model_array_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -537,7 +609,9 @@ def build_spread_model_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -551,7 +625,9 @@ def build_spread_different_string_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -565,7 +641,9 @@ def build_spread_different_string_put_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_float_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -579,7 +657,9 @@ def build_spread_different_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_float_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -593,7 +673,9 @@ def build_spread_different_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -607,7 +689,9 @@ def build_spread_different_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_different_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -621,7 +705,9 @@ def build_spread_different_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_model_array_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -635,7 +721,9 @@ def build_spread_different_model_array_get_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_different_model_array_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_spread_different_model_array_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -649,7 +737,9 @@ def build_spread_different_model_array_put_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -663,7 +753,9 @@ def build_extends_different_spread_string_get_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -677,7 +769,9 @@ def build_extends_different_spread_string_put_request(**kwargs: Any) -> HttpRequ return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_float_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_float_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -691,7 +785,9 @@ def build_extends_different_spread_float_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_float_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_float_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -705,7 +801,9 @@ def build_extends_different_spread_float_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -719,7 +817,9 @@ def build_extends_different_spread_model_get_request(**kwargs: Any) -> HttpReque return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -733,7 +833,7 @@ def build_extends_different_spread_model_put_request(**kwargs: Any) -> HttpReque return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_array_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_array_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -749,7 +849,7 @@ def build_extends_different_spread_model_array_get_request( # pylint: disable=n return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extends_different_spread_model_array_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_extends_different_spread_model_array_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -765,7 +865,9 @@ def build_extends_different_spread_model_array_put_request( # pylint: disable=n return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_multiple_spread_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_multiple_spread_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -779,7 +881,9 @@ def build_multiple_spread_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_multiple_spread_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_multiple_spread_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -793,7 +897,9 @@ def build_multiple_spread_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_union_get_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_record_union_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -807,7 +913,9 @@ def build_spread_record_union_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_union_put_request(**kwargs: Any) -> HttpRequest: +def build_additional_properties_client_spread_record_union_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -821,7 +929,7 @@ def build_spread_record_union_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -837,7 +945,7 @@ def build_spread_record_non_discriminated_union_get_request( # pylint: disable= return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -853,7 +961,7 @@ def build_spread_record_non_discriminated_union_put_request( # pylint: disable= return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union2_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union2_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -869,7 +977,7 @@ def build_spread_record_non_discriminated_union2_get_request( # pylint: disable return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union2_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union2_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -885,7 +993,7 @@ def build_spread_record_non_discriminated_union2_put_request( # pylint: disable return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union3_get_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union3_get_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -901,7 +1009,7 @@ def build_spread_record_non_discriminated_union3_get_request( # pylint: disable return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_spread_record_non_discriminated_union3_put_request( # pylint: disable=name-too-long +def build_additional_properties_client_spread_record_non_discriminated_union3_put_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -917,14 +1025,14 @@ def build_spread_record_non_discriminated_union3_put_request( # pylint: disable return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class ExtendsUnknownOperations: +class AdditionalPropertiesClientExtendsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown` attribute. + :attr:`additional_properties_client_extends_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -957,7 +1065,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalProperties: cls: ClsType[_models.ExtendsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_unknown_get_request( + _request = build_additional_properties_client_extends_unknown_get_request( headers=_headers, params=_params, ) @@ -1068,7 +1176,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_put_request( + _request = build_additional_properties_client_extends_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1092,14 +1200,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDerivedOperations: +class AdditionalPropertiesClientExtendsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown_derived` attribute. + :attr:`additional_properties_client_extends_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1133,7 +1241,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDerive cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_extends_unknown_derived_get_request( + _request = build_additional_properties_client_extends_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -1250,7 +1358,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_derived_put_request( + _request = build_additional_properties_client_extends_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1274,14 +1382,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientExtendsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_unknown_discriminated` attribute. + :attr:`additional_properties_client_extends_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1315,7 +1423,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsUnknownAdditionalPropertiesDiscri cls: ClsType[_models.ExtendsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_extends_unknown_discriminated_get_request( + _request = build_additional_properties_client_extends_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -1432,7 +1540,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_unknown_discriminated_put_request( + _request = build_additional_properties_client_extends_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1456,14 +1564,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownOperations: +class AdditionalPropertiesClientIsUnknownOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown` attribute. + :attr:`additional_properties_client_is_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1496,7 +1604,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalProperties: cls: ClsType[_models.IsUnknownAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_unknown_get_request( + _request = build_additional_properties_client_is_unknown_get_request( headers=_headers, params=_params, ) @@ -1607,7 +1715,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_put_request( + _request = build_additional_properties_client_is_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1631,14 +1739,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDerivedOperations: +class AdditionalPropertiesClientIsUnknownDerivedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown_derived` attribute. + :attr:`additional_properties_client_is_unknown_derived` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1671,7 +1779,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDerived: cls: ClsType[_models.IsUnknownAdditionalPropertiesDerived] = kwargs.pop("cls", None) - _request = build_is_unknown_derived_get_request( + _request = build_additional_properties_client_is_unknown_derived_get_request( headers=_headers, params=_params, ) @@ -1786,7 +1894,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_derived_put_request( + _request = build_additional_properties_client_is_unknown_derived_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1810,14 +1918,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsUnknownDiscriminatedOperations: +class AdditionalPropertiesClientIsUnknownDiscriminatedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_unknown_discriminated` attribute. + :attr:`additional_properties_client_is_unknown_discriminated` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1851,7 +1959,7 @@ def get(self, **kwargs: Any) -> _models.IsUnknownAdditionalPropertiesDiscriminat cls: ClsType[_models.IsUnknownAdditionalPropertiesDiscriminated] = kwargs.pop("cls", None) - _request = build_is_unknown_discriminated_get_request( + _request = build_additional_properties_client_is_unknown_discriminated_get_request( headers=_headers, params=_params, ) @@ -1968,7 +2076,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_unknown_discriminated_put_request( + _request = build_additional_properties_client_is_unknown_discriminated_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1992,14 +2100,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsStringOperations: +class AdditionalPropertiesClientExtendsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_string` attribute. + :attr:`additional_properties_client_extends_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2032,7 +2140,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsStringAdditionalProperties: cls: ClsType[_models.ExtendsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_string_get_request( + _request = build_additional_properties_client_extends_string_get_request( headers=_headers, params=_params, ) @@ -2143,7 +2251,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_string_put_request( + _request = build_additional_properties_client_extends_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2167,14 +2275,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsStringOperations: +class AdditionalPropertiesClientIsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_string` attribute. + :attr:`additional_properties_client_is_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2207,7 +2315,7 @@ def get(self, **kwargs: Any) -> _models.IsStringAdditionalProperties: cls: ClsType[_models.IsStringAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_string_get_request( + _request = build_additional_properties_client_is_string_get_request( headers=_headers, params=_params, ) @@ -2318,7 +2426,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_string_put_request( + _request = build_additional_properties_client_is_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2342,14 +2450,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadStringOperations: +class AdditionalPropertiesClientSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_string` attribute. + :attr:`additional_properties_client_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2381,7 +2489,7 @@ def get(self, **kwargs: Any) -> _models.SpreadStringRecord: cls: ClsType[_models.SpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_string_get_request( + _request = build_additional_properties_client_spread_string_get_request( headers=_headers, params=_params, ) @@ -2489,7 +2597,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_string_put_request( + _request = build_additional_properties_client_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2513,14 +2621,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsFloatOperations: +class AdditionalPropertiesClientExtendsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_float` attribute. + :attr:`additional_properties_client_extends_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2553,7 +2661,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsFloatAdditionalProperties: cls: ClsType[_models.ExtendsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_float_get_request( + _request = build_additional_properties_client_extends_float_get_request( headers=_headers, params=_params, ) @@ -2664,7 +2772,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_float_put_request( + _request = build_additional_properties_client_extends_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2688,14 +2796,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsFloatOperations: +class AdditionalPropertiesClientIsFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_float` attribute. + :attr:`additional_properties_client_is_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2728,7 +2836,7 @@ def get(self, **kwargs: Any) -> _models.IsFloatAdditionalProperties: cls: ClsType[_models.IsFloatAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_float_get_request( + _request = build_additional_properties_client_is_float_get_request( headers=_headers, params=_params, ) @@ -2839,7 +2947,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_float_put_request( + _request = build_additional_properties_client_is_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2863,14 +2971,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadFloatOperations: +class AdditionalPropertiesClientSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_float` attribute. + :attr:`additional_properties_client_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2902,7 +3010,7 @@ def get(self, **kwargs: Any) -> _models.SpreadFloatRecord: cls: ClsType[_models.SpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_float_get_request( + _request = build_additional_properties_client_spread_float_get_request( headers=_headers, params=_params, ) @@ -3010,7 +3118,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_float_put_request( + _request = build_additional_properties_client_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3034,14 +3142,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelOperations: +class AdditionalPropertiesClientExtendsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_model` attribute. + :attr:`additional_properties_client_extends_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3074,7 +3182,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelAdditionalProperties: cls: ClsType[_models.ExtendsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_get_request( + _request = build_additional_properties_client_extends_model_get_request( headers=_headers, params=_params, ) @@ -3185,7 +3293,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_put_request( + _request = build_additional_properties_client_extends_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3209,14 +3317,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsModelOperations: +class AdditionalPropertiesClientIsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_model` attribute. + :attr:`additional_properties_client_is_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3249,7 +3357,7 @@ def get(self, **kwargs: Any) -> _models.IsModelAdditionalProperties: cls: ClsType[_models.IsModelAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_get_request( + _request = build_additional_properties_client_is_model_get_request( headers=_headers, params=_params, ) @@ -3360,7 +3468,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_put_request( + _request = build_additional_properties_client_is_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3384,14 +3492,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelOperations: +class AdditionalPropertiesClientSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_model` attribute. + :attr:`additional_properties_client_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3423,7 +3531,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelRecord: cls: ClsType[_models.SpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_model_get_request( + _request = build_additional_properties_client_spread_model_get_request( headers=_headers, params=_params, ) @@ -3531,7 +3639,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_put_request( + _request = build_additional_properties_client_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3555,14 +3663,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsModelArrayOperations: +class AdditionalPropertiesClientExtendsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_model_array` attribute. + :attr:`additional_properties_client_extends_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3595,7 +3703,7 @@ def get(self, **kwargs: Any) -> _models.ExtendsModelArrayAdditionalProperties: cls: ClsType[_models.ExtendsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_extends_model_array_get_request( + _request = build_additional_properties_client_extends_model_array_get_request( headers=_headers, params=_params, ) @@ -3712,7 +3820,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_model_array_put_request( + _request = build_additional_properties_client_extends_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3736,14 +3844,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IsModelArrayOperations: +class AdditionalPropertiesClientIsModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`is_model_array` attribute. + :attr:`additional_properties_client_is_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3776,7 +3884,7 @@ def get(self, **kwargs: Any) -> _models.IsModelArrayAdditionalProperties: cls: ClsType[_models.IsModelArrayAdditionalProperties] = kwargs.pop("cls", None) - _request = build_is_model_array_get_request( + _request = build_additional_properties_client_is_model_array_get_request( headers=_headers, params=_params, ) @@ -3887,7 +3995,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_is_model_array_put_request( + _request = build_additional_properties_client_is_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3911,14 +4019,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadModelArrayOperations: +class AdditionalPropertiesClientSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_model_array` attribute. + :attr:`additional_properties_client_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3950,7 +4058,7 @@ def get(self, **kwargs: Any) -> _models.SpreadModelArrayRecord: cls: ClsType[_models.SpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_model_array_get_request( + _request = build_additional_properties_client_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -4061,7 +4169,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_model_array_put_request( + _request = build_additional_properties_client_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4085,14 +4193,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentStringOperations: +class AdditionalPropertiesClientSpreadDifferentStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_string` attribute. + :attr:`additional_properties_client_spread_different_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4125,7 +4233,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringRecord: cls: ClsType[_models.DifferentSpreadStringRecord] = kwargs.pop("cls", None) - _request = build_spread_different_string_get_request( + _request = build_additional_properties_client_spread_different_string_get_request( headers=_headers, params=_params, ) @@ -4236,7 +4344,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_string_put_request( + _request = build_additional_properties_client_spread_different_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4260,14 +4368,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentFloatOperations: +class AdditionalPropertiesClientSpreadDifferentFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_float` attribute. + :attr:`additional_properties_client_spread_different_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4300,7 +4408,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatRecord: cls: ClsType[_models.DifferentSpreadFloatRecord] = kwargs.pop("cls", None) - _request = build_spread_different_float_get_request( + _request = build_additional_properties_client_spread_different_float_get_request( headers=_headers, params=_params, ) @@ -4411,7 +4519,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_float_put_request( + _request = build_additional_properties_client_spread_different_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4435,14 +4543,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelOperations: +class AdditionalPropertiesClientSpreadDifferentModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_model` attribute. + :attr:`additional_properties_client_spread_different_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4475,7 +4583,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelRecord: cls: ClsType[_models.DifferentSpreadModelRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_get_request( + _request = build_additional_properties_client_spread_different_model_get_request( headers=_headers, params=_params, ) @@ -4586,7 +4694,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_put_request( + _request = build_additional_properties_client_spread_different_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4610,14 +4718,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadDifferentModelArrayOperations: +class AdditionalPropertiesClientSpreadDifferentModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_different_model_array` attribute. + :attr:`additional_properties_client_spread_different_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4650,7 +4758,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayRecord: cls: ClsType[_models.DifferentSpreadModelArrayRecord] = kwargs.pop("cls", None) - _request = build_spread_different_model_array_get_request( + _request = build_additional_properties_client_spread_different_model_array_get_request( headers=_headers, params=_params, ) @@ -4761,7 +4869,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_different_model_array_put_request( + _request = build_additional_properties_client_spread_different_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4785,14 +4893,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadStringOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_string` attribute. + :attr:`additional_properties_client_extends_different_spread_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4825,7 +4933,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadStringDerived: cls: ClsType[_models.DifferentSpreadStringDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_string_get_request( + _request = build_additional_properties_client_extends_different_spread_string_get_request( headers=_headers, params=_params, ) @@ -4936,7 +5044,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_string_put_request( + _request = build_additional_properties_client_extends_different_spread_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4960,14 +5068,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadFloatOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadFloatOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_float` attribute. + :attr:`additional_properties_client_extends_different_spread_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5000,7 +5108,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadFloatDerived: cls: ClsType[_models.DifferentSpreadFloatDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_float_get_request( + _request = build_additional_properties_client_extends_different_spread_float_get_request( headers=_headers, params=_params, ) @@ -5111,7 +5219,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_float_put_request( + _request = build_additional_properties_client_extends_different_spread_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5135,14 +5243,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelOperations: +class AdditionalPropertiesClientExtendsDifferentSpreadModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model` attribute. + :attr:`additional_properties_client_extends_different_spread_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5175,7 +5283,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelDerived: cls: ClsType[_models.DifferentSpreadModelDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_get_request( + _request = build_additional_properties_client_extends_different_spread_model_get_request( headers=_headers, params=_params, ) @@ -5286,7 +5394,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_put_request( + _request = build_additional_properties_client_extends_different_spread_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5310,14 +5418,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientExtendsDifferentSpreadModelArrayOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`extends_different_spread_model_array` attribute. + :attr:`additional_properties_client_extends_different_spread_model_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5350,7 +5458,7 @@ def get(self, **kwargs: Any) -> _models.DifferentSpreadModelArrayDerived: cls: ClsType[_models.DifferentSpreadModelArrayDerived] = kwargs.pop("cls", None) - _request = build_extends_different_spread_model_array_get_request( + _request = build_additional_properties_client_extends_different_spread_model_array_get_request( headers=_headers, params=_params, ) @@ -5461,7 +5569,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extends_different_spread_model_array_put_request( + _request = build_additional_properties_client_extends_different_spread_model_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5485,14 +5593,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MultipleSpreadOperations: +class AdditionalPropertiesClientMultipleSpreadOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`multiple_spread` attribute. + :attr:`additional_properties_client_multiple_spread` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5524,7 +5632,7 @@ def get(self, **kwargs: Any) -> _models.MultipleSpreadRecord: cls: ClsType[_models.MultipleSpreadRecord] = kwargs.pop("cls", None) - _request = build_multiple_spread_get_request( + _request = build_additional_properties_client_multiple_spread_get_request( headers=_headers, params=_params, ) @@ -5633,7 +5741,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_multiple_spread_put_request( + _request = build_additional_properties_client_multiple_spread_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5657,14 +5765,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordUnionOperations: +class AdditionalPropertiesClientSpreadRecordUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_union` attribute. + :attr:`additional_properties_client_spread_record_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5696,7 +5804,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForUnion: cls: ClsType[_models.SpreadRecordForUnion] = kwargs.pop("cls", None) - _request = build_spread_record_union_get_request( + _request = build_additional_properties_client_spread_record_union_get_request( headers=_headers, params=_params, ) @@ -5805,7 +5913,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_union_put_request( + _request = build_additional_properties_client_spread_record_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5829,14 +5937,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnionOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5869,7 +5977,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_get_request( headers=_headers, params=_params, ) @@ -5984,7 +6092,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union_put_request( content_type=content_type, content=_content, headers=_headers, @@ -6008,14 +6116,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion2Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union2` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6048,7 +6156,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion2: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion2] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union2_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_get_request( headers=_headers, params=_params, ) @@ -6165,7 +6273,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union2_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union2_put_request( content_type=content_type, content=_content, headers=_headers, @@ -6189,14 +6297,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class SpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long +class AdditionalPropertiesClientSpreadRecordNonDiscriminatedUnion3Operations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.additionalproperties.AdditionalPropertiesClient`'s - :attr:`spread_record_non_discriminated_union3` attribute. + :attr:`additional_properties_client_spread_record_non_discriminated_union3` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -6229,7 +6337,7 @@ def get(self, **kwargs: Any) -> _models.SpreadRecordForNonDiscriminatedUnion3: cls: ClsType[_models.SpreadRecordForNonDiscriminatedUnion3] = kwargs.pop("cls", None) - _request = build_spread_record_non_discriminated_union3_get_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_get_request( headers=_headers, params=_params, ) @@ -6346,7 +6454,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_spread_record_non_discriminated_union3_put_request( + _request = build_additional_properties_client_spread_record_non_discriminated_union3_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_client.py index 8e6bd43067..64627bc731 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/_client.py @@ -10,33 +10,40 @@ from ._configuration import NullableClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - DurationOperations, - StringOperations, + NullableClientBytesOperations, + NullableClientCollectionsByteOperations, + NullableClientCollectionsModelOperations, + NullableClientCollectionsStringOperations, + NullableClientDatetimeOperations, + NullableClientDurationOperations, + NullableClientStringOperations, ) class NullableClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with nullable properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.nullable.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.nullable.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.nullable.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.nullable.operations.DurationOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.nullable.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.nullable.operations.CollectionsModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: typetest.property.nullable.operations.CollectionsStringOperations + :ivar nullable_client_string: NullableClientStringOperations operations + :vartype nullable_client_string: + typetest.property.nullable.operations.NullableClientStringOperations + :ivar nullable_client_bytes: NullableClientBytesOperations operations + :vartype nullable_client_bytes: + typetest.property.nullable.operations.NullableClientBytesOperations + :ivar nullable_client_datetime: NullableClientDatetimeOperations operations + :vartype nullable_client_datetime: + typetest.property.nullable.operations.NullableClientDatetimeOperations + :ivar nullable_client_duration: NullableClientDurationOperations operations + :vartype nullable_client_duration: + typetest.property.nullable.operations.NullableClientDurationOperations + :ivar nullable_client_collections_byte: NullableClientCollectionsByteOperations operations + :vartype nullable_client_collections_byte: + typetest.property.nullable.operations.NullableClientCollectionsByteOperations + :ivar nullable_client_collections_model: NullableClientCollectionsModelOperations operations + :vartype nullable_client_collections_model: + typetest.property.nullable.operations.NullableClientCollectionsModelOperations + :ivar nullable_client_collections_string: NullableClientCollectionsStringOperations operations + :vartype nullable_client_collections_string: + typetest.property.nullable.operations.NullableClientCollectionsStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,17 +70,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.nullable_client_string = NullableClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.nullable_client_bytes = NullableClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_string = CollectionsStringOperations( + self.nullable_client_datetime = NullableClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_duration = NullableClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_byte = NullableClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_model = NullableClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_string = NullableClientCollectionsStringOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py index 541493385a..0f62f096a1 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/_client.py @@ -10,35 +10,40 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import NullableClientConfiguration from .operations import ( - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - DurationOperations, - StringOperations, + NullableClientBytesOperations, + NullableClientCollectionsByteOperations, + NullableClientCollectionsModelOperations, + NullableClientCollectionsStringOperations, + NullableClientDatetimeOperations, + NullableClientDurationOperations, + NullableClientStringOperations, ) class NullableClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with nullable properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.nullable.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.nullable.aio.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.nullable.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.nullable.aio.operations.DurationOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.nullable.aio.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.nullable.aio.operations.CollectionsModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.nullable.aio.operations.CollectionsStringOperations + :ivar nullable_client_string: NullableClientStringOperations operations + :vartype nullable_client_string: + typetest.property.nullable.aio.operations.NullableClientStringOperations + :ivar nullable_client_bytes: NullableClientBytesOperations operations + :vartype nullable_client_bytes: + typetest.property.nullable.aio.operations.NullableClientBytesOperations + :ivar nullable_client_datetime: NullableClientDatetimeOperations operations + :vartype nullable_client_datetime: + typetest.property.nullable.aio.operations.NullableClientDatetimeOperations + :ivar nullable_client_duration: NullableClientDurationOperations operations + :vartype nullable_client_duration: + typetest.property.nullable.aio.operations.NullableClientDurationOperations + :ivar nullable_client_collections_byte: NullableClientCollectionsByteOperations operations + :vartype nullable_client_collections_byte: + typetest.property.nullable.aio.operations.NullableClientCollectionsByteOperations + :ivar nullable_client_collections_model: NullableClientCollectionsModelOperations operations + :vartype nullable_client_collections_model: + typetest.property.nullable.aio.operations.NullableClientCollectionsModelOperations + :ivar nullable_client_collections_string: NullableClientCollectionsStringOperations operations + :vartype nullable_client_collections_string: + typetest.property.nullable.aio.operations.NullableClientCollectionsStringOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -65,17 +70,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.nullable_client_string = NullableClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.nullable_client_bytes = NullableClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_string = CollectionsStringOperations( + self.nullable_client_datetime = NullableClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_duration = NullableClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_byte = NullableClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_model = NullableClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.nullable_client_collections_string = NullableClientCollectionsStringOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py index 57de474bdd..2ec206463e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/__init__.py @@ -6,26 +6,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore +from ._operations import NullableClientStringOperations # type: ignore +from ._operations import NullableClientBytesOperations # type: ignore +from ._operations import NullableClientDatetimeOperations # type: ignore +from ._operations import NullableClientDurationOperations # type: ignore +from ._operations import NullableClientCollectionsByteOperations # type: ignore +from ._operations import NullableClientCollectionsModelOperations # type: ignore +from ._operations import NullableClientCollectionsStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "CollectionsStringOperations", + "NullableClientStringOperations", + "NullableClientBytesOperations", + "NullableClientDatetimeOperations", + "NullableClientDurationOperations", + "NullableClientCollectionsByteOperations", + "NullableClientCollectionsModelOperations", + "NullableClientCollectionsStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py index e4292696e2..2117d20db9 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/aio/operations/_operations.py @@ -24,34 +24,34 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_bytes_get_non_null_request, - build_bytes_get_null_request, - build_bytes_patch_non_null_request, - build_bytes_patch_null_request, - build_collections_byte_get_non_null_request, - build_collections_byte_get_null_request, - build_collections_byte_patch_non_null_request, - build_collections_byte_patch_null_request, - build_collections_model_get_non_null_request, - build_collections_model_get_null_request, - build_collections_model_patch_non_null_request, - build_collections_model_patch_null_request, - build_collections_string_get_non_null_request, - build_collections_string_get_null_request, - build_collections_string_patch_non_null_request, - build_collections_string_patch_null_request, - build_datetime_get_non_null_request, - build_datetime_get_null_request, - build_datetime_patch_non_null_request, - build_datetime_patch_null_request, - build_duration_get_non_null_request, - build_duration_get_null_request, - build_duration_patch_non_null_request, - build_duration_patch_null_request, - build_string_get_non_null_request, - build_string_get_null_request, - build_string_patch_non_null_request, - build_string_patch_null_request, + build_nullable_client_bytes_get_non_null_request, + build_nullable_client_bytes_get_null_request, + build_nullable_client_bytes_patch_non_null_request, + build_nullable_client_bytes_patch_null_request, + build_nullable_client_collections_byte_get_non_null_request, + build_nullable_client_collections_byte_get_null_request, + build_nullable_client_collections_byte_patch_non_null_request, + build_nullable_client_collections_byte_patch_null_request, + build_nullable_client_collections_model_get_non_null_request, + build_nullable_client_collections_model_get_null_request, + build_nullable_client_collections_model_patch_non_null_request, + build_nullable_client_collections_model_patch_null_request, + build_nullable_client_collections_string_get_non_null_request, + build_nullable_client_collections_string_get_null_request, + build_nullable_client_collections_string_patch_non_null_request, + build_nullable_client_collections_string_patch_null_request, + build_nullable_client_datetime_get_non_null_request, + build_nullable_client_datetime_get_null_request, + build_nullable_client_datetime_patch_non_null_request, + build_nullable_client_datetime_patch_null_request, + build_nullable_client_duration_get_non_null_request, + build_nullable_client_duration_get_null_request, + build_nullable_client_duration_patch_non_null_request, + build_nullable_client_duration_patch_null_request, + build_nullable_client_string_get_non_null_request, + build_nullable_client_string_get_null_request, + build_nullable_client_string_patch_non_null_request, + build_nullable_client_string_patch_null_request, ) from .._configuration import NullableClientConfiguration @@ -60,14 +60,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class NullableClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`string` attribute. + :attr:`nullable_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -97,7 +97,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_non_null_request( + _request = build_nullable_client_string_get_non_null_request( headers=_headers, params=_params, ) @@ -150,7 +150,7 @@ async def get_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_null_request( + _request = build_nullable_client_string_get_null_request( headers=_headers, params=_params, ) @@ -261,7 +261,7 @@ async def patch_non_null(self, body: Union[_models.StringProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_non_null_request( + _request = build_nullable_client_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -362,7 +362,7 @@ async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_null_request( + _request = build_nullable_client_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -386,14 +386,14 @@ async def patch_null(self, body: Union[_models.StringProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class NullableClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`bytes` attribute. + :attr:`nullable_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -423,7 +423,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_non_null_request( + _request = build_nullable_client_bytes_get_non_null_request( headers=_headers, params=_params, ) @@ -476,7 +476,7 @@ async def get_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_null_request( + _request = build_nullable_client_bytes_get_null_request( headers=_headers, params=_params, ) @@ -587,7 +587,7 @@ async def patch_non_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_non_null_request( + _request = build_nullable_client_bytes_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -688,7 +688,7 @@ async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_null_request( + _request = build_nullable_client_bytes_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -712,14 +712,14 @@ async def patch_null(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class NullableClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`datetime` attribute. + :attr:`nullable_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -749,7 +749,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_non_null_request( + _request = build_nullable_client_datetime_get_non_null_request( headers=_headers, params=_params, ) @@ -802,7 +802,7 @@ async def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_null_request( + _request = build_nullable_client_datetime_get_null_request( headers=_headers, params=_params, ) @@ -913,7 +913,7 @@ async def patch_non_null(self, body: Union[_models.DatetimeProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_non_null_request( + _request = build_nullable_client_datetime_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1014,7 +1014,7 @@ async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_null_request( + _request = build_nullable_client_datetime_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1038,14 +1038,14 @@ async def patch_null(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class NullableClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`duration` attribute. + :attr:`nullable_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1075,7 +1075,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_non_null_request( + _request = build_nullable_client_duration_get_non_null_request( headers=_headers, params=_params, ) @@ -1128,7 +1128,7 @@ async def get_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_null_request( + _request = build_nullable_client_duration_get_null_request( headers=_headers, params=_params, ) @@ -1239,7 +1239,7 @@ async def patch_non_null(self, body: Union[_models.DurationProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_non_null_request( + _request = build_nullable_client_duration_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1340,7 +1340,7 @@ async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_null_request( + _request = build_nullable_client_duration_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1364,14 +1364,14 @@ async def patch_null(self, body: Union[_models.DurationProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class NullableClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_byte` attribute. + :attr:`nullable_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1401,7 +1401,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_non_null_request( + _request = build_nullable_client_collections_byte_get_non_null_request( headers=_headers, params=_params, ) @@ -1454,7 +1454,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_null_request( + _request = build_nullable_client_collections_byte_get_null_request( headers=_headers, params=_params, ) @@ -1571,7 +1571,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_non_null_request( + _request = build_nullable_client_collections_byte_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1676,7 +1676,7 @@ async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_null_request( + _request = build_nullable_client_collections_byte_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1700,14 +1700,14 @@ async def patch_null(self, body: Union[_models.CollectionsByteProperty, JSON, IO return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class NullableClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_model` attribute. + :attr:`nullable_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1738,7 +1738,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_non_null_request( + _request = build_nullable_client_collections_model_get_non_null_request( headers=_headers, params=_params, ) @@ -1792,7 +1792,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_null_request( + _request = build_nullable_client_collections_model_get_null_request( headers=_headers, params=_params, ) @@ -1909,7 +1909,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_non_null_request( + _request = build_nullable_client_collections_model_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2014,7 +2014,7 @@ async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_null_request( + _request = build_nullable_client_collections_model_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2038,14 +2038,14 @@ async def patch_null(self, body: Union[_models.CollectionsModelProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class NullableClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.aio.NullableClient`'s - :attr:`collections_string` attribute. + :attr:`nullable_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2076,7 +2076,7 @@ async def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_non_null_request( + _request = build_nullable_client_collections_string_get_non_null_request( headers=_headers, params=_params, ) @@ -2130,7 +2130,7 @@ async def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_null_request( + _request = build_nullable_client_collections_string_get_null_request( headers=_headers, params=_params, ) @@ -2248,7 +2248,7 @@ async def patch_non_null( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_non_null_request( + _request = build_nullable_client_collections_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2354,7 +2354,7 @@ async def patch_null(self, body: Union[_models.CollectionsStringProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_null_request( + _request = build_nullable_client_collections_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py index 57de474bdd..2ec206463e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/__init__.py @@ -6,26 +6,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore +from ._operations import NullableClientStringOperations # type: ignore +from ._operations import NullableClientBytesOperations # type: ignore +from ._operations import NullableClientDatetimeOperations # type: ignore +from ._operations import NullableClientDurationOperations # type: ignore +from ._operations import NullableClientCollectionsByteOperations # type: ignore +from ._operations import NullableClientCollectionsModelOperations # type: ignore +from ._operations import NullableClientCollectionsStringOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "CollectionsStringOperations", + "NullableClientStringOperations", + "NullableClientBytesOperations", + "NullableClientDatetimeOperations", + "NullableClientDurationOperations", + "NullableClientCollectionsByteOperations", + "NullableClientCollectionsModelOperations", + "NullableClientCollectionsStringOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py index 279d5f80c6..fc9cf1051b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-nullable/typetest/property/nullable/operations/_operations.py @@ -33,7 +33,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -47,7 +47,7 @@ def build_string_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -61,7 +61,7 @@ def build_string_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -75,7 +75,7 @@ def build_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_string_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_string_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -89,7 +89,7 @@ def build_string_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -103,7 +103,7 @@ def build_bytes_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -117,7 +117,7 @@ def build_bytes_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -131,7 +131,7 @@ def build_bytes_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -145,7 +145,7 @@ def build_bytes_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -159,7 +159,7 @@ def build_datetime_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,9 @@ def build_datetime_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -187,7 +189,7 @@ def build_datetime_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -201,7 +203,7 @@ def build_datetime_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -215,7 +217,7 @@ def build_duration_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -229,7 +231,9 @@ def build_duration_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_patch_non_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -243,7 +247,7 @@ def build_duration_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_duration_patch_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_duration_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -257,7 +261,9 @@ def build_duration_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -271,7 +277,9 @@ def build_collections_byte_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_collections_byte_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -285,7 +293,9 @@ def build_collections_byte_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -299,7 +309,9 @@ def build_collections_byte_patch_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_byte_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_byte_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -313,7 +325,9 @@ def build_collections_byte_patch_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -327,7 +341,9 @@ def build_collections_model_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_null_request(**kwargs: Any) -> HttpRequest: +def build_nullable_client_collections_model_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -341,7 +357,9 @@ def build_collections_model_get_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -355,7 +373,9 @@ def build_collections_model_patch_non_null_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_model_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_model_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -369,7 +389,9 @@ def build_collections_model_patch_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_get_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -383,7 +405,9 @@ def build_collections_string_get_non_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_get_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -397,7 +421,9 @@ def build_collections_string_get_null_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_patch_non_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_patch_non_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -411,7 +437,9 @@ def build_collections_string_patch_non_null_request(**kwargs: Any) -> HttpReques return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -def build_collections_string_patch_null_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_nullable_client_collections_string_patch_null_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -425,14 +453,14 @@ def build_collections_string_patch_null_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PATCH", url=_url, headers=_headers, **kwargs) -class StringOperations: +class NullableClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`string` attribute. + :attr:`nullable_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -462,7 +490,7 @@ def get_non_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_non_null_request( + _request = build_nullable_client_string_get_non_null_request( headers=_headers, params=_params, ) @@ -515,7 +543,7 @@ def get_null(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_null_request( + _request = build_nullable_client_string_get_null_request( headers=_headers, params=_params, ) @@ -626,7 +654,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_non_null_request( + _request = build_nullable_client_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -725,7 +753,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_patch_null_request( + _request = build_nullable_client_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -749,14 +777,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class NullableClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`bytes` attribute. + :attr:`nullable_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -786,7 +814,7 @@ def get_non_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_non_null_request( + _request = build_nullable_client_bytes_get_non_null_request( headers=_headers, params=_params, ) @@ -839,7 +867,7 @@ def get_null(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_null_request( + _request = build_nullable_client_bytes_get_null_request( headers=_headers, params=_params, ) @@ -950,7 +978,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_non_null_request( + _request = build_nullable_client_bytes_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1049,7 +1077,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_patch_null_request( + _request = build_nullable_client_bytes_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1073,14 +1101,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class NullableClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`datetime` attribute. + :attr:`nullable_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1110,7 +1138,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_non_null_request( + _request = build_nullable_client_datetime_get_non_null_request( headers=_headers, params=_params, ) @@ -1163,7 +1191,7 @@ def get_null(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_null_request( + _request = build_nullable_client_datetime_get_null_request( headers=_headers, params=_params, ) @@ -1274,7 +1302,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_non_null_request( + _request = build_nullable_client_datetime_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1373,7 +1401,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_patch_null_request( + _request = build_nullable_client_datetime_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1397,14 +1425,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class NullableClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`duration` attribute. + :attr:`nullable_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1434,7 +1462,7 @@ def get_non_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_non_null_request( + _request = build_nullable_client_duration_get_non_null_request( headers=_headers, params=_params, ) @@ -1487,7 +1515,7 @@ def get_null(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_null_request( + _request = build_nullable_client_duration_get_null_request( headers=_headers, params=_params, ) @@ -1598,7 +1626,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_non_null_request( + _request = build_nullable_client_duration_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1697,7 +1725,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_patch_null_request( + _request = build_nullable_client_duration_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1721,14 +1749,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class NullableClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_byte` attribute. + :attr:`nullable_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1758,7 +1786,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_non_null_request( + _request = build_nullable_client_collections_byte_get_non_null_request( headers=_headers, params=_params, ) @@ -1811,7 +1839,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_null_request( + _request = build_nullable_client_collections_byte_get_null_request( headers=_headers, params=_params, ) @@ -1850,7 +1878,7 @@ def patch_non_null( body: _models.CollectionsByteProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -1926,7 +1954,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_non_null_request( + _request = build_nullable_client_collections_byte_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -1955,7 +1983,7 @@ def patch_null( body: _models.CollectionsByteProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2029,7 +2057,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_patch_null_request( + _request = build_nullable_client_collections_byte_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2053,14 +2081,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class NullableClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_model` attribute. + :attr:`nullable_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2091,7 +2119,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_non_null_request( + _request = build_nullable_client_collections_model_get_non_null_request( headers=_headers, params=_params, ) @@ -2145,7 +2173,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_null_request( + _request = build_nullable_client_collections_model_get_null_request( headers=_headers, params=_params, ) @@ -2184,7 +2212,7 @@ def patch_non_null( body: _models.CollectionsModelProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -2260,7 +2288,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_non_null_request( + _request = build_nullable_client_collections_model_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2289,7 +2317,7 @@ def patch_null( body: _models.CollectionsModelProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2363,7 +2391,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_patch_null_request( + _request = build_nullable_client_collections_model_patch_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2387,14 +2415,14 @@ def patch_null( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class NullableClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.nullable.NullableClient`'s - :attr:`collections_string` attribute. + :attr:`nullable_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2425,7 +2453,7 @@ def get_non_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_non_null_request( + _request = build_nullable_client_collections_string_get_non_null_request( headers=_headers, params=_params, ) @@ -2479,7 +2507,7 @@ def get_null(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_null_request( + _request = build_nullable_client_collections_string_get_null_request( headers=_headers, params=_params, ) @@ -2518,7 +2546,7 @@ def patch_non_null( body: _models.CollectionsStringProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with all properties present. @@ -2595,7 +2623,7 @@ def patch_non_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_non_null_request( + _request = build_nullable_client_collections_string_patch_non_null_request( content_type=content_type, content=_content, headers=_headers, @@ -2624,7 +2652,7 @@ def patch_null( body: _models.CollectionsStringProperty, *, content_type: str = "application/merge-patch+json", - **kwargs: Any + **kwargs: Any, ) -> None: """Put a body with default properties. @@ -2699,7 +2727,7 @@ def patch_null( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_patch_null_request( + _request = build_nullable_client_collections_string_patch_null_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_client.py index 82b4163b38..3fad95205c 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/_client.py @@ -10,62 +10,78 @@ from ._configuration import OptionalClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanLiteralOperations, - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - DatetimeOperations, - DurationOperations, - FloatLiteralOperations, - IntLiteralOperations, - PlainDateOperations, - PlainTimeOperations, - RequiredAndOptionalOperations, - StringLiteralOperations, - StringOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, + OptionalClientBooleanLiteralOperations, + OptionalClientBytesOperations, + OptionalClientCollectionsByteOperations, + OptionalClientCollectionsModelOperations, + OptionalClientDatetimeOperations, + OptionalClientDurationOperations, + OptionalClientFloatLiteralOperations, + OptionalClientIntLiteralOperations, + OptionalClientPlainDateOperations, + OptionalClientPlainTimeOperations, + OptionalClientRequiredAndOptionalOperations, + OptionalClientStringLiteralOperations, + OptionalClientStringOperations, + OptionalClientUnionFloatLiteralOperations, + OptionalClientUnionIntLiteralOperations, + OptionalClientUnionStringLiteralOperations, ) class OptionalClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with optional properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.optional.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.optional.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.optional.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.optional.operations.DurationOperations - :ivar plain_date: PlainDateOperations operations - :vartype plain_date: typetest.property.optional.operations.PlainDateOperations - :ivar plain_time: PlainTimeOperations operations - :vartype plain_time: typetest.property.optional.operations.PlainTimeOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.optional.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.optional.operations.CollectionsModelOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.optional.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.optional.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.optional.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.optional.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.optional.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.optional.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: typetest.property.optional.operations.UnionFloatLiteralOperations - :ivar required_and_optional: RequiredAndOptionalOperations operations - :vartype required_and_optional: - typetest.property.optional.operations.RequiredAndOptionalOperations + :ivar optional_client_string: OptionalClientStringOperations operations + :vartype optional_client_string: + typetest.property.optional.operations.OptionalClientStringOperations + :ivar optional_client_bytes: OptionalClientBytesOperations operations + :vartype optional_client_bytes: + typetest.property.optional.operations.OptionalClientBytesOperations + :ivar optional_client_datetime: OptionalClientDatetimeOperations operations + :vartype optional_client_datetime: + typetest.property.optional.operations.OptionalClientDatetimeOperations + :ivar optional_client_duration: OptionalClientDurationOperations operations + :vartype optional_client_duration: + typetest.property.optional.operations.OptionalClientDurationOperations + :ivar optional_client_plain_date: OptionalClientPlainDateOperations operations + :vartype optional_client_plain_date: + typetest.property.optional.operations.OptionalClientPlainDateOperations + :ivar optional_client_plain_time: OptionalClientPlainTimeOperations operations + :vartype optional_client_plain_time: + typetest.property.optional.operations.OptionalClientPlainTimeOperations + :ivar optional_client_collections_byte: OptionalClientCollectionsByteOperations operations + :vartype optional_client_collections_byte: + typetest.property.optional.operations.OptionalClientCollectionsByteOperations + :ivar optional_client_collections_model: OptionalClientCollectionsModelOperations operations + :vartype optional_client_collections_model: + typetest.property.optional.operations.OptionalClientCollectionsModelOperations + :ivar optional_client_string_literal: OptionalClientStringLiteralOperations operations + :vartype optional_client_string_literal: + typetest.property.optional.operations.OptionalClientStringLiteralOperations + :ivar optional_client_int_literal: OptionalClientIntLiteralOperations operations + :vartype optional_client_int_literal: + typetest.property.optional.operations.OptionalClientIntLiteralOperations + :ivar optional_client_float_literal: OptionalClientFloatLiteralOperations operations + :vartype optional_client_float_literal: + typetest.property.optional.operations.OptionalClientFloatLiteralOperations + :ivar optional_client_boolean_literal: OptionalClientBooleanLiteralOperations operations + :vartype optional_client_boolean_literal: + typetest.property.optional.operations.OptionalClientBooleanLiteralOperations + :ivar optional_client_union_string_literal: OptionalClientUnionStringLiteralOperations + operations + :vartype optional_client_union_string_literal: + typetest.property.optional.operations.OptionalClientUnionStringLiteralOperations + :ivar optional_client_union_int_literal: OptionalClientUnionIntLiteralOperations operations + :vartype optional_client_union_int_literal: + typetest.property.optional.operations.OptionalClientUnionIntLiteralOperations + :ivar optional_client_union_float_literal: OptionalClientUnionFloatLiteralOperations operations + :vartype optional_client_union_float_literal: + typetest.property.optional.operations.OptionalClientUnionFloatLiteralOperations + :ivar optional_client_required_and_optional: OptionalClientRequiredAndOptionalOperations + operations + :vartype optional_client_required_and_optional: + typetest.property.optional.operations.OptionalClientRequiredAndOptionalOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -92,32 +108,52 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_date = PlainDateOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_time = PlainTimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.optional_client_string = OptionalClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.optional_client_bytes = OptionalClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.optional_client_datetime = OptionalClientDatetimeOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.optional_client_duration = OptionalClientDurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.optional_client_plain_date = OptionalClientPlainDateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.required_and_optional = RequiredAndOptionalOperations( + self.optional_client_plain_time = OptionalClientPlainTimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_byte = OptionalClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_model = OptionalClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_string_literal = OptionalClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_int_literal = OptionalClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_float_literal = OptionalClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_boolean_literal = OptionalClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_string_literal = OptionalClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_int_literal = OptionalClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_float_literal = OptionalClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_required_and_optional = OptionalClientRequiredAndOptionalOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/_client.py index 39870a4ba8..7b745327c2 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/_client.py @@ -10,64 +10,78 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import OptionalClientConfiguration from .operations import ( - BooleanLiteralOperations, - BytesOperations, - CollectionsByteOperations, - CollectionsModelOperations, - DatetimeOperations, - DurationOperations, - FloatLiteralOperations, - IntLiteralOperations, - PlainDateOperations, - PlainTimeOperations, - RequiredAndOptionalOperations, - StringLiteralOperations, - StringOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, + OptionalClientBooleanLiteralOperations, + OptionalClientBytesOperations, + OptionalClientCollectionsByteOperations, + OptionalClientCollectionsModelOperations, + OptionalClientDatetimeOperations, + OptionalClientDurationOperations, + OptionalClientFloatLiteralOperations, + OptionalClientIntLiteralOperations, + OptionalClientPlainDateOperations, + OptionalClientPlainTimeOperations, + OptionalClientRequiredAndOptionalOperations, + OptionalClientStringLiteralOperations, + OptionalClientStringOperations, + OptionalClientUnionFloatLiteralOperations, + OptionalClientUnionIntLiteralOperations, + OptionalClientUnionStringLiteralOperations, ) class OptionalClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates models with optional properties. - :ivar string: StringOperations operations - :vartype string: typetest.property.optional.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.optional.aio.operations.BytesOperations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.optional.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.optional.aio.operations.DurationOperations - :ivar plain_date: PlainDateOperations operations - :vartype plain_date: typetest.property.optional.aio.operations.PlainDateOperations - :ivar plain_time: PlainTimeOperations operations - :vartype plain_time: typetest.property.optional.aio.operations.PlainTimeOperations - :ivar collections_byte: CollectionsByteOperations operations - :vartype collections_byte: typetest.property.optional.aio.operations.CollectionsByteOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.optional.aio.operations.CollectionsModelOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.optional.aio.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.optional.aio.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.optional.aio.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.optional.aio.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.optional.aio.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.optional.aio.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.optional.aio.operations.UnionFloatLiteralOperations - :ivar required_and_optional: RequiredAndOptionalOperations operations - :vartype required_and_optional: - typetest.property.optional.aio.operations.RequiredAndOptionalOperations + :ivar optional_client_string: OptionalClientStringOperations operations + :vartype optional_client_string: + typetest.property.optional.aio.operations.OptionalClientStringOperations + :ivar optional_client_bytes: OptionalClientBytesOperations operations + :vartype optional_client_bytes: + typetest.property.optional.aio.operations.OptionalClientBytesOperations + :ivar optional_client_datetime: OptionalClientDatetimeOperations operations + :vartype optional_client_datetime: + typetest.property.optional.aio.operations.OptionalClientDatetimeOperations + :ivar optional_client_duration: OptionalClientDurationOperations operations + :vartype optional_client_duration: + typetest.property.optional.aio.operations.OptionalClientDurationOperations + :ivar optional_client_plain_date: OptionalClientPlainDateOperations operations + :vartype optional_client_plain_date: + typetest.property.optional.aio.operations.OptionalClientPlainDateOperations + :ivar optional_client_plain_time: OptionalClientPlainTimeOperations operations + :vartype optional_client_plain_time: + typetest.property.optional.aio.operations.OptionalClientPlainTimeOperations + :ivar optional_client_collections_byte: OptionalClientCollectionsByteOperations operations + :vartype optional_client_collections_byte: + typetest.property.optional.aio.operations.OptionalClientCollectionsByteOperations + :ivar optional_client_collections_model: OptionalClientCollectionsModelOperations operations + :vartype optional_client_collections_model: + typetest.property.optional.aio.operations.OptionalClientCollectionsModelOperations + :ivar optional_client_string_literal: OptionalClientStringLiteralOperations operations + :vartype optional_client_string_literal: + typetest.property.optional.aio.operations.OptionalClientStringLiteralOperations + :ivar optional_client_int_literal: OptionalClientIntLiteralOperations operations + :vartype optional_client_int_literal: + typetest.property.optional.aio.operations.OptionalClientIntLiteralOperations + :ivar optional_client_float_literal: OptionalClientFloatLiteralOperations operations + :vartype optional_client_float_literal: + typetest.property.optional.aio.operations.OptionalClientFloatLiteralOperations + :ivar optional_client_boolean_literal: OptionalClientBooleanLiteralOperations operations + :vartype optional_client_boolean_literal: + typetest.property.optional.aio.operations.OptionalClientBooleanLiteralOperations + :ivar optional_client_union_string_literal: OptionalClientUnionStringLiteralOperations + operations + :vartype optional_client_union_string_literal: + typetest.property.optional.aio.operations.OptionalClientUnionStringLiteralOperations + :ivar optional_client_union_int_literal: OptionalClientUnionIntLiteralOperations operations + :vartype optional_client_union_int_literal: + typetest.property.optional.aio.operations.OptionalClientUnionIntLiteralOperations + :ivar optional_client_union_float_literal: OptionalClientUnionFloatLiteralOperations operations + :vartype optional_client_union_float_literal: + typetest.property.optional.aio.operations.OptionalClientUnionFloatLiteralOperations + :ivar optional_client_required_and_optional: OptionalClientRequiredAndOptionalOperations + operations + :vartype optional_client_required_and_optional: + typetest.property.optional.aio.operations.OptionalClientRequiredAndOptionalOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -94,32 +108,52 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_date = PlainDateOperations(self._client, self._config, self._serialize, self._deserialize) - self.plain_time = PlainTimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_byte = CollectionsByteOperations( + self.optional_client_string = OptionalClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_model = CollectionsModelOperations( + self.optional_client_bytes = OptionalClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.optional_client_datetime = OptionalClientDatetimeOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.optional_client_duration = OptionalClientDurationOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.optional_client_plain_date = OptionalClientPlainDateOperations( self._client, self._config, self._serialize, self._deserialize ) - self.required_and_optional = RequiredAndOptionalOperations( + self.optional_client_plain_time = OptionalClientPlainTimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_byte = OptionalClientCollectionsByteOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_collections_model = OptionalClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_string_literal = OptionalClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_int_literal = OptionalClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_float_literal = OptionalClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_boolean_literal = OptionalClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_string_literal = OptionalClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_int_literal = OptionalClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_union_float_literal = OptionalClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.optional_client_required_and_optional = OptionalClientRequiredAndOptionalOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py index 39aa569bc6..22e59249b7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/__init__.py @@ -6,44 +6,44 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import PlainDateOperations # type: ignore -from ._operations import PlainTimeOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import RequiredAndOptionalOperations # type: ignore +from ._operations import OptionalClientStringOperations # type: ignore +from ._operations import OptionalClientBytesOperations # type: ignore +from ._operations import OptionalClientDatetimeOperations # type: ignore +from ._operations import OptionalClientDurationOperations # type: ignore +from ._operations import OptionalClientPlainDateOperations # type: ignore +from ._operations import OptionalClientPlainTimeOperations # type: ignore +from ._operations import OptionalClientCollectionsByteOperations # type: ignore +from ._operations import OptionalClientCollectionsModelOperations # type: ignore +from ._operations import OptionalClientStringLiteralOperations # type: ignore +from ._operations import OptionalClientIntLiteralOperations # type: ignore +from ._operations import OptionalClientFloatLiteralOperations # type: ignore +from ._operations import OptionalClientBooleanLiteralOperations # type: ignore +from ._operations import OptionalClientUnionStringLiteralOperations # type: ignore +from ._operations import OptionalClientUnionIntLiteralOperations # type: ignore +from ._operations import OptionalClientUnionFloatLiteralOperations # type: ignore +from ._operations import OptionalClientRequiredAndOptionalOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "PlainDateOperations", - "PlainTimeOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "RequiredAndOptionalOperations", + "OptionalClientStringOperations", + "OptionalClientBytesOperations", + "OptionalClientDatetimeOperations", + "OptionalClientDurationOperations", + "OptionalClientPlainDateOperations", + "OptionalClientPlainTimeOperations", + "OptionalClientCollectionsByteOperations", + "OptionalClientCollectionsModelOperations", + "OptionalClientStringLiteralOperations", + "OptionalClientIntLiteralOperations", + "OptionalClientFloatLiteralOperations", + "OptionalClientBooleanLiteralOperations", + "OptionalClientUnionStringLiteralOperations", + "OptionalClientUnionIntLiteralOperations", + "OptionalClientUnionFloatLiteralOperations", + "OptionalClientRequiredAndOptionalOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py index 366538c0ed..a5855e5748 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/aio/operations/_operations.py @@ -24,70 +24,70 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_literal_get_all_request, - build_boolean_literal_get_default_request, - build_boolean_literal_put_all_request, - build_boolean_literal_put_default_request, - build_bytes_get_all_request, - build_bytes_get_default_request, - build_bytes_put_all_request, - build_bytes_put_default_request, - build_collections_byte_get_all_request, - build_collections_byte_get_default_request, - build_collections_byte_put_all_request, - build_collections_byte_put_default_request, - build_collections_model_get_all_request, - build_collections_model_get_default_request, - build_collections_model_put_all_request, - build_collections_model_put_default_request, - build_datetime_get_all_request, - build_datetime_get_default_request, - build_datetime_put_all_request, - build_datetime_put_default_request, - build_duration_get_all_request, - build_duration_get_default_request, - build_duration_put_all_request, - build_duration_put_default_request, - build_float_literal_get_all_request, - build_float_literal_get_default_request, - build_float_literal_put_all_request, - build_float_literal_put_default_request, - build_int_literal_get_all_request, - build_int_literal_get_default_request, - build_int_literal_put_all_request, - build_int_literal_put_default_request, - build_plain_date_get_all_request, - build_plain_date_get_default_request, - build_plain_date_put_all_request, - build_plain_date_put_default_request, - build_plain_time_get_all_request, - build_plain_time_get_default_request, - build_plain_time_put_all_request, - build_plain_time_put_default_request, - build_required_and_optional_get_all_request, - build_required_and_optional_get_required_only_request, - build_required_and_optional_put_all_request, - build_required_and_optional_put_required_only_request, - build_string_get_all_request, - build_string_get_default_request, - build_string_literal_get_all_request, - build_string_literal_get_default_request, - build_string_literal_put_all_request, - build_string_literal_put_default_request, - build_string_put_all_request, - build_string_put_default_request, - build_union_float_literal_get_all_request, - build_union_float_literal_get_default_request, - build_union_float_literal_put_all_request, - build_union_float_literal_put_default_request, - build_union_int_literal_get_all_request, - build_union_int_literal_get_default_request, - build_union_int_literal_put_all_request, - build_union_int_literal_put_default_request, - build_union_string_literal_get_all_request, - build_union_string_literal_get_default_request, - build_union_string_literal_put_all_request, - build_union_string_literal_put_default_request, + build_optional_client_boolean_literal_get_all_request, + build_optional_client_boolean_literal_get_default_request, + build_optional_client_boolean_literal_put_all_request, + build_optional_client_boolean_literal_put_default_request, + build_optional_client_bytes_get_all_request, + build_optional_client_bytes_get_default_request, + build_optional_client_bytes_put_all_request, + build_optional_client_bytes_put_default_request, + build_optional_client_collections_byte_get_all_request, + build_optional_client_collections_byte_get_default_request, + build_optional_client_collections_byte_put_all_request, + build_optional_client_collections_byte_put_default_request, + build_optional_client_collections_model_get_all_request, + build_optional_client_collections_model_get_default_request, + build_optional_client_collections_model_put_all_request, + build_optional_client_collections_model_put_default_request, + build_optional_client_datetime_get_all_request, + build_optional_client_datetime_get_default_request, + build_optional_client_datetime_put_all_request, + build_optional_client_datetime_put_default_request, + build_optional_client_duration_get_all_request, + build_optional_client_duration_get_default_request, + build_optional_client_duration_put_all_request, + build_optional_client_duration_put_default_request, + build_optional_client_float_literal_get_all_request, + build_optional_client_float_literal_get_default_request, + build_optional_client_float_literal_put_all_request, + build_optional_client_float_literal_put_default_request, + build_optional_client_int_literal_get_all_request, + build_optional_client_int_literal_get_default_request, + build_optional_client_int_literal_put_all_request, + build_optional_client_int_literal_put_default_request, + build_optional_client_plain_date_get_all_request, + build_optional_client_plain_date_get_default_request, + build_optional_client_plain_date_put_all_request, + build_optional_client_plain_date_put_default_request, + build_optional_client_plain_time_get_all_request, + build_optional_client_plain_time_get_default_request, + build_optional_client_plain_time_put_all_request, + build_optional_client_plain_time_put_default_request, + build_optional_client_required_and_optional_get_all_request, + build_optional_client_required_and_optional_get_required_only_request, + build_optional_client_required_and_optional_put_all_request, + build_optional_client_required_and_optional_put_required_only_request, + build_optional_client_string_get_all_request, + build_optional_client_string_get_default_request, + build_optional_client_string_literal_get_all_request, + build_optional_client_string_literal_get_default_request, + build_optional_client_string_literal_put_all_request, + build_optional_client_string_literal_put_default_request, + build_optional_client_string_put_all_request, + build_optional_client_string_put_default_request, + build_optional_client_union_float_literal_get_all_request, + build_optional_client_union_float_literal_get_default_request, + build_optional_client_union_float_literal_put_all_request, + build_optional_client_union_float_literal_put_default_request, + build_optional_client_union_int_literal_get_all_request, + build_optional_client_union_int_literal_get_default_request, + build_optional_client_union_int_literal_put_all_request, + build_optional_client_union_int_literal_put_default_request, + build_optional_client_union_string_literal_get_all_request, + build_optional_client_union_string_literal_get_default_request, + build_optional_client_union_string_literal_put_all_request, + build_optional_client_union_string_literal_put_default_request, ) from .._configuration import OptionalClientConfiguration @@ -96,14 +96,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class OptionalClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`string` attribute. + :attr:`optional_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -133,7 +133,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_all_request( + _request = build_optional_client_string_get_all_request( headers=_headers, params=_params, ) @@ -186,7 +186,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_default_request( + _request = build_optional_client_string_get_default_request( headers=_headers, params=_params, ) @@ -293,7 +293,7 @@ async def put_all(self, body: Union[_models.StringProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_all_request( + _request = build_optional_client_string_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -390,7 +390,7 @@ async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_default_request( + _request = build_optional_client_string_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -414,14 +414,14 @@ async def put_default(self, body: Union[_models.StringProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class OptionalClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`bytes` attribute. + :attr:`optional_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -451,7 +451,7 @@ async def get_all(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_all_request( + _request = build_optional_client_bytes_get_all_request( headers=_headers, params=_params, ) @@ -504,7 +504,7 @@ async def get_default(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_default_request( + _request = build_optional_client_bytes_get_default_request( headers=_headers, params=_params, ) @@ -611,7 +611,7 @@ async def put_all(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **k else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_all_request( + _request = build_optional_client_bytes_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -708,7 +708,7 @@ async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_default_request( + _request = build_optional_client_bytes_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -732,14 +732,14 @@ async def put_default(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class OptionalClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`datetime` attribute. + :attr:`optional_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -769,7 +769,7 @@ async def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_all_request( + _request = build_optional_client_datetime_get_all_request( headers=_headers, params=_params, ) @@ -822,7 +822,7 @@ async def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_default_request( + _request = build_optional_client_datetime_get_default_request( headers=_headers, params=_params, ) @@ -929,7 +929,7 @@ async def put_all(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_all_request( + _request = build_optional_client_datetime_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1026,7 +1026,7 @@ async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_default_request( + _request = build_optional_client_datetime_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1050,14 +1050,14 @@ async def put_default(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class OptionalClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`duration` attribute. + :attr:`optional_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1087,7 +1087,7 @@ async def get_all(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_all_request( + _request = build_optional_client_duration_get_all_request( headers=_headers, params=_params, ) @@ -1140,7 +1140,7 @@ async def get_default(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_default_request( + _request = build_optional_client_duration_get_default_request( headers=_headers, params=_params, ) @@ -1247,7 +1247,7 @@ async def put_all(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_all_request( + _request = build_optional_client_duration_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1344,7 +1344,7 @@ async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_default_request( + _request = build_optional_client_duration_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1368,14 +1368,14 @@ async def put_default(self, body: Union[_models.DurationProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class PlainDateOperations: +class OptionalClientPlainDateOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`plain_date` attribute. + :attr:`optional_client_plain_date` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1405,7 +1405,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_all_request( + _request = build_optional_client_plain_date_get_all_request( headers=_headers, params=_params, ) @@ -1458,7 +1458,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_default_request( + _request = build_optional_client_plain_date_get_default_request( headers=_headers, params=_params, ) @@ -1565,7 +1565,7 @@ async def put_all(self, body: Union[_models.PlainDateProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_all_request( + _request = build_optional_client_plain_date_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1662,7 +1662,7 @@ async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_default_request( + _request = build_optional_client_plain_date_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1686,14 +1686,14 @@ async def put_default(self, body: Union[_models.PlainDateProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class PlainTimeOperations: +class OptionalClientPlainTimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`plain_time` attribute. + :attr:`optional_client_plain_time` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1723,7 +1723,7 @@ async def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_all_request( + _request = build_optional_client_plain_time_get_all_request( headers=_headers, params=_params, ) @@ -1776,7 +1776,7 @@ async def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_default_request( + _request = build_optional_client_plain_time_get_default_request( headers=_headers, params=_params, ) @@ -1883,7 +1883,7 @@ async def put_all(self, body: Union[_models.PlainTimeProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_all_request( + _request = build_optional_client_plain_time_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1980,7 +1980,7 @@ async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_default_request( + _request = build_optional_client_plain_time_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2004,14 +2004,14 @@ async def put_default(self, body: Union[_models.PlainTimeProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class OptionalClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`collections_byte` attribute. + :attr:`optional_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2041,7 +2041,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_all_request( + _request = build_optional_client_collections_byte_get_all_request( headers=_headers, params=_params, ) @@ -2094,7 +2094,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_default_request( + _request = build_optional_client_collections_byte_get_default_request( headers=_headers, params=_params, ) @@ -2201,7 +2201,7 @@ async def put_all(self, body: Union[_models.CollectionsByteProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_all_request( + _request = build_optional_client_collections_byte_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2298,7 +2298,7 @@ async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_default_request( + _request = build_optional_client_collections_byte_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2322,14 +2322,14 @@ async def put_default(self, body: Union[_models.CollectionsByteProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class OptionalClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`collections_model` attribute. + :attr:`optional_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2360,7 +2360,7 @@ async def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_all_request( + _request = build_optional_client_collections_model_get_all_request( headers=_headers, params=_params, ) @@ -2414,7 +2414,7 @@ async def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_default_request( + _request = build_optional_client_collections_model_get_default_request( headers=_headers, params=_params, ) @@ -2521,7 +2521,7 @@ async def put_all(self, body: Union[_models.CollectionsModelProperty, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_all_request( + _request = build_optional_client_collections_model_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2618,7 +2618,7 @@ async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_default_request( + _request = build_optional_client_collections_model_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2642,14 +2642,14 @@ async def put_default(self, body: Union[_models.CollectionsModelProperty, JSON, return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class OptionalClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`string_literal` attribute. + :attr:`optional_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2679,7 +2679,7 @@ async def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_all_request( + _request = build_optional_client_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -2732,7 +2732,7 @@ async def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_default_request( + _request = build_optional_client_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -2839,7 +2839,7 @@ async def put_all(self, body: Union[_models.StringLiteralProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_all_request( + _request = build_optional_client_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2936,7 +2936,7 @@ async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_default_request( + _request = build_optional_client_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2960,14 +2960,14 @@ async def put_default(self, body: Union[_models.StringLiteralProperty, JSON, IO[ return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class OptionalClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`int_literal` attribute. + :attr:`optional_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2997,7 +2997,7 @@ async def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_all_request( + _request = build_optional_client_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -3050,7 +3050,7 @@ async def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_default_request( + _request = build_optional_client_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -3157,7 +3157,7 @@ async def put_all(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_all_request( + _request = build_optional_client_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3254,7 +3254,7 @@ async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_default_request( + _request = build_optional_client_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3278,14 +3278,14 @@ async def put_default(self, body: Union[_models.IntLiteralProperty, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class OptionalClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`float_literal` attribute. + :attr:`optional_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3315,7 +3315,7 @@ async def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_all_request( + _request = build_optional_client_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -3368,7 +3368,7 @@ async def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_default_request( + _request = build_optional_client_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -3475,7 +3475,7 @@ async def put_all(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_all_request( + _request = build_optional_client_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3572,7 +3572,7 @@ async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[b else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_default_request( + _request = build_optional_client_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3596,14 +3596,14 @@ async def put_default(self, body: Union[_models.FloatLiteralProperty, JSON, IO[b return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class OptionalClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`boolean_literal` attribute. + :attr:`optional_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3633,7 +3633,7 @@ async def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_all_request( + _request = build_optional_client_boolean_literal_get_all_request( headers=_headers, params=_params, ) @@ -3686,7 +3686,7 @@ async def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_default_request( + _request = build_optional_client_boolean_literal_get_default_request( headers=_headers, params=_params, ) @@ -3793,7 +3793,7 @@ async def put_all(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_all_request( + _request = build_optional_client_boolean_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3890,7 +3890,7 @@ async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_default_request( + _request = build_optional_client_boolean_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3914,14 +3914,14 @@ async def put_default(self, body: Union[_models.BooleanLiteralProperty, JSON, IO return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class OptionalClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_string_literal` attribute. + :attr:`optional_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3952,7 +3952,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_all_request( + _request = build_optional_client_union_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -4006,7 +4006,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_default_request( + _request = build_optional_client_union_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -4114,7 +4114,7 @@ async def put_all(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_all_request( + _request = build_optional_client_union_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4214,7 +4214,7 @@ async def put_default( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_default_request( + _request = build_optional_client_union_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4238,14 +4238,14 @@ async def put_default( return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class OptionalClientUnionIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_int_literal` attribute. + :attr:`optional_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4275,7 +4275,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_all_request( + _request = build_optional_client_union_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -4328,7 +4328,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_default_request( + _request = build_optional_client_union_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -4435,7 +4435,7 @@ async def put_all(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[by else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_all_request( + _request = build_optional_client_union_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4532,7 +4532,7 @@ async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_default_request( + _request = build_optional_client_union_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4556,14 +4556,14 @@ async def put_default(self, body: Union[_models.UnionIntLiteralProperty, JSON, I return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class OptionalClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`union_float_literal` attribute. + :attr:`optional_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4594,7 +4594,7 @@ async def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_all_request( + _request = build_optional_client_union_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -4648,7 +4648,7 @@ async def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_default_request( + _request = build_optional_client_union_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -4756,7 +4756,7 @@ async def put_all(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[ else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_all_request( + _request = build_optional_client_union_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4854,7 +4854,7 @@ async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_default_request( + _request = build_optional_client_union_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4878,14 +4878,14 @@ async def put_default(self, body: Union[_models.UnionFloatLiteralProperty, JSON, return cls(pipeline_response, None, {}) # type: ignore -class RequiredAndOptionalOperations: +class OptionalClientRequiredAndOptionalOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.aio.OptionalClient`'s - :attr:`required_and_optional` attribute. + :attr:`optional_client_required_and_optional` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4916,7 +4916,7 @@ async def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_all_request( + _request = build_optional_client_required_and_optional_get_all_request( headers=_headers, params=_params, ) @@ -4970,7 +4970,7 @@ async def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalP cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_required_only_request( + _request = build_optional_client_required_and_optional_get_required_only_request( headers=_headers, params=_params, ) @@ -5078,7 +5078,7 @@ async def put_all(self, body: Union[_models.RequiredAndOptionalProperty, JSON, I else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_all_request( + _request = build_optional_client_required_and_optional_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5180,7 +5180,7 @@ async def put_required_only( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_required_only_request( + _request = build_optional_client_required_and_optional_put_required_only_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py index 39aa569bc6..22e59249b7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/__init__.py @@ -6,44 +6,44 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import PlainDateOperations # type: ignore -from ._operations import PlainTimeOperations # type: ignore -from ._operations import CollectionsByteOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import RequiredAndOptionalOperations # type: ignore +from ._operations import OptionalClientStringOperations # type: ignore +from ._operations import OptionalClientBytesOperations # type: ignore +from ._operations import OptionalClientDatetimeOperations # type: ignore +from ._operations import OptionalClientDurationOperations # type: ignore +from ._operations import OptionalClientPlainDateOperations # type: ignore +from ._operations import OptionalClientPlainTimeOperations # type: ignore +from ._operations import OptionalClientCollectionsByteOperations # type: ignore +from ._operations import OptionalClientCollectionsModelOperations # type: ignore +from ._operations import OptionalClientStringLiteralOperations # type: ignore +from ._operations import OptionalClientIntLiteralOperations # type: ignore +from ._operations import OptionalClientFloatLiteralOperations # type: ignore +from ._operations import OptionalClientBooleanLiteralOperations # type: ignore +from ._operations import OptionalClientUnionStringLiteralOperations # type: ignore +from ._operations import OptionalClientUnionIntLiteralOperations # type: ignore +from ._operations import OptionalClientUnionFloatLiteralOperations # type: ignore +from ._operations import OptionalClientRequiredAndOptionalOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BytesOperations", - "DatetimeOperations", - "DurationOperations", - "PlainDateOperations", - "PlainTimeOperations", - "CollectionsByteOperations", - "CollectionsModelOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "RequiredAndOptionalOperations", + "OptionalClientStringOperations", + "OptionalClientBytesOperations", + "OptionalClientDatetimeOperations", + "OptionalClientDurationOperations", + "OptionalClientPlainDateOperations", + "OptionalClientPlainTimeOperations", + "OptionalClientCollectionsByteOperations", + "OptionalClientCollectionsModelOperations", + "OptionalClientStringLiteralOperations", + "OptionalClientIntLiteralOperations", + "OptionalClientFloatLiteralOperations", + "OptionalClientBooleanLiteralOperations", + "OptionalClientUnionStringLiteralOperations", + "OptionalClientUnionIntLiteralOperations", + "OptionalClientUnionFloatLiteralOperations", + "OptionalClientRequiredAndOptionalOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py index c2941f995a..b983543e77 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-optional/typetest/property/optional/operations/_operations.py @@ -33,7 +33,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -47,7 +47,7 @@ def build_string_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -61,7 +61,7 @@ def build_string_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -75,7 +75,7 @@ def build_string_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -89,7 +89,7 @@ def build_string_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -103,7 +103,7 @@ def build_bytes_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -117,7 +117,7 @@ def build_bytes_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -131,7 +131,7 @@ def build_bytes_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_bytes_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -145,7 +145,7 @@ def build_bytes_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -159,7 +159,7 @@ def build_datetime_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -173,7 +173,7 @@ def build_datetime_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -187,7 +187,7 @@ def build_datetime_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_datetime_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -201,7 +201,7 @@ def build_datetime_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -215,7 +215,7 @@ def build_duration_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -229,7 +229,7 @@ def build_duration_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -243,7 +243,7 @@ def build_duration_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_duration_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -257,7 +257,7 @@ def build_duration_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -271,7 +271,7 @@ def build_plain_date_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -285,7 +285,7 @@ def build_plain_date_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -299,7 +299,7 @@ def build_plain_date_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -313,7 +313,7 @@ def build_plain_date_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -327,7 +327,7 @@ def build_plain_time_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -341,7 +341,7 @@ def build_plain_time_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -355,7 +355,7 @@ def build_plain_time_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -369,7 +369,9 @@ def build_plain_time_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_byte_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -383,7 +385,9 @@ def build_collections_byte_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_byte_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -397,7 +401,9 @@ def build_collections_byte_get_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_byte_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_byte_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -411,7 +417,9 @@ def build_collections_byte_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_byte_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_byte_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -425,7 +433,9 @@ def build_collections_byte_put_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_model_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -439,7 +449,9 @@ def build_collections_model_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_model_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -453,7 +465,9 @@ def build_collections_model_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_collections_model_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -467,7 +481,9 @@ def build_collections_model_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_collections_model_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -481,7 +497,7 @@ def build_collections_model_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -495,7 +511,9 @@ def build_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -509,7 +527,7 @@ def build_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -523,7 +541,9 @@ def build_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_string_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -537,7 +557,7 @@ def build_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -551,7 +571,9 @@ def build_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -565,7 +587,7 @@ def build_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -579,7 +601,9 @@ def build_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_int_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -593,7 +617,7 @@ def build_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -607,7 +631,9 @@ def build_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -621,7 +647,7 @@ def build_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -635,7 +661,9 @@ def build_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_float_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -649,7 +677,9 @@ def build_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_boolean_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -663,7 +693,9 @@ def build_boolean_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_boolean_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -677,7 +709,9 @@ def build_boolean_literal_get_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_boolean_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -691,7 +725,9 @@ def build_boolean_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_boolean_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -705,7 +741,9 @@ def build_boolean_literal_put_default_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -719,7 +757,9 @@ def build_union_string_literal_get_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -733,7 +773,9 @@ def build_union_string_literal_get_default_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -747,7 +789,9 @@ def build_union_string_literal_put_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_string_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -761,7 +805,9 @@ def build_union_string_literal_put_default_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_union_int_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -775,7 +821,9 @@ def build_union_int_literal_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_int_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -789,7 +837,9 @@ def build_union_int_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: +def build_optional_client_union_int_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -803,7 +853,9 @@ def build_union_int_literal_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_int_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -817,7 +869,9 @@ def build_union_int_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -831,7 +885,9 @@ def build_union_float_literal_get_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_get_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -845,7 +901,9 @@ def build_union_float_literal_get_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -859,7 +917,9 @@ def build_union_float_literal_put_all_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_union_float_literal_put_default_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -873,7 +933,9 @@ def build_union_float_literal_put_default_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_get_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_required_and_optional_get_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -887,7 +949,7 @@ def build_required_and_optional_get_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_get_required_only_request( # pylint: disable=name-too-long +def build_optional_client_required_and_optional_get_required_only_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -903,7 +965,9 @@ def build_required_and_optional_get_required_only_request( # pylint: disable=na return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_put_all_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_optional_client_required_and_optional_put_all_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -917,7 +981,7 @@ def build_required_and_optional_put_all_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_required_and_optional_put_required_only_request( # pylint: disable=name-too-long +def build_optional_client_required_and_optional_put_required_only_request( # pylint: disable=name-too-long **kwargs: Any, ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -933,14 +997,14 @@ def build_required_and_optional_put_required_only_request( # pylint: disable=na return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class StringOperations: +class OptionalClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`string` attribute. + :attr:`optional_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -970,7 +1034,7 @@ def get_all(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_all_request( + _request = build_optional_client_string_get_all_request( headers=_headers, params=_params, ) @@ -1023,7 +1087,7 @@ def get_default(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_default_request( + _request = build_optional_client_string_get_default_request( headers=_headers, params=_params, ) @@ -1130,7 +1194,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_all_request( + _request = build_optional_client_string_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1229,7 +1293,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_default_request( + _request = build_optional_client_string_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1253,14 +1317,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class OptionalClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`bytes` attribute. + :attr:`optional_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1290,7 +1354,7 @@ def get_all(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_all_request( + _request = build_optional_client_bytes_get_all_request( headers=_headers, params=_params, ) @@ -1343,7 +1407,7 @@ def get_default(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_default_request( + _request = build_optional_client_bytes_get_default_request( headers=_headers, params=_params, ) @@ -1450,7 +1514,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_all_request( + _request = build_optional_client_bytes_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1549,7 +1613,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_default_request( + _request = build_optional_client_bytes_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1573,14 +1637,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class OptionalClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`datetime` attribute. + :attr:`optional_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1610,7 +1674,7 @@ def get_all(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_all_request( + _request = build_optional_client_datetime_get_all_request( headers=_headers, params=_params, ) @@ -1663,7 +1727,7 @@ def get_default(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_default_request( + _request = build_optional_client_datetime_get_default_request( headers=_headers, params=_params, ) @@ -1770,7 +1834,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_all_request( + _request = build_optional_client_datetime_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -1869,7 +1933,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_default_request( + _request = build_optional_client_datetime_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -1893,14 +1957,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class OptionalClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`duration` attribute. + :attr:`optional_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1930,7 +1994,7 @@ def get_all(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_all_request( + _request = build_optional_client_duration_get_all_request( headers=_headers, params=_params, ) @@ -1983,7 +2047,7 @@ def get_default(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_default_request( + _request = build_optional_client_duration_get_default_request( headers=_headers, params=_params, ) @@ -2090,7 +2154,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_all_request( + _request = build_optional_client_duration_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2189,7 +2253,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_default_request( + _request = build_optional_client_duration_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2213,14 +2277,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class PlainDateOperations: +class OptionalClientPlainDateOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`plain_date` attribute. + :attr:`optional_client_plain_date` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2250,7 +2314,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_all_request( + _request = build_optional_client_plain_date_get_all_request( headers=_headers, params=_params, ) @@ -2303,7 +2367,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainDateProperty: cls: ClsType[_models.PlainDateProperty] = kwargs.pop("cls", None) - _request = build_plain_date_get_default_request( + _request = build_optional_client_plain_date_get_default_request( headers=_headers, params=_params, ) @@ -2412,7 +2476,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_all_request( + _request = build_optional_client_plain_date_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2511,7 +2575,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_date_put_default_request( + _request = build_optional_client_plain_date_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2535,14 +2599,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class PlainTimeOperations: +class OptionalClientPlainTimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`plain_time` attribute. + :attr:`optional_client_plain_time` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2572,7 +2636,7 @@ def get_all(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_all_request( + _request = build_optional_client_plain_time_get_all_request( headers=_headers, params=_params, ) @@ -2625,7 +2689,7 @@ def get_default(self, **kwargs: Any) -> _models.PlainTimeProperty: cls: ClsType[_models.PlainTimeProperty] = kwargs.pop("cls", None) - _request = build_plain_time_get_default_request( + _request = build_optional_client_plain_time_get_default_request( headers=_headers, params=_params, ) @@ -2734,7 +2798,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_all_request( + _request = build_optional_client_plain_time_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -2833,7 +2897,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_plain_time_put_default_request( + _request = build_optional_client_plain_time_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -2857,14 +2921,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsByteOperations: +class OptionalClientCollectionsByteOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`collections_byte` attribute. + :attr:`optional_client_collections_byte` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2894,7 +2958,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_all_request( + _request = build_optional_client_collections_byte_get_all_request( headers=_headers, params=_params, ) @@ -2947,7 +3011,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsByteProperty: cls: ClsType[_models.CollectionsByteProperty] = kwargs.pop("cls", None) - _request = build_collections_byte_get_default_request( + _request = build_optional_client_collections_byte_get_default_request( headers=_headers, params=_params, ) @@ -3056,7 +3120,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_all_request( + _request = build_optional_client_collections_byte_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3155,7 +3219,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_byte_put_default_request( + _request = build_optional_client_collections_byte_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3179,14 +3243,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class OptionalClientCollectionsModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`collections_model` attribute. + :attr:`optional_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3217,7 +3281,7 @@ def get_all(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_all_request( + _request = build_optional_client_collections_model_get_all_request( headers=_headers, params=_params, ) @@ -3271,7 +3335,7 @@ def get_default(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_default_request( + _request = build_optional_client_collections_model_get_default_request( headers=_headers, params=_params, ) @@ -3380,7 +3444,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_all_request( + _request = build_optional_client_collections_model_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3479,7 +3543,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_default_request( + _request = build_optional_client_collections_model_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3503,14 +3567,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class OptionalClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`string_literal` attribute. + :attr:`optional_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3540,7 +3604,7 @@ def get_all(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_all_request( + _request = build_optional_client_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -3593,7 +3657,7 @@ def get_default(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_default_request( + _request = build_optional_client_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -3702,7 +3766,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_all_request( + _request = build_optional_client_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -3801,7 +3865,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_default_request( + _request = build_optional_client_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -3825,14 +3889,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class OptionalClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`int_literal` attribute. + :attr:`optional_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3862,7 +3926,7 @@ def get_all(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_all_request( + _request = build_optional_client_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -3915,7 +3979,7 @@ def get_default(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_default_request( + _request = build_optional_client_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -4024,7 +4088,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_all_request( + _request = build_optional_client_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4123,7 +4187,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_default_request( + _request = build_optional_client_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4147,14 +4211,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class OptionalClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`float_literal` attribute. + :attr:`optional_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4184,7 +4248,7 @@ def get_all(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_all_request( + _request = build_optional_client_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -4237,7 +4301,7 @@ def get_default(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_default_request( + _request = build_optional_client_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -4346,7 +4410,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_all_request( + _request = build_optional_client_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4445,7 +4509,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_default_request( + _request = build_optional_client_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4469,14 +4533,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class OptionalClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`boolean_literal` attribute. + :attr:`optional_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4506,7 +4570,7 @@ def get_all(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_all_request( + _request = build_optional_client_boolean_literal_get_all_request( headers=_headers, params=_params, ) @@ -4559,7 +4623,7 @@ def get_default(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_default_request( + _request = build_optional_client_boolean_literal_get_default_request( headers=_headers, params=_params, ) @@ -4668,7 +4732,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_all_request( + _request = build_optional_client_boolean_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -4767,7 +4831,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_default_request( + _request = build_optional_client_boolean_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -4791,14 +4855,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class OptionalClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_string_literal` attribute. + :attr:`optional_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4829,7 +4893,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_all_request( + _request = build_optional_client_union_string_literal_get_all_request( headers=_headers, params=_params, ) @@ -4883,7 +4947,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_default_request( + _request = build_optional_client_union_string_literal_get_default_request( headers=_headers, params=_params, ) @@ -4993,7 +5057,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_all_request( + _request = build_optional_client_union_string_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5093,7 +5157,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_default_request( + _request = build_optional_client_union_string_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5117,14 +5181,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class OptionalClientUnionIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_int_literal` attribute. + :attr:`optional_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5154,7 +5218,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_all_request( + _request = build_optional_client_union_int_literal_get_all_request( headers=_headers, params=_params, ) @@ -5207,7 +5271,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_default_request( + _request = build_optional_client_union_int_literal_get_default_request( headers=_headers, params=_params, ) @@ -5316,7 +5380,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_all_request( + _request = build_optional_client_union_int_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5415,7 +5479,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_default_request( + _request = build_optional_client_union_int_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5439,14 +5503,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class OptionalClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`union_float_literal` attribute. + :attr:`optional_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5477,7 +5541,7 @@ def get_all(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_all_request( + _request = build_optional_client_union_float_literal_get_all_request( headers=_headers, params=_params, ) @@ -5531,7 +5595,7 @@ def get_default(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_default_request( + _request = build_optional_client_union_float_literal_get_default_request( headers=_headers, params=_params, ) @@ -5641,7 +5705,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_all_request( + _request = build_optional_client_union_float_literal_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -5741,7 +5805,7 @@ def put_default( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_default_request( + _request = build_optional_client_union_float_literal_put_default_request( content_type=content_type, content=_content, headers=_headers, @@ -5765,14 +5829,14 @@ def put_default( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class RequiredAndOptionalOperations: +class OptionalClientRequiredAndOptionalOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.optional.OptionalClient`'s - :attr:`required_and_optional` attribute. + :attr:`optional_client_required_and_optional` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5803,7 +5867,7 @@ def get_all(self, **kwargs: Any) -> _models.RequiredAndOptionalProperty: cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_all_request( + _request = build_optional_client_required_and_optional_get_all_request( headers=_headers, params=_params, ) @@ -5857,7 +5921,7 @@ def get_required_only(self, **kwargs: Any) -> _models.RequiredAndOptionalPropert cls: ClsType[_models.RequiredAndOptionalProperty] = kwargs.pop("cls", None) - _request = build_required_and_optional_get_required_only_request( + _request = build_optional_client_required_and_optional_get_required_only_request( headers=_headers, params=_params, ) @@ -5967,7 +6031,7 @@ def put_all( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_all_request( + _request = build_optional_client_required_and_optional_put_all_request( content_type=content_type, content=_content, headers=_headers, @@ -6067,7 +6131,7 @@ def put_required_only( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_required_and_optional_put_required_only_request( + _request = build_optional_client_required_and_optional_put_required_only_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py index 920e91040c..2f299581af 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/_client.py @@ -10,102 +10,134 @@ from ._configuration import ValueTypesClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanLiteralOperations, - BooleanOperations, - BytesOperations, - CollectionsIntOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - Decimal128Operations, - DecimalOperations, - DictionaryStringOperations, - DurationOperations, - EnumOperations, - ExtensibleEnumOperations, - FloatLiteralOperations, - FloatOperations, - IntLiteralOperations, - IntOperations, - ModelOperations, - NeverOperations, - StringLiteralOperations, - StringOperations, - UnionEnumValueOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, - UnknownArrayOperations, - UnknownDictOperations, - UnknownIntOperations, - UnknownStringOperations, + ValueTypesClientBooleanLiteralOperations, + ValueTypesClientBooleanOperations, + ValueTypesClientBytesOperations, + ValueTypesClientCollectionsIntOperations, + ValueTypesClientCollectionsModelOperations, + ValueTypesClientCollectionsStringOperations, + ValueTypesClientDatetimeOperations, + ValueTypesClientDecimal128Operations, + ValueTypesClientDecimalOperations, + ValueTypesClientDictionaryStringOperations, + ValueTypesClientDurationOperations, + ValueTypesClientEnumOperations, + ValueTypesClientExtensibleEnumOperations, + ValueTypesClientFloatLiteralOperations, + ValueTypesClientFloatOperations, + ValueTypesClientIntLiteralOperations, + ValueTypesClientIntOperations, + ValueTypesClientModelOperations, + ValueTypesClientNeverOperations, + ValueTypesClientStringLiteralOperations, + ValueTypesClientStringOperations, + ValueTypesClientUnionEnumValueOperations, + ValueTypesClientUnionFloatLiteralOperations, + ValueTypesClientUnionIntLiteralOperations, + ValueTypesClientUnionStringLiteralOperations, + ValueTypesClientUnknownArrayOperations, + ValueTypesClientUnknownDictOperations, + ValueTypesClientUnknownIntOperations, + ValueTypesClientUnknownStringOperations, ) class ValueTypesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various property types for models. - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.property.valuetypes.operations.BooleanOperations - :ivar string: StringOperations operations - :vartype string: typetest.property.valuetypes.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.valuetypes.operations.BytesOperations - :ivar int_operations: IntOperations operations - :vartype int_operations: typetest.property.valuetypes.operations.IntOperations - :ivar float: FloatOperations operations - :vartype float: typetest.property.valuetypes.operations.FloatOperations - :ivar decimal: DecimalOperations operations - :vartype decimal: typetest.property.valuetypes.operations.DecimalOperations - :ivar decimal128: Decimal128Operations operations - :vartype decimal128: typetest.property.valuetypes.operations.Decimal128Operations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.valuetypes.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.valuetypes.operations.DurationOperations - :ivar enum: EnumOperations operations - :vartype enum: typetest.property.valuetypes.operations.EnumOperations - :ivar extensible_enum: ExtensibleEnumOperations operations - :vartype extensible_enum: typetest.property.valuetypes.operations.ExtensibleEnumOperations - :ivar model: ModelOperations operations - :vartype model: typetest.property.valuetypes.operations.ModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.valuetypes.operations.CollectionsStringOperations - :ivar collections_int: CollectionsIntOperations operations - :vartype collections_int: typetest.property.valuetypes.operations.CollectionsIntOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: typetest.property.valuetypes.operations.CollectionsModelOperations - :ivar dictionary_string: DictionaryStringOperations operations - :vartype dictionary_string: typetest.property.valuetypes.operations.DictionaryStringOperations - :ivar never: NeverOperations operations - :vartype never: typetest.property.valuetypes.operations.NeverOperations - :ivar unknown_string: UnknownStringOperations operations - :vartype unknown_string: typetest.property.valuetypes.operations.UnknownStringOperations - :ivar unknown_int: UnknownIntOperations operations - :vartype unknown_int: typetest.property.valuetypes.operations.UnknownIntOperations - :ivar unknown_dict: UnknownDictOperations operations - :vartype unknown_dict: typetest.property.valuetypes.operations.UnknownDictOperations - :ivar unknown_array: UnknownArrayOperations operations - :vartype unknown_array: typetest.property.valuetypes.operations.UnknownArrayOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.valuetypes.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.valuetypes.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.valuetypes.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.valuetypes.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.valuetypes.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: typetest.property.valuetypes.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.valuetypes.operations.UnionFloatLiteralOperations - :ivar union_enum_value: UnionEnumValueOperations operations - :vartype union_enum_value: typetest.property.valuetypes.operations.UnionEnumValueOperations + :ivar value_types_client_boolean: ValueTypesClientBooleanOperations operations + :vartype value_types_client_boolean: + typetest.property.valuetypes.operations.ValueTypesClientBooleanOperations + :ivar value_types_client_string: ValueTypesClientStringOperations operations + :vartype value_types_client_string: + typetest.property.valuetypes.operations.ValueTypesClientStringOperations + :ivar value_types_client_bytes: ValueTypesClientBytesOperations operations + :vartype value_types_client_bytes: + typetest.property.valuetypes.operations.ValueTypesClientBytesOperations + :ivar value_types_client_int: ValueTypesClientIntOperations operations + :vartype value_types_client_int: + typetest.property.valuetypes.operations.ValueTypesClientIntOperations + :ivar value_types_client_float: ValueTypesClientFloatOperations operations + :vartype value_types_client_float: + typetest.property.valuetypes.operations.ValueTypesClientFloatOperations + :ivar value_types_client_decimal: ValueTypesClientDecimalOperations operations + :vartype value_types_client_decimal: + typetest.property.valuetypes.operations.ValueTypesClientDecimalOperations + :ivar value_types_client_decimal128: ValueTypesClientDecimal128Operations operations + :vartype value_types_client_decimal128: + typetest.property.valuetypes.operations.ValueTypesClientDecimal128Operations + :ivar value_types_client_datetime: ValueTypesClientDatetimeOperations operations + :vartype value_types_client_datetime: + typetest.property.valuetypes.operations.ValueTypesClientDatetimeOperations + :ivar value_types_client_duration: ValueTypesClientDurationOperations operations + :vartype value_types_client_duration: + typetest.property.valuetypes.operations.ValueTypesClientDurationOperations + :ivar value_types_client_enum: ValueTypesClientEnumOperations operations + :vartype value_types_client_enum: + typetest.property.valuetypes.operations.ValueTypesClientEnumOperations + :ivar value_types_client_extensible_enum: ValueTypesClientExtensibleEnumOperations operations + :vartype value_types_client_extensible_enum: + typetest.property.valuetypes.operations.ValueTypesClientExtensibleEnumOperations + :ivar value_types_client_model: ValueTypesClientModelOperations operations + :vartype value_types_client_model: + typetest.property.valuetypes.operations.ValueTypesClientModelOperations + :ivar value_types_client_collections_string: ValueTypesClientCollectionsStringOperations + operations + :vartype value_types_client_collections_string: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsStringOperations + :ivar value_types_client_collections_int: ValueTypesClientCollectionsIntOperations operations + :vartype value_types_client_collections_int: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsIntOperations + :ivar value_types_client_collections_model: ValueTypesClientCollectionsModelOperations + operations + :vartype value_types_client_collections_model: + typetest.property.valuetypes.operations.ValueTypesClientCollectionsModelOperations + :ivar value_types_client_dictionary_string: ValueTypesClientDictionaryStringOperations + operations + :vartype value_types_client_dictionary_string: + typetest.property.valuetypes.operations.ValueTypesClientDictionaryStringOperations + :ivar value_types_client_never: ValueTypesClientNeverOperations operations + :vartype value_types_client_never: + typetest.property.valuetypes.operations.ValueTypesClientNeverOperations + :ivar value_types_client_unknown_string: ValueTypesClientUnknownStringOperations operations + :vartype value_types_client_unknown_string: + typetest.property.valuetypes.operations.ValueTypesClientUnknownStringOperations + :ivar value_types_client_unknown_int: ValueTypesClientUnknownIntOperations operations + :vartype value_types_client_unknown_int: + typetest.property.valuetypes.operations.ValueTypesClientUnknownIntOperations + :ivar value_types_client_unknown_dict: ValueTypesClientUnknownDictOperations operations + :vartype value_types_client_unknown_dict: + typetest.property.valuetypes.operations.ValueTypesClientUnknownDictOperations + :ivar value_types_client_unknown_array: ValueTypesClientUnknownArrayOperations operations + :vartype value_types_client_unknown_array: + typetest.property.valuetypes.operations.ValueTypesClientUnknownArrayOperations + :ivar value_types_client_string_literal: ValueTypesClientStringLiteralOperations operations + :vartype value_types_client_string_literal: + typetest.property.valuetypes.operations.ValueTypesClientStringLiteralOperations + :ivar value_types_client_int_literal: ValueTypesClientIntLiteralOperations operations + :vartype value_types_client_int_literal: + typetest.property.valuetypes.operations.ValueTypesClientIntLiteralOperations + :ivar value_types_client_float_literal: ValueTypesClientFloatLiteralOperations operations + :vartype value_types_client_float_literal: + typetest.property.valuetypes.operations.ValueTypesClientFloatLiteralOperations + :ivar value_types_client_boolean_literal: ValueTypesClientBooleanLiteralOperations operations + :vartype value_types_client_boolean_literal: + typetest.property.valuetypes.operations.ValueTypesClientBooleanLiteralOperations + :ivar value_types_client_union_string_literal: ValueTypesClientUnionStringLiteralOperations + operations + :vartype value_types_client_union_string_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionStringLiteralOperations + :ivar value_types_client_union_int_literal: ValueTypesClientUnionIntLiteralOperations + operations + :vartype value_types_client_union_int_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionIntLiteralOperations + :ivar value_types_client_union_float_literal: ValueTypesClientUnionFloatLiteralOperations + operations + :vartype value_types_client_union_float_literal: + typetest.property.valuetypes.operations.ValueTypesClientUnionFloatLiteralOperations + :ivar value_types_client_union_enum_value: ValueTypesClientUnionEnumValueOperations operations + :vartype value_types_client_union_enum_value: + typetest.property.valuetypes.operations.ValueTypesClientUnionEnumValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -132,47 +164,93 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_operations = IntOperations(self._client, self._config, self._serialize, self._deserialize) - self.float = FloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal = DecimalOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128 = Decimal128Operations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.enum = EnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensible_enum = ExtensibleEnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_string = CollectionsStringOperations( + self.value_types_client_boolean = ValueTypesClientBooleanOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_int = CollectionsIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_model = CollectionsModelOperations( + self.value_types_client_string = ValueTypesClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.dictionary_string = DictionaryStringOperations( + self.value_types_client_bytes = ValueTypesClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.never = NeverOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_string = UnknownStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_int = UnknownIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_dict = UnknownDictOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_array = UnknownArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.value_types_client_int = ValueTypesClientIntOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.value_types_client_float = ValueTypesClientFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.value_types_client_decimal = ValueTypesClientDecimalOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_decimal128 = ValueTypesClientDecimal128Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_datetime = ValueTypesClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_duration = ValueTypesClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_enum = ValueTypesClientEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_extensible_enum = ValueTypesClientExtensibleEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_model = ValueTypesClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_string = ValueTypesClientCollectionsStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_int = ValueTypesClientCollectionsIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_model = ValueTypesClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_dictionary_string = ValueTypesClientDictionaryStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_never = ValueTypesClientNeverOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_string = ValueTypesClientUnknownStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_int = ValueTypesClientUnknownIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_dict = ValueTypesClientUnknownDictOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_array = ValueTypesClientUnknownArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_string_literal = ValueTypesClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_int_literal = ValueTypesClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_float_literal = ValueTypesClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_boolean_literal = ValueTypesClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_string_literal = ValueTypesClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_int_literal = ValueTypesClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_float_literal = ValueTypesClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_enum_value = ValueTypesClientUnionEnumValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_enum_value = UnionEnumValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py index 529c61c49a..997808b620 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/_client.py @@ -10,105 +10,134 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ValueTypesClientConfiguration from .operations import ( - BooleanLiteralOperations, - BooleanOperations, - BytesOperations, - CollectionsIntOperations, - CollectionsModelOperations, - CollectionsStringOperations, - DatetimeOperations, - Decimal128Operations, - DecimalOperations, - DictionaryStringOperations, - DurationOperations, - EnumOperations, - ExtensibleEnumOperations, - FloatLiteralOperations, - FloatOperations, - IntLiteralOperations, - IntOperations, - ModelOperations, - NeverOperations, - StringLiteralOperations, - StringOperations, - UnionEnumValueOperations, - UnionFloatLiteralOperations, - UnionIntLiteralOperations, - UnionStringLiteralOperations, - UnknownArrayOperations, - UnknownDictOperations, - UnknownIntOperations, - UnknownStringOperations, + ValueTypesClientBooleanLiteralOperations, + ValueTypesClientBooleanOperations, + ValueTypesClientBytesOperations, + ValueTypesClientCollectionsIntOperations, + ValueTypesClientCollectionsModelOperations, + ValueTypesClientCollectionsStringOperations, + ValueTypesClientDatetimeOperations, + ValueTypesClientDecimal128Operations, + ValueTypesClientDecimalOperations, + ValueTypesClientDictionaryStringOperations, + ValueTypesClientDurationOperations, + ValueTypesClientEnumOperations, + ValueTypesClientExtensibleEnumOperations, + ValueTypesClientFloatLiteralOperations, + ValueTypesClientFloatOperations, + ValueTypesClientIntLiteralOperations, + ValueTypesClientIntOperations, + ValueTypesClientModelOperations, + ValueTypesClientNeverOperations, + ValueTypesClientStringLiteralOperations, + ValueTypesClientStringOperations, + ValueTypesClientUnionEnumValueOperations, + ValueTypesClientUnionFloatLiteralOperations, + ValueTypesClientUnionIntLiteralOperations, + ValueTypesClientUnionStringLiteralOperations, + ValueTypesClientUnknownArrayOperations, + ValueTypesClientUnknownDictOperations, + ValueTypesClientUnknownIntOperations, + ValueTypesClientUnknownStringOperations, ) class ValueTypesClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Illustrates various property types for models. - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.property.valuetypes.aio.operations.BooleanOperations - :ivar string: StringOperations operations - :vartype string: typetest.property.valuetypes.aio.operations.StringOperations - :ivar bytes: BytesOperations operations - :vartype bytes: typetest.property.valuetypes.aio.operations.BytesOperations - :ivar int_operations: IntOperations operations - :vartype int_operations: typetest.property.valuetypes.aio.operations.IntOperations - :ivar float: FloatOperations operations - :vartype float: typetest.property.valuetypes.aio.operations.FloatOperations - :ivar decimal: DecimalOperations operations - :vartype decimal: typetest.property.valuetypes.aio.operations.DecimalOperations - :ivar decimal128: Decimal128Operations operations - :vartype decimal128: typetest.property.valuetypes.aio.operations.Decimal128Operations - :ivar datetime: DatetimeOperations operations - :vartype datetime: typetest.property.valuetypes.aio.operations.DatetimeOperations - :ivar duration: DurationOperations operations - :vartype duration: typetest.property.valuetypes.aio.operations.DurationOperations - :ivar enum: EnumOperations operations - :vartype enum: typetest.property.valuetypes.aio.operations.EnumOperations - :ivar extensible_enum: ExtensibleEnumOperations operations - :vartype extensible_enum: typetest.property.valuetypes.aio.operations.ExtensibleEnumOperations - :ivar model: ModelOperations operations - :vartype model: typetest.property.valuetypes.aio.operations.ModelOperations - :ivar collections_string: CollectionsStringOperations operations - :vartype collections_string: - typetest.property.valuetypes.aio.operations.CollectionsStringOperations - :ivar collections_int: CollectionsIntOperations operations - :vartype collections_int: typetest.property.valuetypes.aio.operations.CollectionsIntOperations - :ivar collections_model: CollectionsModelOperations operations - :vartype collections_model: - typetest.property.valuetypes.aio.operations.CollectionsModelOperations - :ivar dictionary_string: DictionaryStringOperations operations - :vartype dictionary_string: - typetest.property.valuetypes.aio.operations.DictionaryStringOperations - :ivar never: NeverOperations operations - :vartype never: typetest.property.valuetypes.aio.operations.NeverOperations - :ivar unknown_string: UnknownStringOperations operations - :vartype unknown_string: typetest.property.valuetypes.aio.operations.UnknownStringOperations - :ivar unknown_int: UnknownIntOperations operations - :vartype unknown_int: typetest.property.valuetypes.aio.operations.UnknownIntOperations - :ivar unknown_dict: UnknownDictOperations operations - :vartype unknown_dict: typetest.property.valuetypes.aio.operations.UnknownDictOperations - :ivar unknown_array: UnknownArrayOperations operations - :vartype unknown_array: typetest.property.valuetypes.aio.operations.UnknownArrayOperations - :ivar string_literal: StringLiteralOperations operations - :vartype string_literal: typetest.property.valuetypes.aio.operations.StringLiteralOperations - :ivar int_literal: IntLiteralOperations operations - :vartype int_literal: typetest.property.valuetypes.aio.operations.IntLiteralOperations - :ivar float_literal: FloatLiteralOperations operations - :vartype float_literal: typetest.property.valuetypes.aio.operations.FloatLiteralOperations - :ivar boolean_literal: BooleanLiteralOperations operations - :vartype boolean_literal: typetest.property.valuetypes.aio.operations.BooleanLiteralOperations - :ivar union_string_literal: UnionStringLiteralOperations operations - :vartype union_string_literal: - typetest.property.valuetypes.aio.operations.UnionStringLiteralOperations - :ivar union_int_literal: UnionIntLiteralOperations operations - :vartype union_int_literal: - typetest.property.valuetypes.aio.operations.UnionIntLiteralOperations - :ivar union_float_literal: UnionFloatLiteralOperations operations - :vartype union_float_literal: - typetest.property.valuetypes.aio.operations.UnionFloatLiteralOperations - :ivar union_enum_value: UnionEnumValueOperations operations - :vartype union_enum_value: typetest.property.valuetypes.aio.operations.UnionEnumValueOperations + :ivar value_types_client_boolean: ValueTypesClientBooleanOperations operations + :vartype value_types_client_boolean: + typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanOperations + :ivar value_types_client_string: ValueTypesClientStringOperations operations + :vartype value_types_client_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientStringOperations + :ivar value_types_client_bytes: ValueTypesClientBytesOperations operations + :vartype value_types_client_bytes: + typetest.property.valuetypes.aio.operations.ValueTypesClientBytesOperations + :ivar value_types_client_int: ValueTypesClientIntOperations operations + :vartype value_types_client_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientIntOperations + :ivar value_types_client_float: ValueTypesClientFloatOperations operations + :vartype value_types_client_float: + typetest.property.valuetypes.aio.operations.ValueTypesClientFloatOperations + :ivar value_types_client_decimal: ValueTypesClientDecimalOperations operations + :vartype value_types_client_decimal: + typetest.property.valuetypes.aio.operations.ValueTypesClientDecimalOperations + :ivar value_types_client_decimal128: ValueTypesClientDecimal128Operations operations + :vartype value_types_client_decimal128: + typetest.property.valuetypes.aio.operations.ValueTypesClientDecimal128Operations + :ivar value_types_client_datetime: ValueTypesClientDatetimeOperations operations + :vartype value_types_client_datetime: + typetest.property.valuetypes.aio.operations.ValueTypesClientDatetimeOperations + :ivar value_types_client_duration: ValueTypesClientDurationOperations operations + :vartype value_types_client_duration: + typetest.property.valuetypes.aio.operations.ValueTypesClientDurationOperations + :ivar value_types_client_enum: ValueTypesClientEnumOperations operations + :vartype value_types_client_enum: + typetest.property.valuetypes.aio.operations.ValueTypesClientEnumOperations + :ivar value_types_client_extensible_enum: ValueTypesClientExtensibleEnumOperations operations + :vartype value_types_client_extensible_enum: + typetest.property.valuetypes.aio.operations.ValueTypesClientExtensibleEnumOperations + :ivar value_types_client_model: ValueTypesClientModelOperations operations + :vartype value_types_client_model: + typetest.property.valuetypes.aio.operations.ValueTypesClientModelOperations + :ivar value_types_client_collections_string: ValueTypesClientCollectionsStringOperations + operations + :vartype value_types_client_collections_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsStringOperations + :ivar value_types_client_collections_int: ValueTypesClientCollectionsIntOperations operations + :vartype value_types_client_collections_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsIntOperations + :ivar value_types_client_collections_model: ValueTypesClientCollectionsModelOperations + operations + :vartype value_types_client_collections_model: + typetest.property.valuetypes.aio.operations.ValueTypesClientCollectionsModelOperations + :ivar value_types_client_dictionary_string: ValueTypesClientDictionaryStringOperations + operations + :vartype value_types_client_dictionary_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientDictionaryStringOperations + :ivar value_types_client_never: ValueTypesClientNeverOperations operations + :vartype value_types_client_never: + typetest.property.valuetypes.aio.operations.ValueTypesClientNeverOperations + :ivar value_types_client_unknown_string: ValueTypesClientUnknownStringOperations operations + :vartype value_types_client_unknown_string: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownStringOperations + :ivar value_types_client_unknown_int: ValueTypesClientUnknownIntOperations operations + :vartype value_types_client_unknown_int: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownIntOperations + :ivar value_types_client_unknown_dict: ValueTypesClientUnknownDictOperations operations + :vartype value_types_client_unknown_dict: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownDictOperations + :ivar value_types_client_unknown_array: ValueTypesClientUnknownArrayOperations operations + :vartype value_types_client_unknown_array: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnknownArrayOperations + :ivar value_types_client_string_literal: ValueTypesClientStringLiteralOperations operations + :vartype value_types_client_string_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientStringLiteralOperations + :ivar value_types_client_int_literal: ValueTypesClientIntLiteralOperations operations + :vartype value_types_client_int_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientIntLiteralOperations + :ivar value_types_client_float_literal: ValueTypesClientFloatLiteralOperations operations + :vartype value_types_client_float_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientFloatLiteralOperations + :ivar value_types_client_boolean_literal: ValueTypesClientBooleanLiteralOperations operations + :vartype value_types_client_boolean_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientBooleanLiteralOperations + :ivar value_types_client_union_string_literal: ValueTypesClientUnionStringLiteralOperations + operations + :vartype value_types_client_union_string_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionStringLiteralOperations + :ivar value_types_client_union_int_literal: ValueTypesClientUnionIntLiteralOperations + operations + :vartype value_types_client_union_int_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionIntLiteralOperations + :ivar value_types_client_union_float_literal: ValueTypesClientUnionFloatLiteralOperations + operations + :vartype value_types_client_union_float_literal: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionFloatLiteralOperations + :ivar value_types_client_union_enum_value: ValueTypesClientUnionEnumValueOperations operations + :vartype value_types_client_union_enum_value: + typetest.property.valuetypes.aio.operations.ValueTypesClientUnionEnumValueOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -135,47 +164,93 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.bytes = BytesOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_operations = IntOperations(self._client, self._config, self._serialize, self._deserialize) - self.float = FloatOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal = DecimalOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128 = Decimal128Operations(self._client, self._config, self._serialize, self._deserialize) - self.datetime = DatetimeOperations(self._client, self._config, self._serialize, self._deserialize) - self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize) - self.enum = EnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.extensible_enum = ExtensibleEnumOperations(self._client, self._config, self._serialize, self._deserialize) - self.model = ModelOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_string = CollectionsStringOperations( + self.value_types_client_boolean = ValueTypesClientBooleanOperations( self._client, self._config, self._serialize, self._deserialize ) - self.collections_int = CollectionsIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.collections_model = CollectionsModelOperations( + self.value_types_client_string = ValueTypesClientStringOperations( self._client, self._config, self._serialize, self._deserialize ) - self.dictionary_string = DictionaryStringOperations( + self.value_types_client_bytes = ValueTypesClientBytesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.never = NeverOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_string = UnknownStringOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_int = UnknownIntOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_dict = UnknownDictOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown_array = UnknownArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_literal = StringLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.int_literal = IntLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.float_literal = FloatLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean_literal = BooleanLiteralOperations(self._client, self._config, self._serialize, self._deserialize) - self.union_string_literal = UnionStringLiteralOperations( + self.value_types_client_int = ValueTypesClientIntOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_int_literal = UnionIntLiteralOperations( + self.value_types_client_float = ValueTypesClientFloatOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_float_literal = UnionFloatLiteralOperations( + self.value_types_client_decimal = ValueTypesClientDecimalOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_decimal128 = ValueTypesClientDecimal128Operations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_datetime = ValueTypesClientDatetimeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_duration = ValueTypesClientDurationOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_enum = ValueTypesClientEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_extensible_enum = ValueTypesClientExtensibleEnumOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_model = ValueTypesClientModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_string = ValueTypesClientCollectionsStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_int = ValueTypesClientCollectionsIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_collections_model = ValueTypesClientCollectionsModelOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_dictionary_string = ValueTypesClientDictionaryStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_never = ValueTypesClientNeverOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_string = ValueTypesClientUnknownStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_int = ValueTypesClientUnknownIntOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_dict = ValueTypesClientUnknownDictOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_unknown_array = ValueTypesClientUnknownArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_string_literal = ValueTypesClientStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_int_literal = ValueTypesClientIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_float_literal = ValueTypesClientFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_boolean_literal = ValueTypesClientBooleanLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_string_literal = ValueTypesClientUnionStringLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_int_literal = ValueTypesClientUnionIntLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_float_literal = ValueTypesClientUnionFloatLiteralOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.value_types_client_union_enum_value = ValueTypesClientUnionEnumValueOperations( self._client, self._config, self._serialize, self._deserialize ) - self.union_enum_value = UnionEnumValueOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py index f8e55f8ae4..9d30a2f896 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/__init__.py @@ -6,70 +6,70 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BooleanOperations # type: ignore -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import IntOperations # type: ignore -from ._operations import FloatOperations # type: ignore -from ._operations import DecimalOperations # type: ignore -from ._operations import Decimal128Operations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import EnumOperations # type: ignore -from ._operations import ExtensibleEnumOperations # type: ignore -from ._operations import ModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore -from ._operations import CollectionsIntOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import DictionaryStringOperations # type: ignore -from ._operations import NeverOperations # type: ignore -from ._operations import UnknownStringOperations # type: ignore -from ._operations import UnknownIntOperations # type: ignore -from ._operations import UnknownDictOperations # type: ignore -from ._operations import UnknownArrayOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import UnionEnumValueOperations # type: ignore +from ._operations import ValueTypesClientBooleanOperations # type: ignore +from ._operations import ValueTypesClientStringOperations # type: ignore +from ._operations import ValueTypesClientBytesOperations # type: ignore +from ._operations import ValueTypesClientIntOperations # type: ignore +from ._operations import ValueTypesClientFloatOperations # type: ignore +from ._operations import ValueTypesClientDecimalOperations # type: ignore +from ._operations import ValueTypesClientDecimal128Operations # type: ignore +from ._operations import ValueTypesClientDatetimeOperations # type: ignore +from ._operations import ValueTypesClientDurationOperations # type: ignore +from ._operations import ValueTypesClientEnumOperations # type: ignore +from ._operations import ValueTypesClientExtensibleEnumOperations # type: ignore +from ._operations import ValueTypesClientModelOperations # type: ignore +from ._operations import ValueTypesClientCollectionsStringOperations # type: ignore +from ._operations import ValueTypesClientCollectionsIntOperations # type: ignore +from ._operations import ValueTypesClientCollectionsModelOperations # type: ignore +from ._operations import ValueTypesClientDictionaryStringOperations # type: ignore +from ._operations import ValueTypesClientNeverOperations # type: ignore +from ._operations import ValueTypesClientUnknownStringOperations # type: ignore +from ._operations import ValueTypesClientUnknownIntOperations # type: ignore +from ._operations import ValueTypesClientUnknownDictOperations # type: ignore +from ._operations import ValueTypesClientUnknownArrayOperations # type: ignore +from ._operations import ValueTypesClientStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientBooleanLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionEnumValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BooleanOperations", - "StringOperations", - "BytesOperations", - "IntOperations", - "FloatOperations", - "DecimalOperations", - "Decimal128Operations", - "DatetimeOperations", - "DurationOperations", - "EnumOperations", - "ExtensibleEnumOperations", - "ModelOperations", - "CollectionsStringOperations", - "CollectionsIntOperations", - "CollectionsModelOperations", - "DictionaryStringOperations", - "NeverOperations", - "UnknownStringOperations", - "UnknownIntOperations", - "UnknownDictOperations", - "UnknownArrayOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "UnionEnumValueOperations", + "ValueTypesClientBooleanOperations", + "ValueTypesClientStringOperations", + "ValueTypesClientBytesOperations", + "ValueTypesClientIntOperations", + "ValueTypesClientFloatOperations", + "ValueTypesClientDecimalOperations", + "ValueTypesClientDecimal128Operations", + "ValueTypesClientDatetimeOperations", + "ValueTypesClientDurationOperations", + "ValueTypesClientEnumOperations", + "ValueTypesClientExtensibleEnumOperations", + "ValueTypesClientModelOperations", + "ValueTypesClientCollectionsStringOperations", + "ValueTypesClientCollectionsIntOperations", + "ValueTypesClientCollectionsModelOperations", + "ValueTypesClientDictionaryStringOperations", + "ValueTypesClientNeverOperations", + "ValueTypesClientUnknownStringOperations", + "ValueTypesClientUnknownIntOperations", + "ValueTypesClientUnknownDictOperations", + "ValueTypesClientUnknownArrayOperations", + "ValueTypesClientStringLiteralOperations", + "ValueTypesClientIntLiteralOperations", + "ValueTypesClientFloatLiteralOperations", + "ValueTypesClientBooleanLiteralOperations", + "ValueTypesClientUnionStringLiteralOperations", + "ValueTypesClientUnionIntLiteralOperations", + "ValueTypesClientUnionFloatLiteralOperations", + "ValueTypesClientUnionEnumValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py index bf985cdf9b..ec8ea4c93e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/aio/operations/_operations.py @@ -24,64 +24,64 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_get_request, - build_boolean_literal_get_request, - build_boolean_literal_put_request, - build_boolean_put_request, - build_bytes_get_request, - build_bytes_put_request, - build_collections_int_get_request, - build_collections_int_put_request, - build_collections_model_get_request, - build_collections_model_put_request, - build_collections_string_get_request, - build_collections_string_put_request, - build_datetime_get_request, - build_datetime_put_request, - build_decimal128_get_request, - build_decimal128_put_request, - build_decimal_get_request, - build_decimal_put_request, - build_dictionary_string_get_request, - build_dictionary_string_put_request, - build_duration_get_request, - build_duration_put_request, - build_enum_get_request, - build_enum_put_request, - build_extensible_enum_get_request, - build_extensible_enum_put_request, - build_float_get_request, - build_float_literal_get_request, - build_float_literal_put_request, - build_float_put_request, - build_int_literal_get_request, - build_int_literal_put_request, - build_int_operations_get_request, - build_int_operations_put_request, - build_model_get_request, - build_model_put_request, - build_never_get_request, - build_never_put_request, - build_string_get_request, - build_string_literal_get_request, - build_string_literal_put_request, - build_string_put_request, - build_union_enum_value_get_request, - build_union_enum_value_put_request, - build_union_float_literal_get_request, - build_union_float_literal_put_request, - build_union_int_literal_get_request, - build_union_int_literal_put_request, - build_union_string_literal_get_request, - build_union_string_literal_put_request, - build_unknown_array_get_request, - build_unknown_array_put_request, - build_unknown_dict_get_request, - build_unknown_dict_put_request, - build_unknown_int_get_request, - build_unknown_int_put_request, - build_unknown_string_get_request, - build_unknown_string_put_request, + build_value_types_client_boolean_get_request, + build_value_types_client_boolean_literal_get_request, + build_value_types_client_boolean_literal_put_request, + build_value_types_client_boolean_put_request, + build_value_types_client_bytes_get_request, + build_value_types_client_bytes_put_request, + build_value_types_client_collections_int_get_request, + build_value_types_client_collections_int_put_request, + build_value_types_client_collections_model_get_request, + build_value_types_client_collections_model_put_request, + build_value_types_client_collections_string_get_request, + build_value_types_client_collections_string_put_request, + build_value_types_client_datetime_get_request, + build_value_types_client_datetime_put_request, + build_value_types_client_decimal128_get_request, + build_value_types_client_decimal128_put_request, + build_value_types_client_decimal_get_request, + build_value_types_client_decimal_put_request, + build_value_types_client_dictionary_string_get_request, + build_value_types_client_dictionary_string_put_request, + build_value_types_client_duration_get_request, + build_value_types_client_duration_put_request, + build_value_types_client_enum_get_request, + build_value_types_client_enum_put_request, + build_value_types_client_extensible_enum_get_request, + build_value_types_client_extensible_enum_put_request, + build_value_types_client_float_get_request, + build_value_types_client_float_literal_get_request, + build_value_types_client_float_literal_put_request, + build_value_types_client_float_put_request, + build_value_types_client_int_get_request, + build_value_types_client_int_literal_get_request, + build_value_types_client_int_literal_put_request, + build_value_types_client_int_put_request, + build_value_types_client_model_get_request, + build_value_types_client_model_put_request, + build_value_types_client_never_get_request, + build_value_types_client_never_put_request, + build_value_types_client_string_get_request, + build_value_types_client_string_literal_get_request, + build_value_types_client_string_literal_put_request, + build_value_types_client_string_put_request, + build_value_types_client_union_enum_value_get_request, + build_value_types_client_union_enum_value_put_request, + build_value_types_client_union_float_literal_get_request, + build_value_types_client_union_float_literal_put_request, + build_value_types_client_union_int_literal_get_request, + build_value_types_client_union_int_literal_put_request, + build_value_types_client_union_string_literal_get_request, + build_value_types_client_union_string_literal_put_request, + build_value_types_client_unknown_array_get_request, + build_value_types_client_unknown_array_put_request, + build_value_types_client_unknown_dict_get_request, + build_value_types_client_unknown_dict_put_request, + build_value_types_client_unknown_int_get_request, + build_value_types_client_unknown_int_put_request, + build_value_types_client_unknown_string_get_request, + build_value_types_client_unknown_string_put_request, ) from .._configuration import ValueTypesClientConfiguration @@ -90,14 +90,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class BooleanOperations: +class ValueTypesClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`boolean` attribute. + :attr:`value_types_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -127,7 +127,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanProperty: cls: ClsType[_models.BooleanProperty] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_value_types_client_boolean_get_request( headers=_headers, params=_params, ) @@ -234,7 +234,7 @@ async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_value_types_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -258,14 +258,14 @@ async def put(self, body: Union[_models.BooleanProperty, JSON, IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class StringOperations: +class ValueTypesClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`string` attribute. + :attr:`value_types_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -295,7 +295,7 @@ async def get(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_value_types_client_string_get_request( headers=_headers, params=_params, ) @@ -400,7 +400,7 @@ async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwar else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_value_types_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -424,14 +424,14 @@ async def put(self, body: Union[_models.StringProperty, JSON, IO[bytes]], **kwar return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class ValueTypesClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`bytes` attribute. + :attr:`value_types_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -461,7 +461,7 @@ async def get(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_request( + _request = build_value_types_client_bytes_get_request( headers=_headers, params=_params, ) @@ -566,7 +566,7 @@ async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_request( + _request = build_value_types_client_bytes_put_request( content_type=content_type, content=_content, headers=_headers, @@ -590,14 +590,14 @@ async def put(self, body: Union[_models.BytesProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class IntOperations: +class ValueTypesClientIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`int_operations` attribute. + :attr:`value_types_client_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -627,7 +627,7 @@ async def get(self, **kwargs: Any) -> _models.IntProperty: cls: ClsType[_models.IntProperty] = kwargs.pop("cls", None) - _request = build_int_operations_get_request( + _request = build_value_types_client_int_get_request( headers=_headers, params=_params, ) @@ -732,7 +732,7 @@ async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_operations_put_request( + _request = build_value_types_client_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -756,14 +756,14 @@ async def put(self, body: Union[_models.IntProperty, JSON, IO[bytes]], **kwargs: return cls(pipeline_response, None, {}) # type: ignore -class FloatOperations: +class ValueTypesClientFloatOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`float` attribute. + :attr:`value_types_client_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -793,7 +793,7 @@ async def get(self, **kwargs: Any) -> _models.FloatProperty: cls: ClsType[_models.FloatProperty] = kwargs.pop("cls", None) - _request = build_float_get_request( + _request = build_value_types_client_float_get_request( headers=_headers, params=_params, ) @@ -898,7 +898,7 @@ async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_put_request( + _request = build_value_types_client_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -922,14 +922,14 @@ async def put(self, body: Union[_models.FloatProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class DecimalOperations: +class ValueTypesClientDecimalOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`decimal` attribute. + :attr:`value_types_client_decimal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -959,7 +959,7 @@ async def get(self, **kwargs: Any) -> _models.DecimalProperty: cls: ClsType[_models.DecimalProperty] = kwargs.pop("cls", None) - _request = build_decimal_get_request( + _request = build_value_types_client_decimal_get_request( headers=_headers, params=_params, ) @@ -1066,7 +1066,7 @@ async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwa else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_put_request( + _request = build_value_types_client_decimal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1090,14 +1090,14 @@ async def put(self, body: Union[_models.DecimalProperty, JSON, IO[bytes]], **kwa return cls(pipeline_response, None, {}) # type: ignore -class Decimal128Operations: +class ValueTypesClientDecimal128Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`decimal128` attribute. + :attr:`value_types_client_decimal128` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1127,7 +1127,7 @@ async def get(self, **kwargs: Any) -> _models.Decimal128Property: cls: ClsType[_models.Decimal128Property] = kwargs.pop("cls", None) - _request = build_decimal128_get_request( + _request = build_value_types_client_decimal128_get_request( headers=_headers, params=_params, ) @@ -1234,7 +1234,7 @@ async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_put_request( + _request = build_value_types_client_decimal128_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1258,14 +1258,14 @@ async def put(self, body: Union[_models.Decimal128Property, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class ValueTypesClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`datetime` attribute. + :attr:`value_types_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1295,7 +1295,7 @@ async def get(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_request( + _request = build_value_types_client_datetime_get_request( headers=_headers, params=_params, ) @@ -1402,7 +1402,7 @@ async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_request( + _request = build_value_types_client_datetime_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1426,14 +1426,14 @@ async def put(self, body: Union[_models.DatetimeProperty, JSON, IO[bytes]], **kw return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class ValueTypesClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`duration` attribute. + :attr:`value_types_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1463,7 +1463,7 @@ async def get(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_request( + _request = build_value_types_client_duration_get_request( headers=_headers, params=_params, ) @@ -1570,7 +1570,7 @@ async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kw else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_request( + _request = build_value_types_client_duration_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1594,14 +1594,14 @@ async def put(self, body: Union[_models.DurationProperty, JSON, IO[bytes]], **kw return cls(pipeline_response, None, {}) # type: ignore -class EnumOperations: +class ValueTypesClientEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`enum` attribute. + :attr:`value_types_client_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1631,7 +1631,7 @@ async def get(self, **kwargs: Any) -> _models.EnumProperty: cls: ClsType[_models.EnumProperty] = kwargs.pop("cls", None) - _request = build_enum_get_request( + _request = build_value_types_client_enum_get_request( headers=_headers, params=_params, ) @@ -1736,7 +1736,7 @@ async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enum_put_request( + _request = build_value_types_client_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1760,14 +1760,14 @@ async def put(self, body: Union[_models.EnumProperty, JSON, IO[bytes]], **kwargs return cls(pipeline_response, None, {}) # type: ignore -class ExtensibleEnumOperations: +class ValueTypesClientExtensibleEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`extensible_enum` attribute. + :attr:`value_types_client_extensible_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1797,7 +1797,7 @@ async def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: cls: ClsType[_models.ExtensibleEnumProperty] = kwargs.pop("cls", None) - _request = build_extensible_enum_get_request( + _request = build_value_types_client_extensible_enum_get_request( headers=_headers, params=_params, ) @@ -1905,7 +1905,7 @@ async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensible_enum_put_request( + _request = build_value_types_client_extensible_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1929,14 +1929,14 @@ async def put(self, body: Union[_models.ExtensibleEnumProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class ModelOperations: +class ValueTypesClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`model` attribute. + :attr:`value_types_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1966,7 +1966,7 @@ async def get(self, **kwargs: Any) -> _models.ModelProperty: cls: ClsType[_models.ModelProperty] = kwargs.pop("cls", None) - _request = build_model_get_request( + _request = build_value_types_client_model_get_request( headers=_headers, params=_params, ) @@ -2071,7 +2071,7 @@ async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_put_request( + _request = build_value_types_client_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2095,14 +2095,14 @@ async def put(self, body: Union[_models.ModelProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class ValueTypesClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_string` attribute. + :attr:`value_types_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2133,7 +2133,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_request( + _request = build_value_types_client_collections_string_get_request( headers=_headers, params=_params, ) @@ -2241,7 +2241,7 @@ async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_put_request( + _request = build_value_types_client_collections_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2265,14 +2265,14 @@ async def put(self, body: Union[_models.CollectionsStringProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class CollectionsIntOperations: +class ValueTypesClientCollectionsIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_int` attribute. + :attr:`value_types_client_collections_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2302,7 +2302,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: cls: ClsType[_models.CollectionsIntProperty] = kwargs.pop("cls", None) - _request = build_collections_int_get_request( + _request = build_value_types_client_collections_int_get_request( headers=_headers, params=_params, ) @@ -2410,7 +2410,7 @@ async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_int_put_request( + _request = build_value_types_client_collections_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2434,14 +2434,14 @@ async def put(self, body: Union[_models.CollectionsIntProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class ValueTypesClientCollectionsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`collections_model` attribute. + :attr:`value_types_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2472,7 +2472,7 @@ async def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_request( + _request = build_value_types_client_collections_model_get_request( headers=_headers, params=_params, ) @@ -2580,7 +2580,7 @@ async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_request( + _request = build_value_types_client_collections_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2604,14 +2604,14 @@ async def put(self, body: Union[_models.CollectionsModelProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class DictionaryStringOperations: +class ValueTypesClientDictionaryStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`dictionary_string` attribute. + :attr:`value_types_client_dictionary_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2642,7 +2642,7 @@ async def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: cls: ClsType[_models.DictionaryStringProperty] = kwargs.pop("cls", None) - _request = build_dictionary_string_get_request( + _request = build_value_types_client_dictionary_string_get_request( headers=_headers, params=_params, ) @@ -2750,7 +2750,7 @@ async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dictionary_string_put_request( + _request = build_value_types_client_dictionary_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2774,14 +2774,14 @@ async def put(self, body: Union[_models.DictionaryStringProperty, JSON, IO[bytes return cls(pipeline_response, None, {}) # type: ignore -class NeverOperations: +class ValueTypesClientNeverOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`never` attribute. + :attr:`value_types_client_never` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2811,7 +2811,7 @@ async def get(self, **kwargs: Any) -> _models.NeverProperty: cls: ClsType[_models.NeverProperty] = kwargs.pop("cls", None) - _request = build_never_get_request( + _request = build_value_types_client_never_get_request( headers=_headers, params=_params, ) @@ -2916,7 +2916,7 @@ async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_never_put_request( + _request = build_value_types_client_never_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2940,14 +2940,14 @@ async def put(self, body: Union[_models.NeverProperty, JSON, IO[bytes]], **kwarg return cls(pipeline_response, None, {}) # type: ignore -class UnknownStringOperations: +class ValueTypesClientUnknownStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_string` attribute. + :attr:`value_types_client_unknown_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2977,7 +2977,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownStringProperty: cls: ClsType[_models.UnknownStringProperty] = kwargs.pop("cls", None) - _request = build_unknown_string_get_request( + _request = build_value_types_client_unknown_string_get_request( headers=_headers, params=_params, ) @@ -3085,7 +3085,7 @@ async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_string_put_request( + _request = build_value_types_client_unknown_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3109,14 +3109,14 @@ async def put(self, body: Union[_models.UnknownStringProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class UnknownIntOperations: +class ValueTypesClientUnknownIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_int` attribute. + :attr:`value_types_client_unknown_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3146,7 +3146,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownIntProperty: cls: ClsType[_models.UnknownIntProperty] = kwargs.pop("cls", None) - _request = build_unknown_int_get_request( + _request = build_value_types_client_unknown_int_get_request( headers=_headers, params=_params, ) @@ -3253,7 +3253,7 @@ async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_int_put_request( + _request = build_value_types_client_unknown_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3277,14 +3277,14 @@ async def put(self, body: Union[_models.UnknownIntProperty, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class UnknownDictOperations: +class ValueTypesClientUnknownDictOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_dict` attribute. + :attr:`value_types_client_unknown_dict` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3314,7 +3314,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownDictProperty: cls: ClsType[_models.UnknownDictProperty] = kwargs.pop("cls", None) - _request = build_unknown_dict_get_request( + _request = build_value_types_client_unknown_dict_get_request( headers=_headers, params=_params, ) @@ -3422,7 +3422,7 @@ async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_dict_put_request( + _request = build_value_types_client_unknown_dict_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3446,14 +3446,14 @@ async def put(self, body: Union[_models.UnknownDictProperty, JSON, IO[bytes]], * return cls(pipeline_response, None, {}) # type: ignore -class UnknownArrayOperations: +class ValueTypesClientUnknownArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`unknown_array` attribute. + :attr:`value_types_client_unknown_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3483,7 +3483,7 @@ async def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: cls: ClsType[_models.UnknownArrayProperty] = kwargs.pop("cls", None) - _request = build_unknown_array_get_request( + _request = build_value_types_client_unknown_array_get_request( headers=_headers, params=_params, ) @@ -3591,7 +3591,7 @@ async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_array_put_request( + _request = build_value_types_client_unknown_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3615,14 +3615,14 @@ async def put(self, body: Union[_models.UnknownArrayProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class ValueTypesClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`string_literal` attribute. + :attr:`value_types_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3652,7 +3652,7 @@ async def get(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_request( + _request = build_value_types_client_string_literal_get_request( headers=_headers, params=_params, ) @@ -3760,7 +3760,7 @@ async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_request( + _request = build_value_types_client_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3784,14 +3784,14 @@ async def put(self, body: Union[_models.StringLiteralProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class ValueTypesClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`int_literal` attribute. + :attr:`value_types_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3821,7 +3821,7 @@ async def get(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_request( + _request = build_value_types_client_int_literal_get_request( headers=_headers, params=_params, ) @@ -3928,7 +3928,7 @@ async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], ** else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_request( + _request = build_value_types_client_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3952,14 +3952,14 @@ async def put(self, body: Union[_models.IntLiteralProperty, JSON, IO[bytes]], ** return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class ValueTypesClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`float_literal` attribute. + :attr:`value_types_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3989,7 +3989,7 @@ async def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_request( + _request = build_value_types_client_float_literal_get_request( headers=_headers, params=_params, ) @@ -4097,7 +4097,7 @@ async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_request( + _request = build_value_types_client_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4121,14 +4121,14 @@ async def put(self, body: Union[_models.FloatLiteralProperty, JSON, IO[bytes]], return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class ValueTypesClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`boolean_literal` attribute. + :attr:`value_types_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4158,7 +4158,7 @@ async def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_request( + _request = build_value_types_client_boolean_literal_get_request( headers=_headers, params=_params, ) @@ -4266,7 +4266,7 @@ async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_request( + _request = build_value_types_client_boolean_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4290,14 +4290,14 @@ async def put(self, body: Union[_models.BooleanLiteralProperty, JSON, IO[bytes]] return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class ValueTypesClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_string_literal` attribute. + :attr:`value_types_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4328,7 +4328,7 @@ async def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_request( + _request = build_value_types_client_union_string_literal_get_request( headers=_headers, params=_params, ) @@ -4437,7 +4437,7 @@ async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[byt else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_request( + _request = build_value_types_client_union_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4461,14 +4461,14 @@ async def put(self, body: Union[_models.UnionStringLiteralProperty, JSON, IO[byt return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class ValueTypesClientUnionIntLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_int_literal` attribute. + :attr:`value_types_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4498,7 +4498,7 @@ async def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_request( + _request = build_value_types_client_union_int_literal_get_request( headers=_headers, params=_params, ) @@ -4606,7 +4606,7 @@ async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_request( + _request = build_value_types_client_union_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4630,14 +4630,14 @@ async def put(self, body: Union[_models.UnionIntLiteralProperty, JSON, IO[bytes] return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class ValueTypesClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_float_literal` attribute. + :attr:`value_types_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4668,7 +4668,7 @@ async def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_request( + _request = build_value_types_client_union_float_literal_get_request( headers=_headers, params=_params, ) @@ -4776,7 +4776,7 @@ async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[byte else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_request( + _request = build_value_types_client_union_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4800,14 +4800,14 @@ async def put(self, body: Union[_models.UnionFloatLiteralProperty, JSON, IO[byte return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumValueOperations: +class ValueTypesClientUnionEnumValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.aio.ValueTypesClient`'s - :attr:`union_enum_value` attribute. + :attr:`value_types_client_union_enum_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4837,7 +4837,7 @@ async def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: cls: ClsType[_models.UnionEnumValueProperty] = kwargs.pop("cls", None) - _request = build_union_enum_value_get_request( + _request = build_value_types_client_union_enum_value_get_request( headers=_headers, params=_params, ) @@ -4945,7 +4945,7 @@ async def put(self, body: Union[_models.UnionEnumValueProperty, JSON, IO[bytes]] else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_value_put_request( + _request = build_value_types_client_union_enum_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py index f8e55f8ae4..9d30a2f896 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/__init__.py @@ -6,70 +6,70 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import BooleanOperations # type: ignore -from ._operations import StringOperations # type: ignore -from ._operations import BytesOperations # type: ignore -from ._operations import IntOperations # type: ignore -from ._operations import FloatOperations # type: ignore -from ._operations import DecimalOperations # type: ignore -from ._operations import Decimal128Operations # type: ignore -from ._operations import DatetimeOperations # type: ignore -from ._operations import DurationOperations # type: ignore -from ._operations import EnumOperations # type: ignore -from ._operations import ExtensibleEnumOperations # type: ignore -from ._operations import ModelOperations # type: ignore -from ._operations import CollectionsStringOperations # type: ignore -from ._operations import CollectionsIntOperations # type: ignore -from ._operations import CollectionsModelOperations # type: ignore -from ._operations import DictionaryStringOperations # type: ignore -from ._operations import NeverOperations # type: ignore -from ._operations import UnknownStringOperations # type: ignore -from ._operations import UnknownIntOperations # type: ignore -from ._operations import UnknownDictOperations # type: ignore -from ._operations import UnknownArrayOperations # type: ignore -from ._operations import StringLiteralOperations # type: ignore -from ._operations import IntLiteralOperations # type: ignore -from ._operations import FloatLiteralOperations # type: ignore -from ._operations import BooleanLiteralOperations # type: ignore -from ._operations import UnionStringLiteralOperations # type: ignore -from ._operations import UnionIntLiteralOperations # type: ignore -from ._operations import UnionFloatLiteralOperations # type: ignore -from ._operations import UnionEnumValueOperations # type: ignore +from ._operations import ValueTypesClientBooleanOperations # type: ignore +from ._operations import ValueTypesClientStringOperations # type: ignore +from ._operations import ValueTypesClientBytesOperations # type: ignore +from ._operations import ValueTypesClientIntOperations # type: ignore +from ._operations import ValueTypesClientFloatOperations # type: ignore +from ._operations import ValueTypesClientDecimalOperations # type: ignore +from ._operations import ValueTypesClientDecimal128Operations # type: ignore +from ._operations import ValueTypesClientDatetimeOperations # type: ignore +from ._operations import ValueTypesClientDurationOperations # type: ignore +from ._operations import ValueTypesClientEnumOperations # type: ignore +from ._operations import ValueTypesClientExtensibleEnumOperations # type: ignore +from ._operations import ValueTypesClientModelOperations # type: ignore +from ._operations import ValueTypesClientCollectionsStringOperations # type: ignore +from ._operations import ValueTypesClientCollectionsIntOperations # type: ignore +from ._operations import ValueTypesClientCollectionsModelOperations # type: ignore +from ._operations import ValueTypesClientDictionaryStringOperations # type: ignore +from ._operations import ValueTypesClientNeverOperations # type: ignore +from ._operations import ValueTypesClientUnknownStringOperations # type: ignore +from ._operations import ValueTypesClientUnknownIntOperations # type: ignore +from ._operations import ValueTypesClientUnknownDictOperations # type: ignore +from ._operations import ValueTypesClientUnknownArrayOperations # type: ignore +from ._operations import ValueTypesClientStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientBooleanLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionStringLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionIntLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionFloatLiteralOperations # type: ignore +from ._operations import ValueTypesClientUnionEnumValueOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "BooleanOperations", - "StringOperations", - "BytesOperations", - "IntOperations", - "FloatOperations", - "DecimalOperations", - "Decimal128Operations", - "DatetimeOperations", - "DurationOperations", - "EnumOperations", - "ExtensibleEnumOperations", - "ModelOperations", - "CollectionsStringOperations", - "CollectionsIntOperations", - "CollectionsModelOperations", - "DictionaryStringOperations", - "NeverOperations", - "UnknownStringOperations", - "UnknownIntOperations", - "UnknownDictOperations", - "UnknownArrayOperations", - "StringLiteralOperations", - "IntLiteralOperations", - "FloatLiteralOperations", - "BooleanLiteralOperations", - "UnionStringLiteralOperations", - "UnionIntLiteralOperations", - "UnionFloatLiteralOperations", - "UnionEnumValueOperations", + "ValueTypesClientBooleanOperations", + "ValueTypesClientStringOperations", + "ValueTypesClientBytesOperations", + "ValueTypesClientIntOperations", + "ValueTypesClientFloatOperations", + "ValueTypesClientDecimalOperations", + "ValueTypesClientDecimal128Operations", + "ValueTypesClientDatetimeOperations", + "ValueTypesClientDurationOperations", + "ValueTypesClientEnumOperations", + "ValueTypesClientExtensibleEnumOperations", + "ValueTypesClientModelOperations", + "ValueTypesClientCollectionsStringOperations", + "ValueTypesClientCollectionsIntOperations", + "ValueTypesClientCollectionsModelOperations", + "ValueTypesClientDictionaryStringOperations", + "ValueTypesClientNeverOperations", + "ValueTypesClientUnknownStringOperations", + "ValueTypesClientUnknownIntOperations", + "ValueTypesClientUnknownDictOperations", + "ValueTypesClientUnknownArrayOperations", + "ValueTypesClientStringLiteralOperations", + "ValueTypesClientIntLiteralOperations", + "ValueTypesClientFloatLiteralOperations", + "ValueTypesClientBooleanLiteralOperations", + "ValueTypesClientUnionStringLiteralOperations", + "ValueTypesClientUnionIntLiteralOperations", + "ValueTypesClientUnionFloatLiteralOperations", + "ValueTypesClientUnionEnumValueOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py index 98eff9a67a..690a56798e 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-property-valuetypes/typetest/property/valuetypes/operations/_operations.py @@ -33,7 +33,7 @@ _SERIALIZER.client_side_validation = False -def build_boolean_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -47,7 +47,7 @@ def build_boolean_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -61,7 +61,7 @@ def build_boolean_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -75,7 +75,7 @@ def build_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -89,7 +89,7 @@ def build_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_bytes_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_bytes_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -103,7 +103,7 @@ def build_bytes_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_bytes_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_bytes_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -117,7 +117,7 @@ def build_bytes_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_operations_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -131,7 +131,7 @@ def build_int_operations_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_operations_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -145,7 +145,7 @@ def build_int_operations_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -159,7 +159,7 @@ def build_float_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -173,7 +173,7 @@ def build_float_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -187,7 +187,7 @@ def build_decimal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -201,7 +201,7 @@ def build_decimal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal128_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal128_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -215,7 +215,7 @@ def build_decimal128_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_decimal128_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -229,7 +229,7 @@ def build_decimal128_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_datetime_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_datetime_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -243,7 +243,7 @@ def build_datetime_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_datetime_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_datetime_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -257,7 +257,7 @@ def build_datetime_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_duration_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_duration_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -271,7 +271,7 @@ def build_duration_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_duration_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_duration_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -285,7 +285,7 @@ def build_duration_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_enum_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_enum_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -299,7 +299,7 @@ def build_enum_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_enum_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_enum_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -313,7 +313,7 @@ def build_enum_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -327,7 +327,7 @@ def build_extensible_enum_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -341,7 +341,7 @@ def build_extensible_enum_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_model_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_model_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -355,7 +355,7 @@ def build_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_model_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_model_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -369,7 +369,9 @@ def build_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -383,7 +385,9 @@ def build_collections_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -397,7 +401,7 @@ def build_collections_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_int_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_int_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -411,7 +415,7 @@ def build_collections_int_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_int_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_int_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -425,7 +429,9 @@ def build_collections_int_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_collections_model_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_model_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -439,7 +445,9 @@ def build_collections_model_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_collections_model_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_collections_model_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -453,7 +461,9 @@ def build_collections_model_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_dictionary_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_dictionary_string_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -467,7 +477,9 @@ def build_dictionary_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_dictionary_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_dictionary_string_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -481,7 +493,7 @@ def build_dictionary_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_never_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_never_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -495,7 +507,7 @@ def build_never_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_never_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_never_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -509,7 +521,7 @@ def build_never_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_string_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_string_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -523,7 +535,7 @@ def build_unknown_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_string_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_string_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -537,7 +549,7 @@ def build_unknown_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_int_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_int_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -551,7 +563,7 @@ def build_unknown_int_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_int_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_int_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -565,7 +577,7 @@ def build_unknown_int_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -579,7 +591,7 @@ def build_unknown_dict_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -593,7 +605,7 @@ def build_unknown_dict_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_array_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -607,7 +619,7 @@ def build_unknown_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_array_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_unknown_array_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -621,7 +633,7 @@ def build_unknown_array_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_string_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -635,7 +647,7 @@ def build_string_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_string_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -649,7 +661,7 @@ def build_string_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_int_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -663,7 +675,7 @@ def build_int_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_int_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_int_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -677,7 +689,7 @@ def build_int_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_float_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -691,7 +703,7 @@ def build_float_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_float_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_float_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -705,7 +717,7 @@ def build_float_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -719,7 +731,7 @@ def build_boolean_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -733,7 +745,9 @@ def build_boolean_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_string_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -747,7 +761,9 @@ def build_union_string_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_string_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_string_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -761,7 +777,9 @@ def build_union_string_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_int_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -775,7 +793,9 @@ def build_union_int_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_int_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_int_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -789,7 +809,9 @@ def build_union_int_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_float_literal_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -803,7 +825,9 @@ def build_union_float_literal_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_float_literal_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_float_literal_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -817,7 +841,9 @@ def build_union_float_literal_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_union_enum_value_get_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_enum_value_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -831,7 +857,9 @@ def build_union_enum_value_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_union_enum_value_put_request(**kwargs: Any) -> HttpRequest: +def build_value_types_client_union_enum_value_put_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -845,14 +873,14 @@ def build_union_enum_value_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -class BooleanOperations: +class ValueTypesClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`boolean` attribute. + :attr:`value_types_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -882,7 +910,7 @@ def get(self, **kwargs: Any) -> _models.BooleanProperty: cls: ClsType[_models.BooleanProperty] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_value_types_client_boolean_get_request( headers=_headers, params=_params, ) @@ -989,7 +1017,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_value_types_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1013,14 +1041,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringOperations: +class ValueTypesClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`string` attribute. + :attr:`value_types_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1050,7 +1078,7 @@ def get(self, **kwargs: Any) -> _models.StringProperty: cls: ClsType[_models.StringProperty] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_value_types_client_string_get_request( headers=_headers, params=_params, ) @@ -1157,7 +1185,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_value_types_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1181,14 +1209,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BytesOperations: +class ValueTypesClientBytesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`bytes` attribute. + :attr:`value_types_client_bytes` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1218,7 +1246,7 @@ def get(self, **kwargs: Any) -> _models.BytesProperty: cls: ClsType[_models.BytesProperty] = kwargs.pop("cls", None) - _request = build_bytes_get_request( + _request = build_value_types_client_bytes_get_request( headers=_headers, params=_params, ) @@ -1325,7 +1353,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_bytes_put_request( + _request = build_value_types_client_bytes_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1349,14 +1377,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntOperations: +class ValueTypesClientIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`int_operations` attribute. + :attr:`value_types_client_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1386,7 +1414,7 @@ def get(self, **kwargs: Any) -> _models.IntProperty: cls: ClsType[_models.IntProperty] = kwargs.pop("cls", None) - _request = build_int_operations_get_request( + _request = build_value_types_client_int_get_request( headers=_headers, params=_params, ) @@ -1493,7 +1521,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_operations_put_request( + _request = build_value_types_client_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1517,14 +1545,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatOperations: +class ValueTypesClientFloatOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`float` attribute. + :attr:`value_types_client_float` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1554,7 +1582,7 @@ def get(self, **kwargs: Any) -> _models.FloatProperty: cls: ClsType[_models.FloatProperty] = kwargs.pop("cls", None) - _request = build_float_get_request( + _request = build_value_types_client_float_get_request( headers=_headers, params=_params, ) @@ -1661,7 +1689,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_put_request( + _request = build_value_types_client_float_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1685,14 +1713,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DecimalOperations: +class ValueTypesClientDecimalOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`decimal` attribute. + :attr:`value_types_client_decimal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1722,7 +1750,7 @@ def get(self, **kwargs: Any) -> _models.DecimalProperty: cls: ClsType[_models.DecimalProperty] = kwargs.pop("cls", None) - _request = build_decimal_get_request( + _request = build_value_types_client_decimal_get_request( headers=_headers, params=_params, ) @@ -1829,7 +1857,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_put_request( + _request = build_value_types_client_decimal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -1853,14 +1881,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Decimal128Operations: +class ValueTypesClientDecimal128Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`decimal128` attribute. + :attr:`value_types_client_decimal128` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1890,7 +1918,7 @@ def get(self, **kwargs: Any) -> _models.Decimal128Property: cls: ClsType[_models.Decimal128Property] = kwargs.pop("cls", None) - _request = build_decimal128_get_request( + _request = build_value_types_client_decimal128_get_request( headers=_headers, params=_params, ) @@ -1997,7 +2025,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_put_request( + _request = build_value_types_client_decimal128_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2021,14 +2049,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DatetimeOperations: +class ValueTypesClientDatetimeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`datetime` attribute. + :attr:`value_types_client_datetime` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2058,7 +2086,7 @@ def get(self, **kwargs: Any) -> _models.DatetimeProperty: cls: ClsType[_models.DatetimeProperty] = kwargs.pop("cls", None) - _request = build_datetime_get_request( + _request = build_value_types_client_datetime_get_request( headers=_headers, params=_params, ) @@ -2165,7 +2193,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_datetime_put_request( + _request = build_value_types_client_datetime_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2189,14 +2217,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DurationOperations: +class ValueTypesClientDurationOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`duration` attribute. + :attr:`value_types_client_duration` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2226,7 +2254,7 @@ def get(self, **kwargs: Any) -> _models.DurationProperty: cls: ClsType[_models.DurationProperty] = kwargs.pop("cls", None) - _request = build_duration_get_request( + _request = build_value_types_client_duration_get_request( headers=_headers, params=_params, ) @@ -2333,7 +2361,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_duration_put_request( + _request = build_value_types_client_duration_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2357,14 +2385,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class EnumOperations: +class ValueTypesClientEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`enum` attribute. + :attr:`value_types_client_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2394,7 +2422,7 @@ def get(self, **kwargs: Any) -> _models.EnumProperty: cls: ClsType[_models.EnumProperty] = kwargs.pop("cls", None) - _request = build_enum_get_request( + _request = build_value_types_client_enum_get_request( headers=_headers, params=_params, ) @@ -2501,7 +2529,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enum_put_request( + _request = build_value_types_client_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2525,14 +2553,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ExtensibleEnumOperations: +class ValueTypesClientExtensibleEnumOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`extensible_enum` attribute. + :attr:`value_types_client_extensible_enum` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2562,7 +2590,7 @@ def get(self, **kwargs: Any) -> _models.ExtensibleEnumProperty: cls: ClsType[_models.ExtensibleEnumProperty] = kwargs.pop("cls", None) - _request = build_extensible_enum_get_request( + _request = build_value_types_client_extensible_enum_get_request( headers=_headers, params=_params, ) @@ -2672,7 +2700,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_extensible_enum_put_request( + _request = build_value_types_client_extensible_enum_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2696,14 +2724,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelOperations: +class ValueTypesClientModelOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`model` attribute. + :attr:`value_types_client_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2733,7 +2761,7 @@ def get(self, **kwargs: Any) -> _models.ModelProperty: cls: ClsType[_models.ModelProperty] = kwargs.pop("cls", None) - _request = build_model_get_request( + _request = build_value_types_client_model_get_request( headers=_headers, params=_params, ) @@ -2840,7 +2868,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_model_put_request( + _request = build_value_types_client_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -2864,14 +2892,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsStringOperations: +class ValueTypesClientCollectionsStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_string` attribute. + :attr:`value_types_client_collections_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -2902,7 +2930,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsStringProperty: cls: ClsType[_models.CollectionsStringProperty] = kwargs.pop("cls", None) - _request = build_collections_string_get_request( + _request = build_value_types_client_collections_string_get_request( headers=_headers, params=_params, ) @@ -3012,7 +3040,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_string_put_request( + _request = build_value_types_client_collections_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3036,14 +3064,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsIntOperations: +class ValueTypesClientCollectionsIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_int` attribute. + :attr:`value_types_client_collections_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3073,7 +3101,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsIntProperty: cls: ClsType[_models.CollectionsIntProperty] = kwargs.pop("cls", None) - _request = build_collections_int_get_request( + _request = build_value_types_client_collections_int_get_request( headers=_headers, params=_params, ) @@ -3183,7 +3211,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_int_put_request( + _request = build_value_types_client_collections_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3207,14 +3235,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class CollectionsModelOperations: +class ValueTypesClientCollectionsModelOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`collections_model` attribute. + :attr:`value_types_client_collections_model` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3245,7 +3273,7 @@ def get(self, **kwargs: Any) -> _models.CollectionsModelProperty: cls: ClsType[_models.CollectionsModelProperty] = kwargs.pop("cls", None) - _request = build_collections_model_get_request( + _request = build_value_types_client_collections_model_get_request( headers=_headers, params=_params, ) @@ -3355,7 +3383,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_collections_model_put_request( + _request = build_value_types_client_collections_model_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3379,14 +3407,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DictionaryStringOperations: +class ValueTypesClientDictionaryStringOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`dictionary_string` attribute. + :attr:`value_types_client_dictionary_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3417,7 +3445,7 @@ def get(self, **kwargs: Any) -> _models.DictionaryStringProperty: cls: ClsType[_models.DictionaryStringProperty] = kwargs.pop("cls", None) - _request = build_dictionary_string_get_request( + _request = build_value_types_client_dictionary_string_get_request( headers=_headers, params=_params, ) @@ -3527,7 +3555,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_dictionary_string_put_request( + _request = build_value_types_client_dictionary_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3551,14 +3579,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class NeverOperations: +class ValueTypesClientNeverOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`never` attribute. + :attr:`value_types_client_never` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3588,7 +3616,7 @@ def get(self, **kwargs: Any) -> _models.NeverProperty: cls: ClsType[_models.NeverProperty] = kwargs.pop("cls", None) - _request = build_never_get_request( + _request = build_value_types_client_never_get_request( headers=_headers, params=_params, ) @@ -3695,7 +3723,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_never_put_request( + _request = build_value_types_client_never_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3719,14 +3747,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownStringOperations: +class ValueTypesClientUnknownStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_string` attribute. + :attr:`value_types_client_unknown_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3756,7 +3784,7 @@ def get(self, **kwargs: Any) -> _models.UnknownStringProperty: cls: ClsType[_models.UnknownStringProperty] = kwargs.pop("cls", None) - _request = build_unknown_string_get_request( + _request = build_value_types_client_unknown_string_get_request( headers=_headers, params=_params, ) @@ -3866,7 +3894,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_string_put_request( + _request = build_value_types_client_unknown_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -3890,14 +3918,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownIntOperations: +class ValueTypesClientUnknownIntOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_int` attribute. + :attr:`value_types_client_unknown_int` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -3927,7 +3955,7 @@ def get(self, **kwargs: Any) -> _models.UnknownIntProperty: cls: ClsType[_models.UnknownIntProperty] = kwargs.pop("cls", None) - _request = build_unknown_int_get_request( + _request = build_value_types_client_unknown_int_get_request( headers=_headers, params=_params, ) @@ -4034,7 +4062,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_int_put_request( + _request = build_value_types_client_unknown_int_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4058,14 +4086,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownDictOperations: +class ValueTypesClientUnknownDictOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_dict` attribute. + :attr:`value_types_client_unknown_dict` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4095,7 +4123,7 @@ def get(self, **kwargs: Any) -> _models.UnknownDictProperty: cls: ClsType[_models.UnknownDictProperty] = kwargs.pop("cls", None) - _request = build_unknown_dict_get_request( + _request = build_value_types_client_unknown_dict_get_request( headers=_headers, params=_params, ) @@ -4203,7 +4231,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_dict_put_request( + _request = build_value_types_client_unknown_dict_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4227,14 +4255,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnknownArrayOperations: +class ValueTypesClientUnknownArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`unknown_array` attribute. + :attr:`value_types_client_unknown_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4264,7 +4292,7 @@ def get(self, **kwargs: Any) -> _models.UnknownArrayProperty: cls: ClsType[_models.UnknownArrayProperty] = kwargs.pop("cls", None) - _request = build_unknown_array_get_request( + _request = build_value_types_client_unknown_array_get_request( headers=_headers, params=_params, ) @@ -4372,7 +4400,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_array_put_request( + _request = build_value_types_client_unknown_array_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4396,14 +4424,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringLiteralOperations: +class ValueTypesClientStringLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`string_literal` attribute. + :attr:`value_types_client_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4433,7 +4461,7 @@ def get(self, **kwargs: Any) -> _models.StringLiteralProperty: cls: ClsType[_models.StringLiteralProperty] = kwargs.pop("cls", None) - _request = build_string_literal_get_request( + _request = build_value_types_client_string_literal_get_request( headers=_headers, params=_params, ) @@ -4543,7 +4571,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_literal_put_request( + _request = build_value_types_client_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4567,14 +4595,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntLiteralOperations: +class ValueTypesClientIntLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`int_literal` attribute. + :attr:`value_types_client_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4604,7 +4632,7 @@ def get(self, **kwargs: Any) -> _models.IntLiteralProperty: cls: ClsType[_models.IntLiteralProperty] = kwargs.pop("cls", None) - _request = build_int_literal_get_request( + _request = build_value_types_client_int_literal_get_request( headers=_headers, params=_params, ) @@ -4711,7 +4739,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_int_literal_put_request( + _request = build_value_types_client_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4735,14 +4763,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatLiteralOperations: +class ValueTypesClientFloatLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`float_literal` attribute. + :attr:`value_types_client_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4772,7 +4800,7 @@ def get(self, **kwargs: Any) -> _models.FloatLiteralProperty: cls: ClsType[_models.FloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_float_literal_get_request( + _request = build_value_types_client_float_literal_get_request( headers=_headers, params=_params, ) @@ -4880,7 +4908,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_float_literal_put_request( + _request = build_value_types_client_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -4904,14 +4932,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class BooleanLiteralOperations: +class ValueTypesClientBooleanLiteralOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`boolean_literal` attribute. + :attr:`value_types_client_boolean_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -4941,7 +4969,7 @@ def get(self, **kwargs: Any) -> _models.BooleanLiteralProperty: cls: ClsType[_models.BooleanLiteralProperty] = kwargs.pop("cls", None) - _request = build_boolean_literal_get_request( + _request = build_value_types_client_boolean_literal_get_request( headers=_headers, params=_params, ) @@ -5051,7 +5079,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_literal_put_request( + _request = build_value_types_client_boolean_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5075,14 +5103,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionStringLiteralOperations: +class ValueTypesClientUnionStringLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_string_literal` attribute. + :attr:`value_types_client_union_string_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5113,7 +5141,7 @@ def get(self, **kwargs: Any) -> _models.UnionStringLiteralProperty: cls: ClsType[_models.UnionStringLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_string_literal_get_request( + _request = build_value_types_client_union_string_literal_get_request( headers=_headers, params=_params, ) @@ -5224,7 +5252,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_string_literal_put_request( + _request = build_value_types_client_union_string_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5248,14 +5276,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionIntLiteralOperations: +class ValueTypesClientUnionIntLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_int_literal` attribute. + :attr:`value_types_client_union_int_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5285,7 +5313,7 @@ def get(self, **kwargs: Any) -> _models.UnionIntLiteralProperty: cls: ClsType[_models.UnionIntLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_int_literal_get_request( + _request = build_value_types_client_union_int_literal_get_request( headers=_headers, params=_params, ) @@ -5395,7 +5423,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_int_literal_put_request( + _request = build_value_types_client_union_int_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5419,14 +5447,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionFloatLiteralOperations: +class ValueTypesClientUnionFloatLiteralOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_float_literal` attribute. + :attr:`value_types_client_union_float_literal` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5457,7 +5485,7 @@ def get(self, **kwargs: Any) -> _models.UnionFloatLiteralProperty: cls: ClsType[_models.UnionFloatLiteralProperty] = kwargs.pop("cls", None) - _request = build_union_float_literal_get_request( + _request = build_value_types_client_union_float_literal_get_request( headers=_headers, params=_params, ) @@ -5567,7 +5595,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_float_literal_put_request( + _request = build_value_types_client_union_float_literal_put_request( content_type=content_type, content=_content, headers=_headers, @@ -5591,14 +5619,14 @@ def put( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class UnionEnumValueOperations: +class ValueTypesClientUnionEnumValueOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.property.valuetypes.ValueTypesClient`'s - :attr:`union_enum_value` attribute. + :attr:`value_types_client_union_enum_value` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -5628,7 +5656,7 @@ def get(self, **kwargs: Any) -> _models.UnionEnumValueProperty: cls: ClsType[_models.UnionEnumValueProperty] = kwargs.pop("cls", None) - _request = build_union_enum_value_get_request( + _request = build_value_types_client_union_enum_value_get_request( headers=_headers, params=_params, ) @@ -5738,7 +5766,7 @@ def put( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_union_enum_value_put_request( + _request = build_value_types_client_union_enum_value_put_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_client.py index 5fb6ec4709..2bd74049f0 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/_client.py @@ -10,33 +10,37 @@ from ._configuration import ScalarClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - BooleanOperations, - Decimal128TypeOperations, - Decimal128VerifyOperations, - DecimalTypeOperations, - DecimalVerifyOperations, - StringOperations, - UnknownOperations, + ScalarClientBooleanOperations, + ScalarClientDecimal128TypeOperations, + ScalarClientDecimal128VerifyOperations, + ScalarClientDecimalTypeOperations, + ScalarClientDecimalVerifyOperations, + ScalarClientStringOperations, + ScalarClientUnknownOperations, ) class ScalarClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """ScalarClient. - :ivar string: StringOperations operations - :vartype string: typetest.scalar.operations.StringOperations - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.scalar.operations.BooleanOperations - :ivar unknown: UnknownOperations operations - :vartype unknown: typetest.scalar.operations.UnknownOperations - :ivar decimal_type: DecimalTypeOperations operations - :vartype decimal_type: typetest.scalar.operations.DecimalTypeOperations - :ivar decimal128_type: Decimal128TypeOperations operations - :vartype decimal128_type: typetest.scalar.operations.Decimal128TypeOperations - :ivar decimal_verify: DecimalVerifyOperations operations - :vartype decimal_verify: typetest.scalar.operations.DecimalVerifyOperations - :ivar decimal128_verify: Decimal128VerifyOperations operations - :vartype decimal128_verify: typetest.scalar.operations.Decimal128VerifyOperations + :ivar scalar_client_string: ScalarClientStringOperations operations + :vartype scalar_client_string: typetest.scalar.operations.ScalarClientStringOperations + :ivar scalar_client_boolean: ScalarClientBooleanOperations operations + :vartype scalar_client_boolean: typetest.scalar.operations.ScalarClientBooleanOperations + :ivar scalar_client_unknown: ScalarClientUnknownOperations operations + :vartype scalar_client_unknown: typetest.scalar.operations.ScalarClientUnknownOperations + :ivar scalar_client_decimal_type: ScalarClientDecimalTypeOperations operations + :vartype scalar_client_decimal_type: + typetest.scalar.operations.ScalarClientDecimalTypeOperations + :ivar scalar_client_decimal128_type: ScalarClientDecimal128TypeOperations operations + :vartype scalar_client_decimal128_type: + typetest.scalar.operations.ScalarClientDecimal128TypeOperations + :ivar scalar_client_decimal_verify: ScalarClientDecimalVerifyOperations operations + :vartype scalar_client_decimal_verify: + typetest.scalar.operations.ScalarClientDecimalVerifyOperations + :ivar scalar_client_decimal128_verify: ScalarClientDecimal128VerifyOperations operations + :vartype scalar_client_decimal128_verify: + typetest.scalar.operations.ScalarClientDecimal128VerifyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,13 +67,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown = UnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_type = DecimalTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_type = Decimal128TypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_verify = DecimalVerifyOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_verify = Decimal128VerifyOperations( + self.scalar_client_string = ScalarClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_boolean = ScalarClientBooleanOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_unknown = ScalarClientUnknownOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_type = ScalarClientDecimalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_type = ScalarClientDecimal128TypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_verify = ScalarClientDecimalVerifyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_verify = ScalarClientDecimal128VerifyOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/_client.py index 1d795579c1..fcfe1b3cad 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/_client.py @@ -10,33 +10,37 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import ScalarClientConfiguration from .operations import ( - BooleanOperations, - Decimal128TypeOperations, - Decimal128VerifyOperations, - DecimalTypeOperations, - DecimalVerifyOperations, - StringOperations, - UnknownOperations, + ScalarClientBooleanOperations, + ScalarClientDecimal128TypeOperations, + ScalarClientDecimal128VerifyOperations, + ScalarClientDecimalTypeOperations, + ScalarClientDecimalVerifyOperations, + ScalarClientStringOperations, + ScalarClientUnknownOperations, ) class ScalarClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """ScalarClient. - :ivar string: StringOperations operations - :vartype string: typetest.scalar.aio.operations.StringOperations - :ivar boolean: BooleanOperations operations - :vartype boolean: typetest.scalar.aio.operations.BooleanOperations - :ivar unknown: UnknownOperations operations - :vartype unknown: typetest.scalar.aio.operations.UnknownOperations - :ivar decimal_type: DecimalTypeOperations operations - :vartype decimal_type: typetest.scalar.aio.operations.DecimalTypeOperations - :ivar decimal128_type: Decimal128TypeOperations operations - :vartype decimal128_type: typetest.scalar.aio.operations.Decimal128TypeOperations - :ivar decimal_verify: DecimalVerifyOperations operations - :vartype decimal_verify: typetest.scalar.aio.operations.DecimalVerifyOperations - :ivar decimal128_verify: Decimal128VerifyOperations operations - :vartype decimal128_verify: typetest.scalar.aio.operations.Decimal128VerifyOperations + :ivar scalar_client_string: ScalarClientStringOperations operations + :vartype scalar_client_string: typetest.scalar.aio.operations.ScalarClientStringOperations + :ivar scalar_client_boolean: ScalarClientBooleanOperations operations + :vartype scalar_client_boolean: typetest.scalar.aio.operations.ScalarClientBooleanOperations + :ivar scalar_client_unknown: ScalarClientUnknownOperations operations + :vartype scalar_client_unknown: typetest.scalar.aio.operations.ScalarClientUnknownOperations + :ivar scalar_client_decimal_type: ScalarClientDecimalTypeOperations operations + :vartype scalar_client_decimal_type: + typetest.scalar.aio.operations.ScalarClientDecimalTypeOperations + :ivar scalar_client_decimal128_type: ScalarClientDecimal128TypeOperations operations + :vartype scalar_client_decimal128_type: + typetest.scalar.aio.operations.ScalarClientDecimal128TypeOperations + :ivar scalar_client_decimal_verify: ScalarClientDecimalVerifyOperations operations + :vartype scalar_client_decimal_verify: + typetest.scalar.aio.operations.ScalarClientDecimalVerifyOperations + :ivar scalar_client_decimal128_verify: ScalarClientDecimal128VerifyOperations operations + :vartype scalar_client_decimal128_verify: + typetest.scalar.aio.operations.ScalarClientDecimal128VerifyOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -63,13 +67,25 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.string = StringOperations(self._client, self._config, self._serialize, self._deserialize) - self.boolean = BooleanOperations(self._client, self._config, self._serialize, self._deserialize) - self.unknown = UnknownOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_type = DecimalTypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_type = Decimal128TypeOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal_verify = DecimalVerifyOperations(self._client, self._config, self._serialize, self._deserialize) - self.decimal128_verify = Decimal128VerifyOperations( + self.scalar_client_string = ScalarClientStringOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_boolean = ScalarClientBooleanOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_unknown = ScalarClientUnknownOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_type = ScalarClientDecimalTypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_type = ScalarClientDecimal128TypeOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal_verify = ScalarClientDecimalVerifyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.scalar_client_decimal128_verify = ScalarClientDecimal128VerifyOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py index d53a8ad35f..e1d3af7d1b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/__init__.py @@ -6,26 +6,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BooleanOperations # type: ignore -from ._operations import UnknownOperations # type: ignore -from ._operations import DecimalTypeOperations # type: ignore -from ._operations import Decimal128TypeOperations # type: ignore -from ._operations import DecimalVerifyOperations # type: ignore -from ._operations import Decimal128VerifyOperations # type: ignore +from ._operations import ScalarClientStringOperations # type: ignore +from ._operations import ScalarClientBooleanOperations # type: ignore +from ._operations import ScalarClientUnknownOperations # type: ignore +from ._operations import ScalarClientDecimalTypeOperations # type: ignore +from ._operations import ScalarClientDecimal128TypeOperations # type: ignore +from ._operations import ScalarClientDecimalVerifyOperations # type: ignore +from ._operations import ScalarClientDecimal128VerifyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BooleanOperations", - "UnknownOperations", - "DecimalTypeOperations", - "Decimal128TypeOperations", - "DecimalVerifyOperations", - "Decimal128VerifyOperations", + "ScalarClientStringOperations", + "ScalarClientBooleanOperations", + "ScalarClientUnknownOperations", + "ScalarClientDecimalTypeOperations", + "ScalarClientDecimal128TypeOperations", + "ScalarClientDecimalVerifyOperations", + "ScalarClientDecimal128VerifyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py index ecf8d26266..f8cf8fa5a5 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/aio/operations/_operations.py @@ -22,22 +22,22 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_boolean_get_request, - build_boolean_put_request, - build_decimal128_type_request_body_request, - build_decimal128_type_request_parameter_request, - build_decimal128_type_response_body_request, - build_decimal128_verify_prepare_verify_request, - build_decimal128_verify_verify_request, - build_decimal_type_request_body_request, - build_decimal_type_request_parameter_request, - build_decimal_type_response_body_request, - build_decimal_verify_prepare_verify_request, - build_decimal_verify_verify_request, - build_string_get_request, - build_string_put_request, - build_unknown_get_request, - build_unknown_put_request, + build_scalar_client_boolean_get_request, + build_scalar_client_boolean_put_request, + build_scalar_client_decimal128_type_request_body_request, + build_scalar_client_decimal128_type_request_parameter_request, + build_scalar_client_decimal128_type_response_body_request, + build_scalar_client_decimal128_verify_prepare_verify_request, + build_scalar_client_decimal128_verify_verify_request, + build_scalar_client_decimal_type_request_body_request, + build_scalar_client_decimal_type_request_parameter_request, + build_scalar_client_decimal_type_response_body_request, + build_scalar_client_decimal_verify_prepare_verify_request, + build_scalar_client_decimal_verify_verify_request, + build_scalar_client_string_get_request, + build_scalar_client_string_put_request, + build_scalar_client_unknown_get_request, + build_scalar_client_unknown_put_request, ) from .._configuration import ScalarClientConfiguration @@ -45,14 +45,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringOperations: +class ScalarClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`string` attribute. + :attr:`scalar_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -82,7 +82,7 @@ async def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_scalar_client_string_get_request( headers=_headers, params=_params, ) @@ -143,7 +143,7 @@ async def put(self, body: str, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_scalar_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -167,14 +167,14 @@ async def put(self, body: str, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class BooleanOperations: +class ScalarClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`boolean` attribute. + :attr:`scalar_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -204,7 +204,7 @@ async def get(self, **kwargs: Any) -> bool: cls: ClsType[bool] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_scalar_client_boolean_get_request( headers=_headers, params=_params, ) @@ -265,7 +265,7 @@ async def put(self, body: bool, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_scalar_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -289,14 +289,14 @@ async def put(self, body: bool, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class UnknownOperations: +class ScalarClientUnknownOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`unknown` attribute. + :attr:`scalar_client_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -326,7 +326,7 @@ async def get(self, **kwargs: Any) -> Any: cls: ClsType[Any] = kwargs.pop("cls", None) - _request = build_unknown_get_request( + _request = build_scalar_client_unknown_get_request( headers=_headers, params=_params, ) @@ -387,7 +387,7 @@ async def put(self, body: Any, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_put_request( + _request = build_scalar_client_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -411,14 +411,14 @@ async def put(self, body: Any, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class DecimalTypeOperations: +class ScalarClientDecimalTypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal_type` attribute. + :attr:`scalar_client_decimal_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -448,7 +448,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal_type_response_body_request( + _request = build_scalar_client_decimal_type_response_body_request( headers=_headers, params=_params, ) @@ -509,7 +509,7 @@ async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_type_request_body_request( + _request = build_scalar_client_decimal_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -554,7 +554,7 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal_type_request_parameter_request( + _request = build_scalar_client_decimal_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -577,14 +577,14 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class Decimal128TypeOperations: +class ScalarClientDecimal128TypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal128_type` attribute. + :attr:`scalar_client_decimal128_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -614,7 +614,7 @@ async def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal128_type_response_body_request( + _request = build_scalar_client_decimal128_type_response_body_request( headers=_headers, params=_params, ) @@ -675,7 +675,7 @@ async def request_body(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_type_request_body_request( + _request = build_scalar_client_decimal128_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -720,7 +720,7 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal128_type_request_parameter_request( + _request = build_scalar_client_decimal128_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -743,14 +743,14 @@ async def request_parameter(self, *, value: decimal.Decimal, **kwargs: Any) -> N return cls(pipeline_response, None, {}) # type: ignore -class DecimalVerifyOperations: +class ScalarClientDecimalVerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal_verify` attribute. + :attr:`scalar_client_decimal_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -780,7 +780,7 @@ async def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal_verify_prepare_verify_request( + _request = build_scalar_client_decimal_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -838,7 +838,7 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_verify_verify_request( + _request = build_scalar_client_decimal_verify_verify_request( content_type=content_type, content=_content, headers=_headers, @@ -862,14 +862,14 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: return cls(pipeline_response, None, {}) # type: ignore -class Decimal128VerifyOperations: +class ScalarClientDecimal128VerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.aio.ScalarClient`'s - :attr:`decimal128_verify` attribute. + :attr:`scalar_client_decimal128_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -899,7 +899,7 @@ async def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal128_verify_prepare_verify_request( + _request = build_scalar_client_decimal128_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -957,7 +957,7 @@ async def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_verify_verify_request( + _request = build_scalar_client_decimal128_verify_verify_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/__init__.py index d53a8ad35f..e1d3af7d1b 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/__init__.py @@ -6,26 +6,26 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringOperations # type: ignore -from ._operations import BooleanOperations # type: ignore -from ._operations import UnknownOperations # type: ignore -from ._operations import DecimalTypeOperations # type: ignore -from ._operations import Decimal128TypeOperations # type: ignore -from ._operations import DecimalVerifyOperations # type: ignore -from ._operations import Decimal128VerifyOperations # type: ignore +from ._operations import ScalarClientStringOperations # type: ignore +from ._operations import ScalarClientBooleanOperations # type: ignore +from ._operations import ScalarClientUnknownOperations # type: ignore +from ._operations import ScalarClientDecimalTypeOperations # type: ignore +from ._operations import ScalarClientDecimal128TypeOperations # type: ignore +from ._operations import ScalarClientDecimalVerifyOperations # type: ignore +from ._operations import ScalarClientDecimal128VerifyOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringOperations", - "BooleanOperations", - "UnknownOperations", - "DecimalTypeOperations", - "Decimal128TypeOperations", - "DecimalVerifyOperations", - "Decimal128VerifyOperations", + "ScalarClientStringOperations", + "ScalarClientBooleanOperations", + "ScalarClientUnknownOperations", + "ScalarClientDecimalTypeOperations", + "ScalarClientDecimal128TypeOperations", + "ScalarClientDecimalVerifyOperations", + "ScalarClientDecimal128VerifyOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py index 77d574ee10..d4fecba3ae 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-scalar/typetest/scalar/operations/_operations.py @@ -31,7 +31,7 @@ _SERIALIZER.client_side_validation = False -def build_string_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_string_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -45,7 +45,7 @@ def build_string_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_string_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -58,7 +58,7 @@ def build_string_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_boolean_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_boolean_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -72,7 +72,7 @@ def build_boolean_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_boolean_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_boolean_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -85,7 +85,7 @@ def build_boolean_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_unknown_get_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_unknown_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -99,7 +99,7 @@ def build_unknown_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_unknown_put_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_unknown_put_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -112,7 +112,9 @@ def build_unknown_put_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_type_response_body_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_type_response_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -126,7 +128,9 @@ def build_decimal_type_response_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_type_request_body_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_type_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -139,7 +143,7 @@ def build_decimal_type_request_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal_type_request_parameter_request( # pylint: disable=name-too-long +def build_scalar_client_decimal_type_request_parameter_request( # pylint: disable=name-too-long *, value: decimal.Decimal, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -153,7 +157,9 @@ def build_decimal_type_request_parameter_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_decimal128_type_response_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_response_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -167,7 +173,9 @@ def build_decimal128_type_response_body_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_type_request_body_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_request_body_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -180,7 +188,7 @@ def build_decimal128_type_request_body_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="PUT", url=_url, headers=_headers, **kwargs) -def build_decimal128_type_request_parameter_request( # pylint: disable=name-too-long +def build_scalar_client_decimal128_type_request_parameter_request( # pylint: disable=name-too-long *, value: decimal.Decimal, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -194,7 +202,9 @@ def build_decimal128_type_request_parameter_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, **kwargs) -def build_decimal_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal_verify_prepare_verify_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -208,7 +218,7 @@ def build_decimal_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -221,7 +231,9 @@ def build_decimal_verify_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_decimal128_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_scalar_client_decimal128_verify_prepare_verify_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -235,7 +247,7 @@ def build_decimal128_verify_prepare_verify_request(**kwargs: Any) -> HttpRequest return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: +def build_scalar_client_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: str = kwargs.pop("content_type") @@ -248,14 +260,14 @@ def build_decimal128_verify_verify_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class StringOperations: +class ScalarClientStringOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`string` attribute. + :attr:`scalar_client_string` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -285,7 +297,7 @@ def get(self, **kwargs: Any) -> str: cls: ClsType[str] = kwargs.pop("cls", None) - _request = build_string_get_request( + _request = build_scalar_client_string_get_request( headers=_headers, params=_params, ) @@ -346,7 +358,7 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_put_request( + _request = build_scalar_client_string_put_request( content_type=content_type, content=_content, headers=_headers, @@ -370,14 +382,14 @@ def put(self, body: str, **kwargs: Any) -> None: # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore -class BooleanOperations: +class ScalarClientBooleanOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`boolean` attribute. + :attr:`scalar_client_boolean` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -407,7 +419,7 @@ def get(self, **kwargs: Any) -> bool: cls: ClsType[bool] = kwargs.pop("cls", None) - _request = build_boolean_get_request( + _request = build_scalar_client_boolean_get_request( headers=_headers, params=_params, ) @@ -468,7 +480,7 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_boolean_put_request( + _request = build_scalar_client_boolean_put_request( content_type=content_type, content=_content, headers=_headers, @@ -492,14 +504,14 @@ def put(self, body: bool, **kwargs: Any) -> None: # pylint: disable=inconsisten return cls(pipeline_response, None, {}) # type: ignore -class UnknownOperations: +class ScalarClientUnknownOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`unknown` attribute. + :attr:`scalar_client_unknown` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -529,7 +541,7 @@ def get(self, **kwargs: Any) -> Any: cls: ClsType[Any] = kwargs.pop("cls", None) - _request = build_unknown_get_request( + _request = build_scalar_client_unknown_get_request( headers=_headers, params=_params, ) @@ -590,7 +602,7 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_unknown_put_request( + _request = build_scalar_client_unknown_put_request( content_type=content_type, content=_content, headers=_headers, @@ -614,14 +626,14 @@ def put(self, body: Any, **kwargs: Any) -> None: # pylint: disable=inconsistent return cls(pipeline_response, None, {}) # type: ignore -class DecimalTypeOperations: +class ScalarClientDecimalTypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal_type` attribute. + :attr:`scalar_client_decimal_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -651,7 +663,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal_type_response_body_request( + _request = build_scalar_client_decimal_type_response_body_request( headers=_headers, params=_params, ) @@ -714,7 +726,7 @@ def request_body( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_type_request_body_request( + _request = build_scalar_client_decimal_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -761,7 +773,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal_type_request_parameter_request( + _request = build_scalar_client_decimal_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -784,14 +796,14 @@ def request_parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class Decimal128TypeOperations: +class ScalarClientDecimal128TypeOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal128_type` attribute. + :attr:`scalar_client_decimal128_type` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -821,7 +833,7 @@ def response_body(self, **kwargs: Any) -> decimal.Decimal: cls: ClsType[decimal.Decimal] = kwargs.pop("cls", None) - _request = build_decimal128_type_response_body_request( + _request = build_scalar_client_decimal128_type_response_body_request( headers=_headers, params=_params, ) @@ -884,7 +896,7 @@ def request_body( # pylint: disable=inconsistent-return-statements _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_type_request_body_request( + _request = build_scalar_client_decimal128_type_request_body_request( content_type=content_type, content=_content, headers=_headers, @@ -931,7 +943,7 @@ def request_parameter( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_decimal128_type_request_parameter_request( + _request = build_scalar_client_decimal128_type_request_parameter_request( value=value, headers=_headers, params=_params, @@ -954,14 +966,14 @@ def request_parameter( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class DecimalVerifyOperations: +class ScalarClientDecimalVerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal_verify` attribute. + :attr:`scalar_client_decimal_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -991,7 +1003,7 @@ def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal_verify_prepare_verify_request( + _request = build_scalar_client_decimal_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -1049,7 +1061,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal_verify_verify_request( + _request = build_scalar_client_decimal_verify_verify_request( content_type=content_type, content=_content, headers=_headers, @@ -1073,14 +1085,14 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab return cls(pipeline_response, None, {}) # type: ignore -class Decimal128VerifyOperations: +class ScalarClientDecimal128VerifyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.scalar.ScalarClient`'s - :attr:`decimal128_verify` attribute. + :attr:`scalar_client_decimal128_verify` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1110,7 +1122,7 @@ def prepare_verify(self, **kwargs: Any) -> list[decimal.Decimal]: cls: ClsType[list[decimal.Decimal]] = kwargs.pop("cls", None) - _request = build_decimal128_verify_prepare_verify_request( + _request = build_scalar_client_decimal128_verify_prepare_verify_request( headers=_headers, params=_params, ) @@ -1168,7 +1180,7 @@ def verify(self, body: decimal.Decimal, **kwargs: Any) -> None: # pylint: disab _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_decimal128_verify_verify_request( + _request = build_scalar_client_decimal128_verify_verify_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_client.py index 433896cf63..20805afd4a 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/_client.py @@ -10,42 +10,47 @@ from ._configuration import UnionClientConfiguration from ._utils.serialization import Deserializer, Serializer from .operations import ( - EnumsOnlyOperations, - FloatsOnlyOperations, - IntsOnlyOperations, - MixedLiteralsOperations, - MixedTypesOperations, - ModelsOnlyOperations, - StringAndArrayOperations, - StringExtensibleNamedOperations, - StringExtensibleOperations, - StringsOnlyOperations, + UnionClientEnumsOnlyOperations, + UnionClientFloatsOnlyOperations, + UnionClientIntsOnlyOperations, + UnionClientMixedLiteralsOperations, + UnionClientMixedTypesOperations, + UnionClientModelsOnlyOperations, + UnionClientStringAndArrayOperations, + UnionClientStringExtensibleNamedOperations, + UnionClientStringExtensibleOperations, + UnionClientStringsOnlyOperations, ) class UnionClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Describe scenarios for various combinations of unions. - :ivar strings_only: StringsOnlyOperations operations - :vartype strings_only: typetest.union.operations.StringsOnlyOperations - :ivar string_extensible: StringExtensibleOperations operations - :vartype string_extensible: typetest.union.operations.StringExtensibleOperations - :ivar string_extensible_named: StringExtensibleNamedOperations operations - :vartype string_extensible_named: typetest.union.operations.StringExtensibleNamedOperations - :ivar ints_only: IntsOnlyOperations operations - :vartype ints_only: typetest.union.operations.IntsOnlyOperations - :ivar floats_only: FloatsOnlyOperations operations - :vartype floats_only: typetest.union.operations.FloatsOnlyOperations - :ivar models_only: ModelsOnlyOperations operations - :vartype models_only: typetest.union.operations.ModelsOnlyOperations - :ivar enums_only: EnumsOnlyOperations operations - :vartype enums_only: typetest.union.operations.EnumsOnlyOperations - :ivar string_and_array: StringAndArrayOperations operations - :vartype string_and_array: typetest.union.operations.StringAndArrayOperations - :ivar mixed_literals: MixedLiteralsOperations operations - :vartype mixed_literals: typetest.union.operations.MixedLiteralsOperations - :ivar mixed_types: MixedTypesOperations operations - :vartype mixed_types: typetest.union.operations.MixedTypesOperations + :ivar union_client_strings_only: UnionClientStringsOnlyOperations operations + :vartype union_client_strings_only: typetest.union.operations.UnionClientStringsOnlyOperations + :ivar union_client_string_extensible: UnionClientStringExtensibleOperations operations + :vartype union_client_string_extensible: + typetest.union.operations.UnionClientStringExtensibleOperations + :ivar union_client_string_extensible_named: UnionClientStringExtensibleNamedOperations + operations + :vartype union_client_string_extensible_named: + typetest.union.operations.UnionClientStringExtensibleNamedOperations + :ivar union_client_ints_only: UnionClientIntsOnlyOperations operations + :vartype union_client_ints_only: typetest.union.operations.UnionClientIntsOnlyOperations + :ivar union_client_floats_only: UnionClientFloatsOnlyOperations operations + :vartype union_client_floats_only: typetest.union.operations.UnionClientFloatsOnlyOperations + :ivar union_client_models_only: UnionClientModelsOnlyOperations operations + :vartype union_client_models_only: typetest.union.operations.UnionClientModelsOnlyOperations + :ivar union_client_enums_only: UnionClientEnumsOnlyOperations operations + :vartype union_client_enums_only: typetest.union.operations.UnionClientEnumsOnlyOperations + :ivar union_client_string_and_array: UnionClientStringAndArrayOperations operations + :vartype union_client_string_and_array: + typetest.union.operations.UnionClientStringAndArrayOperations + :ivar union_client_mixed_literals: UnionClientMixedLiteralsOperations operations + :vartype union_client_mixed_literals: + typetest.union.operations.UnionClientMixedLiteralsOperations + :ivar union_client_mixed_types: UnionClientMixedTypesOperations operations + :vartype union_client_mixed_types: typetest.union.operations.UnionClientMixedTypesOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -72,20 +77,36 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.strings_only = StringsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_extensible = StringExtensibleOperations( + self.union_client_strings_only = UnionClientStringsOnlyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_extensible_named = StringExtensibleNamedOperations( + self.union_client_string_extensible = UnionClientStringExtensibleOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_extensible_named = UnionClientStringExtensibleNamedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_ints_only = UnionClientIntsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_floats_only = UnionClientFloatsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_models_only = UnionClientModelsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_enums_only = UnionClientEnumsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_and_array = UnionClientStringAndArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_literals = UnionClientMixedLiteralsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_types = UnionClientMixedTypesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.ints_only = IntsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.floats_only = FloatsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.models_only = ModelsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.enums_only = EnumsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_and_array = StringAndArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_literals = MixedLiteralsOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_types = MixedTypesOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/_client.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/_client.py index c99bcdd149..c32b248dd7 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/_client.py @@ -10,42 +10,51 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import UnionClientConfiguration from .operations import ( - EnumsOnlyOperations, - FloatsOnlyOperations, - IntsOnlyOperations, - MixedLiteralsOperations, - MixedTypesOperations, - ModelsOnlyOperations, - StringAndArrayOperations, - StringExtensibleNamedOperations, - StringExtensibleOperations, - StringsOnlyOperations, + UnionClientEnumsOnlyOperations, + UnionClientFloatsOnlyOperations, + UnionClientIntsOnlyOperations, + UnionClientMixedLiteralsOperations, + UnionClientMixedTypesOperations, + UnionClientModelsOnlyOperations, + UnionClientStringAndArrayOperations, + UnionClientStringExtensibleNamedOperations, + UnionClientStringExtensibleOperations, + UnionClientStringsOnlyOperations, ) class UnionClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Describe scenarios for various combinations of unions. - :ivar strings_only: StringsOnlyOperations operations - :vartype strings_only: typetest.union.aio.operations.StringsOnlyOperations - :ivar string_extensible: StringExtensibleOperations operations - :vartype string_extensible: typetest.union.aio.operations.StringExtensibleOperations - :ivar string_extensible_named: StringExtensibleNamedOperations operations - :vartype string_extensible_named: typetest.union.aio.operations.StringExtensibleNamedOperations - :ivar ints_only: IntsOnlyOperations operations - :vartype ints_only: typetest.union.aio.operations.IntsOnlyOperations - :ivar floats_only: FloatsOnlyOperations operations - :vartype floats_only: typetest.union.aio.operations.FloatsOnlyOperations - :ivar models_only: ModelsOnlyOperations operations - :vartype models_only: typetest.union.aio.operations.ModelsOnlyOperations - :ivar enums_only: EnumsOnlyOperations operations - :vartype enums_only: typetest.union.aio.operations.EnumsOnlyOperations - :ivar string_and_array: StringAndArrayOperations operations - :vartype string_and_array: typetest.union.aio.operations.StringAndArrayOperations - :ivar mixed_literals: MixedLiteralsOperations operations - :vartype mixed_literals: typetest.union.aio.operations.MixedLiteralsOperations - :ivar mixed_types: MixedTypesOperations operations - :vartype mixed_types: typetest.union.aio.operations.MixedTypesOperations + :ivar union_client_strings_only: UnionClientStringsOnlyOperations operations + :vartype union_client_strings_only: + typetest.union.aio.operations.UnionClientStringsOnlyOperations + :ivar union_client_string_extensible: UnionClientStringExtensibleOperations operations + :vartype union_client_string_extensible: + typetest.union.aio.operations.UnionClientStringExtensibleOperations + :ivar union_client_string_extensible_named: UnionClientStringExtensibleNamedOperations + operations + :vartype union_client_string_extensible_named: + typetest.union.aio.operations.UnionClientStringExtensibleNamedOperations + :ivar union_client_ints_only: UnionClientIntsOnlyOperations operations + :vartype union_client_ints_only: typetest.union.aio.operations.UnionClientIntsOnlyOperations + :ivar union_client_floats_only: UnionClientFloatsOnlyOperations operations + :vartype union_client_floats_only: + typetest.union.aio.operations.UnionClientFloatsOnlyOperations + :ivar union_client_models_only: UnionClientModelsOnlyOperations operations + :vartype union_client_models_only: + typetest.union.aio.operations.UnionClientModelsOnlyOperations + :ivar union_client_enums_only: UnionClientEnumsOnlyOperations operations + :vartype union_client_enums_only: typetest.union.aio.operations.UnionClientEnumsOnlyOperations + :ivar union_client_string_and_array: UnionClientStringAndArrayOperations operations + :vartype union_client_string_and_array: + typetest.union.aio.operations.UnionClientStringAndArrayOperations + :ivar union_client_mixed_literals: UnionClientMixedLiteralsOperations operations + :vartype union_client_mixed_literals: + typetest.union.aio.operations.UnionClientMixedLiteralsOperations + :ivar union_client_mixed_types: UnionClientMixedTypesOperations operations + :vartype union_client_mixed_types: + typetest.union.aio.operations.UnionClientMixedTypesOperations :keyword endpoint: Service host. Default value is "http://localhost:3000". :paramtype endpoint: str """ @@ -72,20 +81,36 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.strings_only = StringsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_extensible = StringExtensibleOperations( + self.union_client_strings_only = UnionClientStringsOnlyOperations( self._client, self._config, self._serialize, self._deserialize ) - self.string_extensible_named = StringExtensibleNamedOperations( + self.union_client_string_extensible = UnionClientStringExtensibleOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_extensible_named = UnionClientStringExtensibleNamedOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_ints_only = UnionClientIntsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_floats_only = UnionClientFloatsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_models_only = UnionClientModelsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_enums_only = UnionClientEnumsOnlyOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_string_and_array = UnionClientStringAndArrayOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_literals = UnionClientMixedLiteralsOperations( + self._client, self._config, self._serialize, self._deserialize + ) + self.union_client_mixed_types = UnionClientMixedTypesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.ints_only = IntsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.floats_only = FloatsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.models_only = ModelsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.enums_only = EnumsOnlyOperations(self._client, self._config, self._serialize, self._deserialize) - self.string_and_array = StringAndArrayOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_literals = MixedLiteralsOperations(self._client, self._config, self._serialize, self._deserialize) - self.mixed_types = MixedTypesOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/__init__.py index 94461a966e..92d7c6b0f6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/__init__.py @@ -6,32 +6,32 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringsOnlyOperations # type: ignore -from ._operations import StringExtensibleOperations # type: ignore -from ._operations import StringExtensibleNamedOperations # type: ignore -from ._operations import IntsOnlyOperations # type: ignore -from ._operations import FloatsOnlyOperations # type: ignore -from ._operations import ModelsOnlyOperations # type: ignore -from ._operations import EnumsOnlyOperations # type: ignore -from ._operations import StringAndArrayOperations # type: ignore -from ._operations import MixedLiteralsOperations # type: ignore -from ._operations import MixedTypesOperations # type: ignore +from ._operations import UnionClientStringsOnlyOperations # type: ignore +from ._operations import UnionClientStringExtensibleOperations # type: ignore +from ._operations import UnionClientStringExtensibleNamedOperations # type: ignore +from ._operations import UnionClientIntsOnlyOperations # type: ignore +from ._operations import UnionClientFloatsOnlyOperations # type: ignore +from ._operations import UnionClientModelsOnlyOperations # type: ignore +from ._operations import UnionClientEnumsOnlyOperations # type: ignore +from ._operations import UnionClientStringAndArrayOperations # type: ignore +from ._operations import UnionClientMixedLiteralsOperations # type: ignore +from ._operations import UnionClientMixedTypesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringsOnlyOperations", - "StringExtensibleOperations", - "StringExtensibleNamedOperations", - "IntsOnlyOperations", - "FloatsOnlyOperations", - "ModelsOnlyOperations", - "EnumsOnlyOperations", - "StringAndArrayOperations", - "MixedLiteralsOperations", - "MixedTypesOperations", + "UnionClientStringsOnlyOperations", + "UnionClientStringExtensibleOperations", + "UnionClientStringExtensibleNamedOperations", + "UnionClientIntsOnlyOperations", + "UnionClientFloatsOnlyOperations", + "UnionClientModelsOnlyOperations", + "UnionClientEnumsOnlyOperations", + "UnionClientStringAndArrayOperations", + "UnionClientMixedLiteralsOperations", + "UnionClientMixedTypesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py index d8a3622db7..4f9a9b40c3 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/aio/operations/_operations.py @@ -24,26 +24,26 @@ from ..._utils.model_base import SdkJSONEncoder, _deserialize from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import ( - build_enums_only_get_request, - build_enums_only_send_request, - build_floats_only_get_request, - build_floats_only_send_request, - build_ints_only_get_request, - build_ints_only_send_request, - build_mixed_literals_get_request, - build_mixed_literals_send_request, - build_mixed_types_get_request, - build_mixed_types_send_request, - build_models_only_get_request, - build_models_only_send_request, - build_string_and_array_get_request, - build_string_and_array_send_request, - build_string_extensible_get_request, - build_string_extensible_named_get_request, - build_string_extensible_named_send_request, - build_string_extensible_send_request, - build_strings_only_get_request, - build_strings_only_send_request, + build_union_client_enums_only_get_request, + build_union_client_enums_only_send_request, + build_union_client_floats_only_get_request, + build_union_client_floats_only_send_request, + build_union_client_ints_only_get_request, + build_union_client_ints_only_send_request, + build_union_client_mixed_literals_get_request, + build_union_client_mixed_literals_send_request, + build_union_client_mixed_types_get_request, + build_union_client_mixed_types_send_request, + build_union_client_models_only_get_request, + build_union_client_models_only_send_request, + build_union_client_string_and_array_get_request, + build_union_client_string_and_array_send_request, + build_union_client_string_extensible_get_request, + build_union_client_string_extensible_named_get_request, + build_union_client_string_extensible_named_send_request, + build_union_client_string_extensible_send_request, + build_union_client_strings_only_get_request, + build_union_client_strings_only_send_request, ) from .._configuration import UnionClientConfiguration @@ -53,14 +53,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class StringsOnlyOperations: +class UnionClientStringsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`strings_only` attribute. + :attr:`union_client_strings_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -90,7 +90,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse: cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None) - _request = build_strings_only_get_request( + _request = build_union_client_strings_only_get_request( headers=_headers, params=_params, ) @@ -208,7 +208,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_strings_only_send_request( + _request = build_union_client_strings_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -232,14 +232,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleOperations: +class UnionClientStringExtensibleOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_extensible` attribute. + :attr:`union_client_string_extensible` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -269,7 +269,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse1: cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None) - _request = build_string_extensible_get_request( + _request = build_union_client_string_extensible_get_request( headers=_headers, params=_params, ) @@ -389,7 +389,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_send_request( + _request = build_union_client_string_extensible_send_request( content_type=content_type, content=_content, headers=_headers, @@ -413,14 +413,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleNamedOperations: +class UnionClientStringExtensibleNamedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_extensible_named` attribute. + :attr:`union_client_string_extensible_named` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -450,7 +450,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse2: cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None) - _request = build_string_extensible_named_get_request( + _request = build_union_client_string_extensible_named_get_request( headers=_headers, params=_params, ) @@ -574,7 +574,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_named_send_request( + _request = build_union_client_string_extensible_named_send_request( content_type=content_type, content=_content, headers=_headers, @@ -598,14 +598,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class IntsOnlyOperations: +class UnionClientIntsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`ints_only` attribute. + :attr:`union_client_ints_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -635,7 +635,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse3: cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None) - _request = build_ints_only_get_request( + _request = build_union_client_ints_only_get_request( headers=_headers, params=_params, ) @@ -749,7 +749,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_ints_only_send_request( + _request = build_union_client_ints_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -773,14 +773,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class FloatsOnlyOperations: +class UnionClientFloatsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`floats_only` attribute. + :attr:`union_client_floats_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -810,7 +810,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse4: cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None) - _request = build_floats_only_get_request( + _request = build_union_client_floats_only_get_request( headers=_headers, params=_params, ) @@ -922,7 +922,7 @@ async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Un else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_floats_only_send_request( + _request = build_union_client_floats_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -946,14 +946,14 @@ async def send(self, body: Union[JSON, IO[bytes]] = _Unset, *, prop: float = _Un return cls(pipeline_response, None, {}) # type: ignore -class ModelsOnlyOperations: +class UnionClientModelsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`models_only` attribute. + :attr:`union_client_models_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -983,7 +983,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse5: cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None) - _request = build_models_only_get_request( + _request = build_union_client_models_only_get_request( headers=_headers, params=_params, ) @@ -1099,7 +1099,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_only_send_request( + _request = build_union_client_models_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1123,14 +1123,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class EnumsOnlyOperations: +class UnionClientEnumsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`enums_only` attribute. + :attr:`union_client_enums_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1160,7 +1160,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse6: cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None) - _request = build_enums_only_get_request( + _request = build_union_client_enums_only_get_request( headers=_headers, params=_params, ) @@ -1276,7 +1276,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enums_only_send_request( + _request = build_union_client_enums_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1300,14 +1300,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class StringAndArrayOperations: +class UnionClientStringAndArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`string_and_array` attribute. + :attr:`union_client_string_and_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1337,7 +1337,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse7: cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None) - _request = build_string_and_array_get_request( + _request = build_union_client_string_and_array_get_request( headers=_headers, params=_params, ) @@ -1453,7 +1453,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_and_array_send_request( + _request = build_union_client_string_and_array_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1477,14 +1477,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class MixedLiteralsOperations: +class UnionClientMixedLiteralsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`mixed_literals` attribute. + :attr:`union_client_mixed_literals` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1514,7 +1514,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse8: cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None) - _request = build_mixed_literals_get_request( + _request = build_union_client_mixed_literals_get_request( headers=_headers, params=_params, ) @@ -1630,7 +1630,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_literals_send_request( + _request = build_union_client_mixed_literals_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1654,14 +1654,14 @@ async def send( return cls(pipeline_response, None, {}) # type: ignore -class MixedTypesOperations: +class UnionClientMixedTypesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.aio.UnionClient`'s - :attr:`mixed_types` attribute. + :attr:`union_client_mixed_types` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1691,7 +1691,7 @@ async def get(self, **kwargs: Any) -> _models.GetResponse9: cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None) - _request = build_mixed_types_get_request( + _request = build_union_client_mixed_types_get_request( headers=_headers, params=_params, ) @@ -1807,7 +1807,7 @@ async def send( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_types_send_request( + _request = build_union_client_mixed_types_send_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/__init__.py index 94461a966e..92d7c6b0f6 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/__init__.py @@ -6,32 +6,32 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import StringsOnlyOperations # type: ignore -from ._operations import StringExtensibleOperations # type: ignore -from ._operations import StringExtensibleNamedOperations # type: ignore -from ._operations import IntsOnlyOperations # type: ignore -from ._operations import FloatsOnlyOperations # type: ignore -from ._operations import ModelsOnlyOperations # type: ignore -from ._operations import EnumsOnlyOperations # type: ignore -from ._operations import StringAndArrayOperations # type: ignore -from ._operations import MixedLiteralsOperations # type: ignore -from ._operations import MixedTypesOperations # type: ignore +from ._operations import UnionClientStringsOnlyOperations # type: ignore +from ._operations import UnionClientStringExtensibleOperations # type: ignore +from ._operations import UnionClientStringExtensibleNamedOperations # type: ignore +from ._operations import UnionClientIntsOnlyOperations # type: ignore +from ._operations import UnionClientFloatsOnlyOperations # type: ignore +from ._operations import UnionClientModelsOnlyOperations # type: ignore +from ._operations import UnionClientEnumsOnlyOperations # type: ignore +from ._operations import UnionClientStringAndArrayOperations # type: ignore +from ._operations import UnionClientMixedLiteralsOperations # type: ignore +from ._operations import UnionClientMixedTypesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ - "StringsOnlyOperations", - "StringExtensibleOperations", - "StringExtensibleNamedOperations", - "IntsOnlyOperations", - "FloatsOnlyOperations", - "ModelsOnlyOperations", - "EnumsOnlyOperations", - "StringAndArrayOperations", - "MixedLiteralsOperations", - "MixedTypesOperations", + "UnionClientStringsOnlyOperations", + "UnionClientStringExtensibleOperations", + "UnionClientStringExtensibleNamedOperations", + "UnionClientIntsOnlyOperations", + "UnionClientFloatsOnlyOperations", + "UnionClientModelsOnlyOperations", + "UnionClientEnumsOnlyOperations", + "UnionClientStringAndArrayOperations", + "UnionClientMixedLiteralsOperations", + "UnionClientMixedTypesOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py index 057773db54..df55656d20 100644 --- a/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/typetest-union/typetest/union/operations/_operations.py @@ -34,7 +34,7 @@ _SERIALIZER.client_side_validation = False -def build_strings_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_strings_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -48,7 +48,7 @@ def build_strings_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_strings_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_strings_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -62,7 +62,7 @@ def build_strings_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_extensible_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_extensible_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -76,7 +76,7 @@ def build_string_extensible_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_extensible_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_extensible_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -90,7 +90,9 @@ def build_string_extensible_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_extensible_named_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_union_client_string_extensible_named_get_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -104,7 +106,9 @@ def build_string_extensible_named_get_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_extensible_named_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_union_client_string_extensible_named_send_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -118,7 +122,7 @@ def build_string_extensible_named_send_request(**kwargs: Any) -> HttpRequest: # return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_ints_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_ints_only_get_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -132,7 +136,7 @@ def build_ints_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_ints_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_ints_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -146,7 +150,7 @@ def build_ints_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_floats_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_floats_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -160,7 +164,7 @@ def build_floats_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_floats_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_floats_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -174,7 +178,7 @@ def build_floats_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_models_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_models_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -188,7 +192,7 @@ def build_models_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_models_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_models_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -202,7 +206,7 @@ def build_models_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_enums_only_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_enums_only_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -216,7 +220,7 @@ def build_enums_only_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_enums_only_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_enums_only_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -230,7 +234,7 @@ def build_enums_only_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_string_and_array_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_and_array_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -244,7 +248,7 @@ def build_string_and_array_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_string_and_array_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_string_and_array_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -258,7 +262,7 @@ def build_string_and_array_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -272,7 +276,7 @@ def build_mixed_literals_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -286,7 +290,7 @@ def build_mixed_literals_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -def build_mixed_types_get_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_types_get_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) accept = _headers.pop("Accept", "application/json") @@ -300,7 +304,7 @@ def build_mixed_types_get_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="GET", url=_url, headers=_headers, **kwargs) -def build_mixed_types_send_request(**kwargs: Any) -> HttpRequest: +def build_union_client_mixed_types_send_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -314,14 +318,14 @@ def build_mixed_types_send_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class StringsOnlyOperations: +class UnionClientStringsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`strings_only` attribute. + :attr:`union_client_strings_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -351,7 +355,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse: cls: ClsType[_models.GetResponse] = kwargs.pop("cls", None) - _request = build_strings_only_get_request( + _request = build_union_client_strings_only_get_request( headers=_headers, params=_params, ) @@ -467,7 +471,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_strings_only_send_request( + _request = build_union_client_strings_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -491,14 +495,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleOperations: +class UnionClientStringExtensibleOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_extensible` attribute. + :attr:`union_client_string_extensible` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -528,7 +532,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse1: cls: ClsType[_models.GetResponse1] = kwargs.pop("cls", None) - _request = build_string_extensible_get_request( + _request = build_union_client_string_extensible_get_request( headers=_headers, params=_params, ) @@ -610,7 +614,7 @@ def send( # pylint: disable=inconsistent-return-statements body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[Literal["b"], Literal["c"], str] = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -648,7 +652,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_send_request( + _request = build_union_client_string_extensible_send_request( content_type=content_type, content=_content, headers=_headers, @@ -672,14 +676,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringExtensibleNamedOperations: +class UnionClientStringExtensibleNamedOperations: # pylint: disable=name-too-long """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_extensible_named` attribute. + :attr:`union_client_string_extensible_named` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -709,7 +713,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse2: cls: ClsType[_models.GetResponse2] = kwargs.pop("cls", None) - _request = build_string_extensible_named_get_request( + _request = build_union_client_string_extensible_named_get_request( headers=_headers, params=_params, ) @@ -748,7 +752,7 @@ def send( *, prop: Union[str, _models.StringExtensibleNamedUnion], content_type: str = "application/json", - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -795,7 +799,7 @@ def send( # pylint: disable=inconsistent-return-statements body: Union[JSON, IO[bytes]] = _Unset, *, prop: Union[str, _models.StringExtensibleNamedUnion] = _Unset, - **kwargs: Any + **kwargs: Any, ) -> None: """send. @@ -833,7 +837,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_extensible_named_send_request( + _request = build_union_client_string_extensible_named_send_request( content_type=content_type, content=_content, headers=_headers, @@ -857,14 +861,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class IntsOnlyOperations: +class UnionClientIntsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`ints_only` attribute. + :attr:`union_client_ints_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -894,7 +898,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse3: cls: ClsType[_models.GetResponse3] = kwargs.pop("cls", None) - _request = build_ints_only_get_request( + _request = build_union_client_ints_only_get_request( headers=_headers, params=_params, ) @@ -1008,7 +1012,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_ints_only_send_request( + _request = build_union_client_ints_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1032,14 +1036,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class FloatsOnlyOperations: +class UnionClientFloatsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`floats_only` attribute. + :attr:`union_client_floats_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1069,7 +1073,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse4: cls: ClsType[_models.GetResponse4] = kwargs.pop("cls", None) - _request = build_floats_only_get_request( + _request = build_union_client_floats_only_get_request( headers=_headers, params=_params, ) @@ -1183,7 +1187,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_floats_only_send_request( + _request = build_union_client_floats_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1207,14 +1211,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class ModelsOnlyOperations: +class UnionClientModelsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`models_only` attribute. + :attr:`union_client_models_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1244,7 +1248,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse5: cls: ClsType[_models.GetResponse5] = kwargs.pop("cls", None) - _request = build_models_only_get_request( + _request = build_union_client_models_only_get_request( headers=_headers, params=_params, ) @@ -1360,7 +1364,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_models_only_send_request( + _request = build_union_client_models_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1384,14 +1388,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class EnumsOnlyOperations: +class UnionClientEnumsOnlyOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`enums_only` attribute. + :attr:`union_client_enums_only` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1421,7 +1425,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse6: cls: ClsType[_models.GetResponse6] = kwargs.pop("cls", None) - _request = build_enums_only_get_request( + _request = build_union_client_enums_only_get_request( headers=_headers, params=_params, ) @@ -1535,7 +1539,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_enums_only_send_request( + _request = build_union_client_enums_only_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1559,14 +1563,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class StringAndArrayOperations: +class UnionClientStringAndArrayOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`string_and_array` attribute. + :attr:`union_client_string_and_array` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1596,7 +1600,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse7: cls: ClsType[_models.GetResponse7] = kwargs.pop("cls", None) - _request = build_string_and_array_get_request( + _request = build_union_client_string_and_array_get_request( headers=_headers, params=_params, ) @@ -1710,7 +1714,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_string_and_array_send_request( + _request = build_union_client_string_and_array_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1734,14 +1738,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedLiteralsOperations: +class UnionClientMixedLiteralsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`mixed_literals` attribute. + :attr:`union_client_mixed_literals` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1771,7 +1775,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse8: cls: ClsType[_models.GetResponse8] = kwargs.pop("cls", None) - _request = build_mixed_literals_get_request( + _request = build_union_client_mixed_literals_get_request( headers=_headers, params=_params, ) @@ -1885,7 +1889,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_literals_send_request( + _request = build_union_client_mixed_literals_send_request( content_type=content_type, content=_content, headers=_headers, @@ -1909,14 +1913,14 @@ def send( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore -class MixedTypesOperations: +class UnionClientMixedTypesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~typetest.union.UnionClient`'s - :attr:`mixed_types` attribute. + :attr:`union_client_mixed_types` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -1946,7 +1950,7 @@ def get(self, **kwargs: Any) -> _models.GetResponse9: cls: ClsType[_models.GetResponse9] = kwargs.pop("cls", None) - _request = build_mixed_types_get_request( + _request = build_union_client_mixed_types_get_request( headers=_headers, params=_params, ) @@ -2060,7 +2064,7 @@ def send( # pylint: disable=inconsistent-return-statements else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mixed_types_send_request( + _request = build_union_client_mixed_types_send_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py index 2a7c93b621..991095b7b6 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/_client.py @@ -9,14 +9,15 @@ from ._configuration import AddedClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import InterfaceV2Operations, _AddedClientOperationsMixin +from .operations import AddedClientInterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@added`` decorator. - :ivar interface_v2: InterfaceV2Operations operations - :vartype interface_v2: versioning.added.operations.InterfaceV2Operations + :ivar added_client_interface_v2: AddedClientInterfaceV2Operations operations + :vartype added_client_interface_v2: + versioning.added.operations.AddedClientInterfaceV2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -48,7 +49,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.interface_v2 = InterfaceV2Operations(self._client, self._config, self._serialize, self._deserialize) + self.added_client_interface_v2 = AddedClientInterfaceV2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py index 31c8303444..fef986a993 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/_client.py @@ -9,14 +9,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import AddedClientConfiguration -from .operations import InterfaceV2Operations, _AddedClientOperationsMixin +from .operations import AddedClientInterfaceV2Operations, _AddedClientOperationsMixin class AddedClient(_AddedClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@added`` decorator. - :ivar interface_v2: InterfaceV2Operations operations - :vartype interface_v2: versioning.added.aio.operations.InterfaceV2Operations + :ivar added_client_interface_v2: AddedClientInterfaceV2Operations operations + :vartype added_client_interface_v2: + versioning.added.aio.operations.AddedClientInterfaceV2Operations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -48,7 +49,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.interface_v2 = InterfaceV2Operations(self._client, self._config, self._serialize, self._deserialize) + self.added_client_interface_v2 = AddedClientInterfaceV2Operations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py index 0aa7a03797..cab112b46c 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InterfaceV2Operations # type: ignore +from ._operations import AddedClientInterfaceV2Operations # type: ignore from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InterfaceV2Operations", + "AddedClientInterfaceV2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py index 34ff77cf85..bc68a63d25 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/aio/operations/_operations.py @@ -25,9 +25,9 @@ from ..._utils.utils import ClientMixinABC from ..._validation import api_version_validation from ...operations._operations import ( + build_added_client_interface_v2_v2_in_interface_request, build_added_v1_request, build_added_v2_request, - build_interface_v2_v2_in_interface_request, ) from .._configuration import AddedClientConfiguration @@ -36,14 +36,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class InterfaceV2Operations: +class AddedClientInterfaceV2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.added.aio.AddedClient`'s - :attr:`interface_v2` attribute. + :attr:`added_client_interface_v2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -136,7 +136,7 @@ async def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], * else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_interface_v2_v2_in_interface_request( + _request = build_added_client_interface_v2_v2_in_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py index 0aa7a03797..cab112b46c 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import InterfaceV2Operations # type: ignore +from ._operations import AddedClientInterfaceV2Operations # type: ignore from ._operations import _AddedClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "InterfaceV2Operations", + "AddedClientInterfaceV2Operations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py index 016153b531..0898084862 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-added/versioning/added/operations/_operations.py @@ -34,7 +34,9 @@ _SERIALIZER.client_side_validation = False -def build_interface_v2_v2_in_interface_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_added_client_interface_v2_v2_in_interface_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -86,14 +88,14 @@ def build_added_v2_request(**kwargs: Any) -> HttpRequest: return HttpRequest(method="POST", url=_url, headers=_headers, **kwargs) -class InterfaceV2Operations: +class AddedClientInterfaceV2Operations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.added.AddedClient`'s - :attr:`interface_v2` attribute. + :attr:`added_client_interface_v2` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -184,7 +186,7 @@ def v2_in_interface(self, body: Union[_models.ModelV2, JSON, IO[bytes]], **kwarg else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_interface_v2_v2_in_interface_request( + _request = build_added_client_interface_v2_v2_in_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py index 46c4988352..2d33b91948 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/_client.py @@ -9,14 +9,15 @@ from ._configuration import RenamedFromClientConfiguration from ._utils.serialization import Deserializer, Serializer -from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin +from .operations import RenamedFromClientNewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@renamedFrom`` decorator. - :ivar new_interface: NewInterfaceOperations operations - :vartype new_interface: versioning.renamedfrom.operations.NewInterfaceOperations + :ivar renamed_from_client_new_interface: RenamedFromClientNewInterfaceOperations operations + :vartype renamed_from_client_new_interface: + versioning.renamedfrom.operations.RenamedFromClientNewInterfaceOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -48,7 +49,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.new_interface = NewInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_from_client_new_interface = RenamedFromClientNewInterfaceOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py index e85150ae87..9a524596f8 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/_client.py @@ -9,14 +9,15 @@ from .._utils.serialization import Deserializer, Serializer from ._configuration import RenamedFromClientConfiguration -from .operations import NewInterfaceOperations, _RenamedFromClientOperationsMixin +from .operations import RenamedFromClientNewInterfaceOperations, _RenamedFromClientOperationsMixin class RenamedFromClient(_RenamedFromClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """Test for the ``@renamedFrom`` decorator. - :ivar new_interface: NewInterfaceOperations operations - :vartype new_interface: versioning.renamedfrom.aio.operations.NewInterfaceOperations + :ivar renamed_from_client_new_interface: RenamedFromClientNewInterfaceOperations operations + :vartype renamed_from_client_new_interface: + versioning.renamedfrom.aio.operations.RenamedFromClientNewInterfaceOperations :param endpoint: Need to be set as '`http://localhost:3000 `_' in client. Required. :type endpoint: str @@ -48,7 +49,9 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential self._serialize = Serializer() self._deserialize = Deserializer() self._serialize.client_side_validation = False - self.new_interface = NewInterfaceOperations(self._client, self._config, self._serialize, self._deserialize) + self.renamed_from_client_new_interface = RenamedFromClientNewInterfaceOperations( + self._client, self._config, self._serialize, self._deserialize + ) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py index f442abbdd7..85ba60fbd7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NewInterfaceOperations # type: ignore +from ._operations import RenamedFromClientNewInterfaceOperations # type: ignore from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NewInterfaceOperations", + "RenamedFromClientNewInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py index a26ce852ec..0bf1f5f072 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/aio/operations/_operations.py @@ -24,7 +24,7 @@ from ..._utils.serialization import Deserializer, Serializer from ..._utils.utils import ClientMixinABC from ...operations._operations import ( - build_new_interface_new_op_in_new_interface_request, + build_renamed_from_client_new_interface_new_op_in_new_interface_request, build_renamed_from_new_op_request, ) from .._configuration import RenamedFromClientConfiguration @@ -34,14 +34,14 @@ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -class NewInterfaceOperations: +class RenamedFromClientNewInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.renamedfrom.aio.RenamedFromClient`'s - :attr:`new_interface` attribute. + :attr:`renamed_from_client_new_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -131,7 +131,7 @@ async def new_op_in_new_interface( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_new_interface_new_op_in_new_interface_request( + _request = build_renamed_from_client_new_interface_new_op_in_new_interface_request( content_type=content_type, content=_content, headers=_headers, diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py index f442abbdd7..85ba60fbd7 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/__init__.py @@ -6,7 +6,7 @@ if TYPE_CHECKING: from ._patch import * # pylint: disable=unused-wildcard-import -from ._operations import NewInterfaceOperations # type: ignore +from ._operations import RenamedFromClientNewInterfaceOperations # type: ignore from ._operations import _RenamedFromClientOperationsMixin # type: ignore # pylint: disable=unused-import from ._patch import __all__ as _patch_all @@ -14,7 +14,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ - "NewInterfaceOperations", + "RenamedFromClientNewInterfaceOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py index 6ce26af584..365a421ebe 100644 --- a/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/versioning-renamedfrom/versioning/renamedfrom/operations/_operations.py @@ -33,7 +33,9 @@ _SERIALIZER.client_side_validation = False -def build_new_interface_new_op_in_new_interface_request(**kwargs: Any) -> HttpRequest: # pylint: disable=name-too-long +def build_renamed_from_client_new_interface_new_op_in_new_interface_request( # pylint: disable=name-too-long + **kwargs: Any, +) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) @@ -71,14 +73,14 @@ def build_renamed_from_new_op_request(*, new_query: str, **kwargs: Any) -> HttpR return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -class NewInterfaceOperations: +class RenamedFromClientNewInterfaceOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~versioning.renamedfrom.RenamedFromClient`'s - :attr:`new_interface` attribute. + :attr:`renamed_from_client_new_interface` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -168,7 +170,7 @@ def new_op_in_new_interface( else: _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_new_interface_new_op_in_new_interface_request( + _request = build_renamed_from_client_new_interface_new_op_in_new_interface_request( content_type=content_type, content=_content, headers=_headers,