putCodeBinding method
Put code binding URI
May throw GoneException. May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw TooManyRequestsException.
Parameter language
:
The language of the code binding.
Parameter registryName
:
The name of the registry.
Parameter schemaName
:
The name of the schema.
Parameter schemaVersion
:
Specifying this limits the results to only this schema version.
Implementation
Future<PutCodeBindingResponse> putCodeBinding({
required String language,
required String registryName,
required String schemaName,
String? schemaVersion,
}) async {
ArgumentError.checkNotNull(language, 'language');
ArgumentError.checkNotNull(registryName, 'registryName');
ArgumentError.checkNotNull(schemaName, 'schemaName');
final $query = <String, List<String>>{
if (schemaVersion != null) 'schemaVersion': [schemaVersion],
};
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/v1/registries/name/${Uri.encodeComponent(registryName)}/schemas/name/${Uri.encodeComponent(schemaName)}/language/${Uri.encodeComponent(language)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return PutCodeBindingResponse.fromJson(response);
}