all: move uritemplates to third_party

These files need to be moved to a third_party subdir for licensing
reasons. Also add METADATA.

Change-Id: I377a4cffc8a36db4df7b4fa4f03083c6a4f62a4e
Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/47232
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
diff --git a/googleapi/googleapi.go b/googleapi/googleapi.go
index 673cc66..152db0e 100644
--- a/googleapi/googleapi.go
+++ b/googleapi/googleapi.go
@@ -16,7 +16,7 @@
 	"net/url"
 	"strings"
 
-	"google.golang.org/api/googleapi/internal/uritemplates"
+	"google.golang.org/api/internal/third_party/uritemplates"
 )
 
 // ContentTyper is an interface for Readers which know (or would like
diff --git a/googleapi/internal/uritemplates/LICENSE b/googleapi/internal/uritemplates/LICENSE
deleted file mode 100644
index de9c88c..0000000
--- a/googleapi/internal/uritemplates/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright (c) 2013 Joshua Tacoma
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/internal/third_party/uritemplates/LICENSE b/internal/third_party/uritemplates/LICENSE
new file mode 100644
index 0000000..7109c6e
--- /dev/null
+++ b/internal/third_party/uritemplates/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2013 Joshua Tacoma. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/internal/third_party/uritemplates/METADATA b/internal/third_party/uritemplates/METADATA
new file mode 100644
index 0000000..c7f86fc
--- /dev/null
+++ b/internal/third_party/uritemplates/METADATA
@@ -0,0 +1,14 @@
+name: "uritemplates"
+description:
+    "Package uritemplates is a level 4 implementation of RFC 6570 (URI "
+    "Template, http://tools.ietf.org/html/rfc6570)."
+
+third_party {
+  url {
+    type: GIT
+    value: "https://github.com/jtacoma/uritemplates"
+  }
+  version: "0.1"
+  last_upgrade_date { year: 2014 month: 8 day: 18 }
+  license_type: NOTICE
+}
diff --git a/googleapi/internal/uritemplates/uritemplates.go b/internal/third_party/uritemplates/uritemplates.go
similarity index 100%
rename from googleapi/internal/uritemplates/uritemplates.go
rename to internal/third_party/uritemplates/uritemplates.go
diff --git a/googleapi/internal/uritemplates/uritemplates_test.go b/internal/third_party/uritemplates/uritemplates_test.go
similarity index 99%
rename from googleapi/internal/uritemplates/uritemplates_test.go
rename to internal/third_party/uritemplates/uritemplates_test.go
index a60c4ef..1296d37 100644
--- a/googleapi/internal/uritemplates/uritemplates_test.go
+++ b/internal/third_party/uritemplates/uritemplates_test.go
@@ -1,4 +1,4 @@
-// Copyright 2016 The Go Authors. All rights reserved.
+// Copyright 2013 Joshua Tacoma. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
diff --git a/googleapi/internal/uritemplates/utils.go b/internal/third_party/uritemplates/utils.go
similarity index 100%
rename from googleapi/internal/uritemplates/utils.go
rename to internal/third_party/uritemplates/utils.go
diff --git a/license_test.go b/license_test.go
index dbcf020..5881762 100644
--- a/license_test.go
+++ b/license_test.go
@@ -24,7 +24,8 @@
 // A few files have to be skipped.
 var skip = map[string]bool{
 	"tools.go": true, // This file requires another comment above the license.
-	"googleapi/internal/uritemplates/uritemplates.go": true, // This file is licensed to an individual.
+	"internal/third_party/uritemplates/uritemplates.go":      true, // This file is licensed to an individual.
+	"internal/third_party/uritemplates/uritemplates_test.go": true, // This file is licensed to an individual.
 }
 
 // This test validates that all go files in the repo start with an appropriate license.