getFeature method
Gets details of a single Feature.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a StatusException if the API failed with a
Status message. Throws a ServiceException for any other failure.
Implementation
Future<Feature> getFeature(GetFeatureRequest request) async {
final url = Uri.https(_host, '/v1beta1/${request.name}', {
if (request.featureStatsAndAnomalySpec!.latestStatsCount case final $1?)
'featureStatsAndAnomalySpec.latestStatsCount': '${$1}',
if (request.featureStatsAndAnomalySpec!.statsTimeRange!.startTime
case final $1?)
'featureStatsAndAnomalySpec.statsTimeRange.startTime': $1.toJson(),
if (request.featureStatsAndAnomalySpec!.statsTimeRange!.endTime
case final $1?)
'featureStatsAndAnomalySpec.statsTimeRange.endTime': $1.toJson(),
});
final response = await _client.get(url);
return Feature.fromJson(response);
}