22// Licensed under the MIT License.
33
44using System ;
5- using System . Collections . Concurrent ;
6- using System . Collections . Generic ;
75using System . Threading ;
86using System . Threading . Tasks ;
97using Azure . Core ;
@@ -69,18 +67,18 @@ internal SchemaRegistryClient(ClientDiagnostics clientDiagnostics, HttpPipeline
6967 /// Registers a schema with the SchemaRegistry service.
7068 /// </summary>
7169 /// <param name="groupName">The name of the SchemaRegistry group.</param>
72- /// <param name="name ">The name of the schema.</param>
70+ /// <param name="schemaName ">The name of the schema.</param>
7371 /// <param name="schemaDefinition">The string representation of the schema's content.</param>
7472 /// <param name="format">The serialization format of the schema.</param>
7573 /// <param name="cancellationToken">The cancellation token for the operation.</param>
7674 /// <returns>The properties of the schema.</returns>
7775 public virtual async Task < Response < SchemaProperties > > RegisterSchemaAsync (
7876 string groupName ,
79- string name ,
77+ string schemaName ,
8078 string schemaDefinition ,
8179 SchemaFormat format ,
8280 CancellationToken cancellationToken = default ) =>
83- await RegisterSchemaInternalAsync ( groupName , name , schemaDefinition , format , true , cancellationToken )
81+ await RegisterSchemaInternalAsync ( groupName , schemaName , schemaDefinition , format , true , cancellationToken )
8482 . ConfigureAwait ( false ) ;
8583
8684 /// <summary>
@@ -89,23 +87,23 @@ await RegisterSchemaInternalAsync(groupName, name, schemaDefinition, format, tru
8987 /// If the schema did previous exist in the Schema Registry instance, a new version of the schema is added to the instance and assigned a new schema ID.
9088 /// </summary>
9189 /// <param name="groupName">The name of the SchemaRegistry group.</param>
92- /// <param name="name ">The name of the schema.</param>
90+ /// <param name="schemaName ">The name of the schema.</param>
9391 /// <param name="schemaDefinition">The string representation of the schema's content.</param>
9492 /// <param name="format">The serialization format of the schema.</param>
9593 /// <param name="cancellationToken">The cancellation token for the operation.</param>
9694 /// <returns>The properties of the schema.</returns>
9795 public virtual Response < SchemaProperties > RegisterSchema (
9896 string groupName ,
99- string name ,
97+ string schemaName ,
10098 string schemaDefinition ,
10199 SchemaFormat format ,
102100 CancellationToken cancellationToken = default ) =>
103- RegisterSchemaInternalAsync ( groupName , name , schemaDefinition , format , false , cancellationToken )
101+ RegisterSchemaInternalAsync ( groupName , schemaName , schemaDefinition , format , false , cancellationToken )
104102 . EnsureCompleted ( ) ;
105103
106104 private async Task < Response < SchemaProperties > > RegisterSchemaInternalAsync (
107105 string groupName ,
108- string name ,
106+ string schemaName ,
109107 string schemaDefinition ,
110108 SchemaFormat format ,
111109 bool async ,
@@ -118,14 +116,14 @@ private async Task<Response<SchemaProperties>> RegisterSchemaInternalAsync(
118116 ResponseWithHeaders < SchemaId , SchemaRegisterHeaders > response ;
119117 if ( async)
120118 {
121- response = await RestClient . RegisterAsync ( groupName , name , format , schemaDefinition , cancellationToken ) . ConfigureAwait ( false ) ;
119+ response = await RestClient . RegisterAsync ( groupName , schemaName , format , schemaDefinition , cancellationToken ) . ConfigureAwait ( false ) ;
122120 }
123121 else
124122 {
125- response = RestClient . Register ( groupName , name , format , schemaDefinition , cancellationToken ) ;
123+ response = RestClient . Register ( groupName , schemaName , format , schemaDefinition , cancellationToken ) ;
126124 }
127125
128- var properties = new SchemaProperties ( response . Headers . Location , response . Headers . SerializationType , response . Headers . SchemaId , response . Headers . SchemaVersion ) ;
126+ var properties = new SchemaProperties ( response . Headers . SerializationType , response . Headers . SchemaId ) ;
129127
130128 return Response. FromValue ( properties , response ) ;
131129 }
@@ -140,44 +138,44 @@ private async Task<Response<SchemaProperties>> RegisterSchemaInternalAsync(
140138 /// Gets the schema ID associated with the schema from the SchemaRegistry service.
141139 /// </summary>
142140 /// <param name="groupName">The name of the SchemaRegistry group.</param>
143- /// <param name="name ">The name of the schema.</param>
141+ /// <param name="schemaName ">The name of the schema.</param>
144142 /// <param name="schemaDefinition">The string representation of the schema's content.</param>
145143 /// <param name="format">The serialization format of the schema.</param>
146144 /// <param name="cancellationToken">The cancellation token for the operation.</param>
147145 /// <returns>The properties of the schema, including the schema ID provided by the service.</returns>
148146#pragma warning disable AZC0015 // Unexpected client method return type.
149147 public virtual async Task < Response < SchemaProperties > > GetSchemaPropertiesAsync (
150148 string groupName ,
151- string name ,
149+ string schemaName ,
152150 string schemaDefinition ,
153151 SchemaFormat format ,
154152 CancellationToken cancellationToken = default ) =>
155153#pragma warning restore AZC0015 // Unexpected client method return type.
156- await GetSchemaPropertiesInternalAsync ( groupName , name , schemaDefinition , format , true , cancellationToken )
154+ await GetSchemaPropertiesInternalAsync ( groupName , schemaName , schemaDefinition , format , true , cancellationToken )
157155 . ConfigureAwait ( false ) ;
158156
159157 /// <summary>
160158 /// Gets the schema ID associated with the schema from the SchemaRegistry service.
161159 /// </summary>
162160 /// <param name="groupName">The name of the SchemaRegistry group.</param>
163- /// <param name="name ">The name of the schema.</param>
161+ /// <param name="schemaName ">The name of the schema.</param>
164162 /// <param name="schemaDefinition">The string representation of the schema's content.</param>
165163 /// <param name="format">The serialization format of the schema.</param>
166164 /// <param name="cancellationToken">The cancellation token for the operation.</param>
167165 /// <returns>The properties of the schema, including the schema ID provided by the service.</returns>
168166#pragma warning disable AZC0015 // Unexpected client method return type.
169167 public virtual Response < SchemaProperties > GetSchemaProperties (
170168 string groupName ,
171- string name ,
169+ string schemaName ,
172170 string schemaDefinition ,
173171 SchemaFormat format ,
174172 CancellationToken cancellationToken = default ) =>
175173#pragma warning restore AZC0015 // Unexpected client method return type.
176- GetSchemaPropertiesInternalAsync ( groupName , name , schemaDefinition , format , false , cancellationToken ) . EnsureCompleted ( ) ;
174+ GetSchemaPropertiesInternalAsync ( groupName , schemaName , schemaDefinition , format , false , cancellationToken ) . EnsureCompleted ( ) ;
177175
178176 private async Task < Response < SchemaProperties > > GetSchemaPropertiesInternalAsync (
179177 string groupName ,
180- string name ,
178+ string schemaName ,
181179 string schemaDefinition ,
182180 SchemaFormat format ,
183181 bool async ,
@@ -190,14 +188,14 @@ private async Task<Response<SchemaProperties>> GetSchemaPropertiesInternalAsync(
190188 ResponseWithHeaders < SchemaId , SchemaQueryIdByContentHeaders > response ;
191189 if ( async)
192190 {
193- response = await RestClient . QueryIdByContentAsync ( groupName , name , format , schemaDefinition , cancellationToken ) . ConfigureAwait ( false ) ;
191+ response = await RestClient . QueryIdByContentAsync ( groupName , schemaName , format , schemaDefinition , cancellationToken ) . ConfigureAwait ( false ) ;
194192 }
195193 else
196194 {
197- response = RestClient . QueryIdByContent ( groupName , name , format , schemaDefinition , cancellationToken ) ;
195+ response = RestClient . QueryIdByContent ( groupName , schemaName , format , schemaDefinition , cancellationToken ) ;
198196 }
199197
200- var properties = new SchemaProperties ( response . Headers . Location , response . Headers . SerializationType , response . Headers . SchemaId , response . Headers . SchemaVersion ) ;
198+ var properties = new SchemaProperties ( response . Headers . SerializationType , response . Headers . SchemaId ) ;
201199
202200 return Response. FromValue ( properties , response ) ;
203201 }
@@ -246,7 +244,7 @@ private async Task<Response<SchemaRegistrySchema>> GetSchemaInternalAsync(string
246244 response = RestClient . GetById ( schemaId , cancellationToken ) ;
247245 }
248246
249- var properties = new SchemaProperties ( response . Headers . Location , response . Headers . SerializationType , response . Headers . SchemaId , response . Headers . SchemaVersion ) ;
247+ var properties = new SchemaProperties ( response . Headers . SerializationType , response . Headers . SchemaId ) ;
250248 var schema = new SchemaRegistrySchema ( properties , response . Value ) ;
251249
252250 return Response . FromValue ( schema , response ) ;
0 commit comments