code: public TrustedResourceUrl toTrustedResourceUrl() {
      Preconditions.checkState(
          getContentKind() == ContentKind.TRUSTED_RESOURCE_URI,
          "toTrustedResourceUrl() only valid for SanitizedContent of kind TRUSTED_RESOURCE_URI, "
              + "is: %s",
          getContentKind());
      return UncheckedConversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract(
          getContent());
    }
docs: Converts a Soy {@link SanitizedContent} of kind TRUSTED_RESOURCE_URI into a {@link
  TrustedResourceUrl}.
  
  @throws IllegalStateException if this SanitizedContent's content kind is not {@link
  ContentKind#TRUSTED_RESOURCE_URI}.