copyWith method

BGPPathAttributes copyWith({
  1. int? asPathLength,
  2. List<int>? asPath,
  3. int? origin,
  4. int? localPreference,
  5. int? med,
  6. List<String>? communities,
  7. bool? atomicAggregate,
  8. String? aggregator,
})

Creates a copy with updated values

Implementation

BGPPathAttributes copyWith({
  int? asPathLength,
  List<int>? asPath,
  int? origin,
  int? localPreference,
  int? med,
  List<String>? communities,
  bool? atomicAggregate,
  String? aggregator,
}) {
  return BGPPathAttributes(
    asPathLength: asPathLength ?? this.asPathLength,
    asPath: asPath ?? this.asPath,
    origin: origin ?? this.origin,
    localPreference: localPreference ?? this.localPreference,
    med: med ?? this.med,
    communities: communities ?? this.communities,
    atomicAggregate: atomicAggregate ?? this.atomicAggregate,
    aggregator: aggregator ?? this.aggregator,
  );
}