diff --git a/specification/monitor/Monitor.Query.Logs/client.tsp b/specification/monitor/Monitor.Query.Logs/client.tsp index 7eb71f1373a7..03985329ece4 100644 --- a/specification/monitor/Monitor.Query.Logs/client.tsp +++ b/specification/monitor/Monitor.Query.Logs/client.tsp @@ -89,3 +89,34 @@ interface Client { Access.internal, "python" ); + +// .NET configuration +@client( + { + name: "LogsQueryClient", + service: MonitorQueryLogs, + }, + "csharp" +) +interface LogsQueryClient { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Doesn't fit standard ops" + queryWorkspace is MonitorQueryLogs.Query.execute; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Doesn't fit standard ops" + queryResource is MonitorQueryLogs.Query.executeWithResourceId; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Doesn't fit standard ops" + queryBatch is MonitorQueryLogs.Query.batch; +} + +@@clientName(Column, "LogsTableColumn", "csharp"); +@@clientName(ColumnDataType, "LogsColumnType", "csharp"); +@@clientName(Table, "LogsTable", "csharp"); +@@clientName(QueryResults, "LogsQueryResult", "csharp"); +@@clientName(BatchQueryResults, "LogsBatchQueryResult", "csharp"); + +@@access(QueryBody, Access.internal, "csharp"); +@@access(BatchQueryRequest, Access.internal, "csharp"); +@@access(LogsQueryClient.queryBatch, Access.internal, "csharp"); +@@access(LogsQueryClient.queryWorkspace, Access.internal, "csharp"); +@@access(LogsQueryClient.queryResource, Access.internal, "csharp"); diff --git a/specification/monitor/Monitor.Query.Logs/tspconfig.yaml b/specification/monitor/Monitor.Query.Logs/tspconfig.yaml index 6e379526a2e6..242320a7eb29 100644 --- a/specification/monitor/Monitor.Query.Logs/tspconfig.yaml +++ b/specification/monitor/Monitor.Query.Logs/tspconfig.yaml @@ -23,12 +23,13 @@ options: package-version: 2.0.0 flavor: azure namespace: azure.monitor.query - "@azure-tools/typespec-csharp": + "@azure-typespec/http-client-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" - namespace: "Azure.Monitor.Query.Logs" - clear-output-folder: true - model-namespace: false - flavor: azure + package-name: "Azure.Monitor.Query.Logs" + namespace: "{package-name}" + generate-convenience-methods: true + generate-protocol-methods: false + model-namespace: true "@azure-tools/typespec-ts": package-dir: "monitor-query-logs" is-modular-library: true