diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputationRestClient.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputationRestClient.cs
index 9b6b4af3c1ce6..5c879b09d0acf 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputationRestClient.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputationRestClient.cs
@@ -17,7 +17,6 @@ internal partial class ComputationRestClient
{
private string nodeName;
private Uri endpoint;
- private string xMsClientRequestId;
private ClientDiagnostics _clientDiagnostics;
private HttpPipeline _pipeline;
@@ -26,9 +25,8 @@ internal partial class ComputationRestClient
/// The HTTP pipeline for sending and receiving REST requests and responses.
/// The String to use.
/// server parameter.
- /// Optional client-provided request id.
/// is null.
- public ComputationRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string nodeName, Uri endpoint = null, string xMsClientRequestId = null)
+ public ComputationRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string nodeName, Uri endpoint = null)
{
if (nodeName == null)
{
@@ -38,7 +36,6 @@ public ComputationRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p
this.nodeName = nodeName;
this.endpoint = endpoint;
- this.xMsClientRequestId = xMsClientRequestId;
_clientDiagnostics = clientDiagnostics;
_pipeline = pipeline;
}
@@ -58,10 +55,6 @@ internal HttpMessage CreateComputePiRequest(int? precision)
uri.AppendQuery("precision", precision.Value, true);
}
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
return message;
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputeNodeAdministrationRestClient.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputeNodeAdministrationRestClient.cs
index bf673a7acbe3e..ae99836835c04 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputeNodeAdministrationRestClient.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ComputeNodeAdministrationRestClient.cs
@@ -20,7 +20,6 @@ internal partial class ComputeNodeAdministrationRestClient
{
private string nodeName;
private Uri endpoint;
- private string xMsClientRequestId;
private ClientDiagnostics _clientDiagnostics;
private HttpPipeline _pipeline;
@@ -29,9 +28,8 @@ internal partial class ComputeNodeAdministrationRestClient
/// The HTTP pipeline for sending and receiving REST requests and responses.
/// The String to use.
/// server parameter.
- /// Optional client-provided request id.
/// is null.
- public ComputeNodeAdministrationRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string nodeName, Uri endpoint = null, string xMsClientRequestId = null)
+ public ComputeNodeAdministrationRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string nodeName, Uri endpoint = null)
{
if (nodeName == null)
{
@@ -41,7 +39,6 @@ public ComputeNodeAdministrationRestClient(ClientDiagnostics clientDiagnostics,
this.nodeName = nodeName;
this.endpoint = endpoint;
- this.xMsClientRequestId = xMsClientRequestId;
_clientDiagnostics = clientDiagnostics;
_pipeline = pipeline;
}
@@ -55,10 +52,6 @@ internal HttpMessage CreateListRequest()
uri.Reset(endpoint);
uri.AppendPath("/ComputeNodes", false);
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
return message;
}
@@ -110,10 +103,6 @@ internal HttpMessage CreateCreateRequest(string ifMatch, ComputeNode computeNode
uri.AppendPath("/ComputeNodes/", false);
uri.AppendPath(nodeName, true);
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
if (ifMatch != null)
{
request.Headers.Add("if-match", ifMatch);
@@ -182,10 +171,6 @@ internal HttpMessage CreateGetRequest()
uri.AppendPath("/ComputeNodes/", false);
uri.AppendPath(nodeName, true);
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
return message;
}
@@ -236,10 +221,6 @@ internal HttpMessage CreateListNextPageRequest(string nextLink)
uri.Reset(endpoint);
uri.AppendRawNextLink(nextLink, false);
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
return message;
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.Serialization.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.Serialization.cs
index df7a6a0223af9..d26bf8892c68e 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.Serialization.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.Serialization.cs
@@ -31,7 +31,7 @@ internal static ComputeNode DeserializeComputeNode(JsonElement element)
}
}
Optional eTag = default;
- Optional name = default;
+ string name = default;
string kind = default;
foreach (var property in element.EnumerateObject())
{
@@ -51,7 +51,7 @@ internal static ComputeNode DeserializeComputeNode(JsonElement element)
continue;
}
}
- return new ComputeNode(eTag.Value, name.Value, kind);
+ return new ComputeNode(eTag.Value, name, kind);
}
}
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.cs
index cd914c847e6d1..26116f290f0bd 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/ComputeNode.cs
@@ -5,14 +5,24 @@
#nullable disable
+using System;
+
namespace Azure.Learn.Computation.Models
{
/// The ComputeNode.
public partial class ComputeNode
{
/// Initializes a new instance of ComputeNode.
- public ComputeNode()
+ /// The name of the compute node.
+ /// is null.
+ public ComputeNode(string name)
{
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
+
+ Name = name;
}
/// Initializes a new instance of ComputeNode.
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.Serialization.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.Serialization.cs
index 426dd483dddba..cb0377a0cae7c 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.Serialization.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.Serialization.cs
@@ -26,7 +26,7 @@ internal static LinuxComputeNode DeserializeLinuxComputeNode(JsonElement element
{
string sshPublicKey = default;
Optional eTag = default;
- Optional name = default;
+ string name = default;
string kind = default;
foreach (var property in element.EnumerateObject())
{
@@ -51,7 +51,7 @@ internal static LinuxComputeNode DeserializeLinuxComputeNode(JsonElement element
continue;
}
}
- return new LinuxComputeNode(eTag.Value, name.Value, kind, sshPublicKey);
+ return new LinuxComputeNode(eTag.Value, name, kind, sshPublicKey);
}
}
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.cs
index 24c685873fb23..5b59c1dfcd420 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/LinuxComputeNode.cs
@@ -13,10 +13,15 @@ namespace Azure.Learn.Computation.Models
public partial class LinuxComputeNode : ComputeNode
{
/// Initializes a new instance of LinuxComputeNode.
+ /// The name of the compute node.
/// The compute node's public key.
- /// is null.
- public LinuxComputeNode(string sshPublicKey)
+ /// or is null.
+ public LinuxComputeNode(string name, string sshPublicKey) : base(name)
{
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
if (sshPublicKey == null)
{
throw new ArgumentNullException(nameof(sshPublicKey));
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.Serialization.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.Serialization.cs
index e963c05fb623d..b0eb94422cb41 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.Serialization.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.Serialization.cs
@@ -26,7 +26,7 @@ internal static WindowsComputeNode DeserializeWindowsComputeNode(JsonElement ele
{
string userName = default;
Optional eTag = default;
- Optional name = default;
+ string name = default;
string kind = default;
foreach (var property in element.EnumerateObject())
{
@@ -51,7 +51,7 @@ internal static WindowsComputeNode DeserializeWindowsComputeNode(JsonElement ele
continue;
}
}
- return new WindowsComputeNode(eTag.Value, name.Value, kind, userName);
+ return new WindowsComputeNode(eTag.Value, name, kind, userName);
}
}
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.cs
index 368e8684b36d3..2baee42f377a6 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/Models/WindowsComputeNode.cs
@@ -13,10 +13,15 @@ namespace Azure.Learn.Computation.Models
public partial class WindowsComputeNode : ComputeNode
{
/// Initializes a new instance of WindowsComputeNode.
+ /// The name of the compute node.
/// The Windows user name.
- /// is null.
- public WindowsComputeNode(string userName)
+ /// or is null.
+ public WindowsComputeNode(string name, string userName) : base(name)
{
+ if (name == null)
+ {
+ throw new ArgumentNullException(nameof(name));
+ }
if (userName == null)
{
throw new ArgumentNullException(nameof(userName));
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ServiceRestClient.cs b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ServiceRestClient.cs
index bdce93e797798..06ab78007771a 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/Generated/ServiceRestClient.cs
+++ b/sdk/api-learn/Azure.Learn.Computation/src/Generated/ServiceRestClient.cs
@@ -18,7 +18,6 @@ namespace Azure.Learn.Computation
internal partial class ServiceRestClient
{
private Uri endpoint;
- private string xMsClientRequestId;
private ClientDiagnostics _clientDiagnostics;
private HttpPipeline _pipeline;
@@ -26,13 +25,11 @@ internal partial class ServiceRestClient
/// The handler for diagnostic messaging in the client.
/// The HTTP pipeline for sending and receiving REST requests and responses.
/// server parameter.
- /// Optional client-provided request id.
- public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string xMsClientRequestId = null)
+ public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null)
{
endpoint ??= new Uri("");
this.endpoint = endpoint;
- this.xMsClientRequestId = xMsClientRequestId;
_clientDiagnostics = clientDiagnostics;
_pipeline = pipeline;
}
@@ -47,10 +44,6 @@ internal HttpMessage CreateComputationRequest(string operationId)
uri.AppendPath("/operations/", false);
uri.AppendPath(operationId, true);
request.Uri = uri;
- if (xMsClientRequestId != null)
- {
- request.Headers.Add("x-ms-client-request-id", xMsClientRequestId);
- }
return message;
}
diff --git a/sdk/api-learn/Azure.Learn.Computation/src/swagger/computation.json b/sdk/api-learn/Azure.Learn.Computation/src/swagger/computation.json
index 38a4af2c714b8..fca58facce2b3 100644
--- a/sdk/api-learn/Azure.Learn.Computation/src/swagger/computation.json
+++ b/sdk/api-learn/Azure.Learn.Computation/src/swagger/computation.json
@@ -8,11 +8,6 @@
"produces": [ "application/json" ],
"paths": {
"/ComputeNodes": {
- "parameters": [
- {
- "$ref": "#/parameters/ClientRequestId"
- }
- ],
"get": {
"operationId": "ComputeNodeAdministration_List",
"tags": [ "Administration" ],
@@ -38,9 +33,6 @@
},
"/ComputeNodes/{nodeName}": {
"parameters": [
- {
- "$ref": "#/parameters/ClientRequestId"
- },
{
"$ref": "#/parameters/NodeName"
}
@@ -98,9 +90,6 @@
},
"/ComputeNodes/{nodeName}/computePi": {
"parameters": [
- {
- "$ref": "#/parameters/ClientRequestId"
- },
{
"$ref": "#/parameters/NodeName"
}
@@ -138,9 +127,6 @@
"type": "string",
"in": "path",
"required": true
- },
- {
- "$ref": "#/parameters/ClientRequestId"
}
],
"get": {
@@ -168,13 +154,6 @@
"in": "path",
"type": "string",
"required": true
- },
- "ClientRequestId": {
- "in": "header",
- "type": "string",
- "required": false,
- "name": "x-ms-client-request-id",
- "description": "Optional client-provided request id"
}
},
"definitions": {
@@ -203,7 +182,8 @@
"ComputeNode": {
"type": "object",
"required": [
- "kind"
+ "kind",
+ "name"
],
"discriminator": "kind",
"properties": {