title: How do you use a switch statement with a nested enum?
body: <p>I've created an enum for Instagram endpoints with nested enums similar to <a href="https://github.com/terhechte/appventure-blog/blob/master/resources/posts/2015-10-17-advanced-practical-enum-examples.org#api-endpoints" rel="noreferrer">Moya</a>.</p>
  
  <pre><code>enum Instagram {
      enum Media {
          case Popular
          case Shortcode(id: String)
          case Search(lat: Float, lng: Float, distance: Int)
      }
      enum Users {
          case User(id: String)
          case Feed
          case Recent(id: String)
      }
  }
  </code></pre>
  
  <p>I would like to return the path for each endpoint.</p>
  
  <pre><code>extension Instagram: TargetType {
      var path: String {
          switch self {
          case .Media.Shortcode(let id):
              return "/media/shortcode"
          }
      }
  }
  </code></pre>
  
  <p>However I'm getting an error on the switch statement above for the <code>path</code>.</p>
  
  <blockquote>
    <p>Enum case <code>Shortcode</code> is not a member of type <code>Instagram</code></p>
  </blockquote>
  
  <p>How to fix?</p>
  
  <p><a href="https://github.com/terhechte/appventure-blog/blob/master/resources/posts/2015-10-17-advanced-practical-enum-examples.org#api-endpoints" rel="noreferrer">Advanced Practical Enums</a></p>