class Aws::Endpoints::URL

def initialize(url)

def initialize(url)
  uri = URI(url)
  @scheme = uri.scheme
  # only support http and https schemes
  raise ArgumentError unless %w[https http].include?(@scheme)
  # do not support query
  raise ArgumentError if uri.query
  @authority = _authority(url, uri)
  @path = uri.path
  @normalized_path = uri.path + (uri.path[-1] == '/' ? '' : '/')
  @is_ip = _is_ip(uri.host)
end