MetricDescriptor constructor

MetricDescriptor({
  1. String? name,
  2. Iterable<LabelDescriptor>? labels,
  3. MetricDescriptor_MetricKind? metricKind,
  4. MetricDescriptor_ValueType? valueType,
  5. String? unit,
  6. String? description,
  7. String? displayName,
  8. String? type,
  9. MetricDescriptor_MetricDescriptorMetadata? metadata,
  10. LaunchStage? launchStage,
})

Implementation

factory MetricDescriptor({
  $core.String? name,
  $core.Iterable<$2.LabelDescriptor>? labels,
  MetricDescriptor_MetricKind? metricKind,
  MetricDescriptor_ValueType? valueType,
  $core.String? unit,
  $core.String? description,
  $core.String? displayName,
  $core.String? type,
  MetricDescriptor_MetricDescriptorMetadata? metadata,
  $4.LaunchStage? launchStage,
}) {
  final _result = create();
  if (name != null) {
    _result.name = name;
  }
  if (labels != null) {
    _result.labels.addAll(labels);
  }
  if (metricKind != null) {
    _result.metricKind = metricKind;
  }
  if (valueType != null) {
    _result.valueType = valueType;
  }
  if (unit != null) {
    _result.unit = unit;
  }
  if (description != null) {
    _result.description = description;
  }
  if (displayName != null) {
    _result.displayName = displayName;
  }
  if (type != null) {
    _result.type = type;
  }
  if (metadata != null) {
    _result.metadata = metadata;
  }
  if (launchStage != null) {
    _result.launchStage = launchStage;
  }
  return _result;
}