@Override public Subscription anonymize() { if (getEndpoint().containsCredentials() || hasOAuthPolicy()) { return new Subscription( topicName, name, endpoint.anonymize(), state, description, deliveryType == DeliveryType.BATCH ? batchSubscriptionPolicy : serialSubscriptionPolicy, trackingEnabled, trackingMode, owner, supportTeam, monitoringDetails, contentType, deliveryType, filters, mode, headers, endpointAddressResolverMetadata, oAuthPolicy != null ? oAuthPolicy.anonymize() : null, http2Enabled ); } return this; }